Skip to content
Pre-order Genesis or Genesis XL v1.8 for Spring to lock in savings
Pre-order Genesis or Genesis XL v1.8 and save big
October 7, 2021 Software Update: Multi-Variable Support and Shared Sequences Beta

October 7, 2021 Software Update: Multi-Variable Support and Shared Sequences Beta

Hi FarmBot community,

Today we have a huge update for you all that brings powerful new functionality to everyone’s FarmBots, as well as a new way to engage with the wider community. Here’s what’s new:

Multi-variable sequences

You can now add more than one location variable to your sequences and provide custom names for each variable. This allows you to create generic sequences that can be used in even more diverse ways than what was possible with just one variable.

To get started, simply click the ADD VARIABLE button as many times as needed.

You can then add custom names for the variables by clicking the name. Note: you cannot rename the variable once it is in-use by sequence commands, so do the naming up-front! We recommend naming each variable in a way that will remind you of how the variable is used in your sequence.

For example, if you had one variable used for mounting a tool and a second variable used to move to a plant for performing an action on it, you may consider naming the first variable “Tool” and the second variable “Plant”.

All Externally defined variables will be displayed in the RUN button popup, EXECUTE steps, and all other places where you can provide a value for an externally defined variable.

Whenever a sequence with Externally defined variables is used in a regimen or an event, the regimen item or event instance will show the custom variable names and the values that will be used when the sequence is executed (either the explicitly set values in the regimen/event or the variable’s default values).

New link icons in regimen items and event instances (shown on hover) can be used to navigate back to a source for quick editing.

Publicly shared sequences beta

You can now publish public copies of a sequence and share the link with others in the FarmBot community! To publish, click the new share icon in the edit sequence panel, enter the name(s) you wish to include in the copyright notice, and click PUBLISH. All publicly shared sequences are released under the MIT License, permitting other community members to use, modify, and republish the sequence as they wish.

Once the sequence has been published, grab the share link (my.farm.bot/app/shared/sequence/1) and post it here on the forum, in a message to your colleagues, or in your classroom’s content management system.

If you make further edits to your sequence and would like to share those with the community as well, simply click the plus button + to publish a new version of the sequence and share the new link. Links to older versions will still work and can be found by clicking the link icon next to the version.

Additionally, when you publish a new version, other users of the sequence will see that you have published the new version and may optionally upgrade to it.

Importing sequences

When opening up a share link, you will be shown a read-only version of the sequence so that you may evaluate if you would like to use it or not with your FarmBot. If you would like to use it, press the IMPORT button to add the sequence to your account. Your FarmBot will sync the sequence just like any other and can run it right away.

 

Once you have imported a sequence into your account, you can make copies of it, edits, or delete it just like any other sequence. Plus, you can quickly switch between viewing/editing YOUR COPY and viewing the PUBLIC COPY.

If the original author publishes a new version, you will see an UPGRADE TO LATEST button, allowing you to replace the contents of your copy with the contents of the latest version of the public copy. It is important to always review the contents of a new version before upgrading to ensure that your FarmBot will continue to operate as expected after the upgrade.

And just in case you would like to revert to using an older version of the public copy, you can select an older version from the version picker dropdown and then click UPGRADE YOUR COPY TO THIS VERSION.

Current limitations

We are very excited to empower the whole FarmBot community to help each other in bringing about new functionality to everyone’s FarmBots. However, please keep in mind that publicly shared sequences are in beta and there are a couple big limitations still in place:

  • You cannot publish sequences with commands or variables that reference account-specific resources such as plants or tools because the account that imports the sequence will not have access to those resources. We understand that this is a big limitation and are brainstorming ways to allow an importer to “fill in the blanks” when necessary. Stay tuned!
  • Only approved people can currently publish sequences with Lua code. Over the coming months we will investigate implementing a review process and/or other measures so that anyone may publish Lua in a safe and secure way.

We look forward to your feedback and seeing the sequences you all share!

Updated edit sequence panel

The edit sequence panel has been updated with an improved layout featuring multiple collapsible sections for the sequence DESCRIPTION (new!), VARIABLES, SEQUENCE STEPS, and LICENSE (for publicly shared sequences).

The add command buttons have been redesigned to + buttons and moved to the right side of the panel to save vertical real estate.

 

The new DESCRIPTION field allows you to write up to 5,000 characters describing what your sequence does and/or how to use it. This may be particularly useful for educators creating sequences used by their students, teams of researchers using a shared FarmBot account, or everyday members of the community who are publicly sharing a sequence. The description field supports Markdown, so you can add headings, links, emphasis, and tables.

Miscellaneous

  • Added warning icons to logs sent by a version of FarmBot OS different than the current version, as well as a logs filter option to show logs from the CURRENT VERSION ONLY.
  • Added documentation for the collectgarbage() Lua function.
  • It is now possible to directly execute Lua snippets from FarmBotJS by calling .lua(...) on any Farmbot instance. Example: farmbot.lua("print('hello, world!')") .This feature is particularly beneficial for users that need to perform complex transaction logic on the FarmBot from within a Javascript application.
  • Fixed a layout issue with the map photo filters section.
  • Fixed a bug where default variable values shown in the RUN button popup would not update until after refreshing the edit sequence panel.
Previous article November 18, 2022 Software Update