FarmBot Software

The FarmBot Software Developer Hub

Welcome to the FarmBot Software developer hub. You'll find comprehensive guides and documentation to help you start working with FarmBot software as quickly as possible, as well as support if you get stuck. Let's jump right in!

Software Docs    Support

The FarmBot Web App

Step-by-step instructions for setting up and using the FarmBot web app

The Farmbot Web App is a cloud based web service that performs the following functions:

  • Storage of device info and calibration settings
  • Real time manual control of a FarmBot from a web browser via FarmBot MQTT
  • Creation of sequences of events
  • Scheduling of recurring sequences of events (irrigation, seeding, etc...)
  • Drag and drop interface for farm/garden design
  • Creation of regimens (plant-age-based scheduling of sequences of events)
  • Coming soon: crop and sensor data storage and management

In the sections below, we show you how to use each of these features.

At your service

We offer a hosted service of the web app at my.farmbot.io. We recommend that most people use this because it is convenient, affordable, and always up-to-date with the latest features and security.

In case you want to run the application on your own servers, we show you how to do that as well near the bottom of this page.

Help improve the web app

Submit feature requests, bugs, and code for the web app on GitHub.

Using the Web App

Registration

  1. Go to my.farmbot.io
  2. Click Register
  3. Enter a username, email, and password. Click Register
  4. Check your email and follow the link to confirm your account (coming soon)

Add your FarmBot device

  1. Follow the FarmBot Raspberry Pi Software installation instructions: Raspberry Pi Software
  2. Follow the WiFi Configurator instructions: WiFi Configurator
  3. Go to my.farmbot.io and log in.

Can you hear me now?

If all has gone well, the web application should now be able to communicate with your FarmBot. You should see some logs stream into the Logs widget, and the device status button in the main navigation change from Offline to Sync Now.

Troubleshooting

There are three likely reasons of why your device might not connect to the web application:

  1. WiFi configuration has not been completed yet or was not completed successfully.
  2. Your FarmBot is not connected to the Internet. Double check that your device can connect to the Internet either over WiFi or Ethernet.

We're here to help

Still having trouble? Ask a question and find answers in our forum.

Manual control

Navigate to the Dashboard page to manually control your FarmBot.

  • The Move widget shows the current position of your FarmBot in the input fields labeled Gantry, Cross-Slide, and Z-Axis. This information is updated in real-time.
  • You can move the device a relative distance in any direction by using the arrow buttons. The default move amount is 1000mm, though you can also select 100, 10, and 1mm amounts. You will not be able to move to negative coordinates unless you have enabled them from the hardware configuration widget on the device page.
  • You can move the device to an absolute position by typing in new coordinates to the input fields labeled Gantry, Cross-Slide, and Z-Axis; and then pressing Go.
  • You can manually operate some of FarmBot's tools using the toggle switches in the Tool Control widget.
  • If you ever need to immediately halt your FarmBot, press the E-Stop button.

Sequence building

The web app is a platform designed to give you unlimited control over how you use your FarmBot and therefore how you grow your food. Because nobody wants to sit on their computer all day controlling their FarmBot manually, we have designed several features to help you automate your farming operation.

The sequence builder allows you to combine the most basic operations of FarmBot into more complex actions composed of many different steps. When a sequence is initiated, FarmBot will execute all of the steps in the sequence one after the other until it is done.

Example watering sequence

  1. Move Absolute to {plant 12 coordinates} - Moves the device to plant 12's X and Y position within the field
  2. Write Pin 10 with a value of 1 - Opens the solenoid valve for the water
  3. Wait 4000 - Wait for 4 seconds
  4. Write Pin 10 with a value of 0 - Closes the solenoid valve for the water.
  5. Move Absolute to {home} - Moves the device to 0, 0, 0

The web app ships with several pre-made sequences like the one above. You can use, modify, or delete these sequences; and also make your own from scratch for completing any task you can imagine.

Supported operations

These are the basic operations that FarmBot can execute.

  • Move Absolute - Moves the device to an absolute coordinate position at any speed. This is useful for moving to tool, plant, and home locations.
  • Move Relative - Moves the device a specific distance in any direction at any speed, relative from the last position. This is useful for movements after a absolute movement to a dynamically loaded location. Eg: Moving in a square relative to a plant after the device moved absolutely to the plant.
  • Write Pin - Writes a value to any pin on the Arduino. This is used for operating virtually all tools.
  • Read Pin - Reads the value from any pin on the Arduino. This is used for tool verification and with sensors.
  • Wait - Causes a delay before executing the next operation in the sequence. This could be used to water for a certain amount of time.
  • If Statement - Executes another sequence if a condition is true. This is useful for error detection and smarter, condition based farming.
  • Send Message - Sends a message to the web app. This is useful for error and success notifications and debugging.
  • Take Picture (Coming soon) - Takes a picture with the Raspberry Pi camera or a USB webcam and sends it to the web app.

Building a sequence

  1. From the Sequences widget, click Add
  2. In the Sequence Builder widget, enter a name for your sequence and assign it a color
  3. Drag and drop blocks from the Operations widget into the Sequence Builder widget
  4. For each operation, enter in your desired parameter values. Some parameters such as speed can use default values for your device and do not need to be entered in every time.
  5. Reorder, copy, and delete operations as needed
  6. Click Save

Sequenception

You can use existing sequences as steps in a new, larger sequence. This technique allows you to re-use smaller sequences in different combinations to create far more complex sequences that are easier to modify, manage, and mashup.

For example, you could make an Inject Seed sequence, a Measure Moisture sequence, and a Water sequence, and combine them all into one mega sequence named Start Plant. You can then use the individual sequences in other ways without having to recreate them each time.

Event scheduling

It would not be convenient for you to manually initiate your sequences every time you want them to execute. This is where event scheduling comes in to help.

If you've ever used a calendar application before, you'll feel right at home with this. Simply choose the sequence you would like to execute, and schedule it to run on a one-off or repeating basis.

Regimen Building

To explain the utility of the Regimen Builder, let's go through a practical example. Imagine you create three sequences for growing Cherry Tomatoes:

  1. Seed Injection
  2. Light Watering
  3. Medium Watering

You decide to grow 10 tomato plants with these sequences starting on March 1st. To do this using the Event Scheduler, you create three Event Schedules:

  1. Seed Injection will run on March 1st
  2. Light Watering will run everyday from March 2nd to March 21st
  3. Medium Watering will run everyday from March 22nd to May 22nd

Now imagine you want to grow 10 more tomato plants starting March 9th, and 10 more plants starting March 25th, and 10 more on April 19th. Using the Event Scheduler, you would need to tediously schedule your three sequences three more times each. In total, you will have to make 12 Event Schedules. This is what the Regimen Builder aims to streamline.

While the Event Scheduler works by scheduling an event on a specific calendar day such as March 1st, the Regimen Builder works by scheduling events on a relative day such as Day 22 from when the regimen is started. Regimens are therefore a way to bulk re-schedule a set of events starting at any time.

Let's look at our tomatoes example again, this time using the Regimen Builder to reach the same outcome. First, we'll make a Regimen:

  1. Seed Injection will run on Day 1
  2. Light Watering will run everyday from Day 2 to 21
  3. Medium Watering will run everyday from Day 22 to 82

We can then Schedule this Regimen to start on March 1st, March 9th, March 25th, and April 19th.

Using this method, we created one Regimen and four Event Schedules instead of the 12 Event Schedules from before. Plus, we can continue to re-use our Regimen and we'll just save more time. We can also change our one Regimen and thereby update all four scheduled instances of the Regimen running at once. We also remove the risk of forgetting one of our sequences, or messing up on the date calculations of when stuff should run when we want to plant tomatoes again using the same method next season.

Provisioning the Web App

For advanced users only

The instructions below are intended for expert users and software developers who wish to run the FarmBot Web App on their own servers. This may be useful for enterprise or off-grid intranet solutions. Nontechnical users are encouraged to use the hosted service at my.farmbot.io.

Please see the official README for the web app source code here.

The FarmBot Web App

Step-by-step instructions for setting up and using the FarmBot web app