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

High Level Overview

Description of the FarmBot software toolchain

There are many software systems contributing to FarmBot's functionality. The diagram below shows the different components and how data flows between them. Read the brief descriptions of each component in the following sections to understand the system as a whole, and then dive into setting up the needed components for your FarmBot.

FarmBot Software High Level Overview


Farm Design, Commands

Logs, Sensor Data, Photos, Video


External Resources

(crop database)

Local Weather

(any source)

Rain, temperature, humidity

FarmBot Cloud Services

Crop Information, growing regimens

Farmbot Web App

(hosted service at

Events, Sensor Data

Decision Support System

(hosted service at


Logs, Sensor Data, Video, Photos

Optimized Events

MQTT Gateway

(hosted service at

Optimized Events, Commands

Logs, Sensor Data, Video, Photos

FarmBot Device

Raspberry Pi

(FarmBot OS)

Raspberry Pi Controller

Video, Photos


FarmBot Configurator

WiFi and web app credentials


G and F codes

Logs, Sensor (Pin,Encoder) Data


Arduino Firmware

Step and Direction Pulses

Rotary Encoder Data

Stepper Motors and Rotary Encoders

Read Pins

Write Pins






Everything is open-source

All of our software is licensed permissively with the MIT license, allowing you to contribute to, copy, modify, redistribute, and even sell FarmBot software. Want to help build new features or have a bug to report? Get involved on GitHub!

We're here to help

Have a question or need help setting up some of the software? You can ask a question and find answers in our forum!

FarmBot Cloud Services

The FarmBot Web Application

The web app allows you to easily configure and control your FarmBot from a web browser on your laptop, tablet, or smartphone. The application features real-time manual controls and logging, a sequence builder for creating custom routines for FarmBot to execute, and a drag-and-drop farm designer so you can graphically design and manage your farm.

MQTT Gateway

The MQTT Gateway is a cloud application that acts as an intermediary for all messages between the FarmBot web app and FarmBot devices. It handles socket connections, device identification, and authentication.

Coming soon: Decision Support System

The decision support system (DSS) is a cloud service that employs fine tuned algorithms to optimize scheduled events based on relevant data. For example, the DSS may optimize a watering sequence to use more or less water based on the weather forecast.

Device Software

FarmBot Raspberry Pi Controller

FarmBot's Raspberry Pi uses this software to maintain a connection and synchronize with the web application via FarmBot Mesh. This allows FarmBot to download and execute scheduled events, be controlled in real-time, and upload logs and sensor data. The controller communicates with the Arduino over USB to send G and F code commands and also receive collected data.

Farmbot Arduino Firmware

This software is flashed onto FarmBot's Arduino MEGA 2560 microcontroller and is responsible for physically operating FarmBot's hardware, tools, sensors, and other electronics. It receives G and F codes from FarmBot Raspberry Pi Controller via the USB serial connection, and then moves the motors and reads and writes pins accordingly. It also sends collected data from the rotary encoders and pin reads back to the Raspberry Pi.

WiFi Configurator

FarmBot OS has a WiFi Configurator utility built in allowing you to easily enter WiFi and web app credentials from a WiFi enabled device (such as a laptop or smartphone). This is useful for initial setup in order to get your FarmBot connected to your home WiFi.

External Resources

OpenFarm is a free and open database for farming and gardening knowledge. This service provides crop and growing information to the web app for a streamlined user experienced.

OpenFarm is built by us too! was originally conceived as a small component of the FarmBot project. As progress was made, it became clear that OpenFarm had no reason to be tied to FarmBot, but could rather live on its own. In September of 2014, 1,605 people backed OpenFarm on Kickstarter. Today, OpenFarm is a standalone application, non-profit, and community. You can get involved with OpenFarm by joining the Slack channel, contributing on GitHub, or going to and creating content!

Syncronization and Data Exchange

Data is exchanged across the web application, Raspberry Pi controller, and the user's web browser session in three ways.

Automatic and manual synchronization

FarmBot's Raspberry Pi controller automatically synchronizes with the web application every hour and with manual initiation from the user via the browser. The data that is transferred during synchronization includes logs, configuration settings, sensor data, sequences, schedules, and events. The diagram below explains how this works.

Regular, Autonomous Syncing

1. Device polls the Web App and says: Let's Sync! Here is my new Sensor Data and Logs
2. Web App sends back: Got it, and here's some new Events for you
3. Device sends back: Got it, thanks. See you again in 15

FarmBot Device

Stores: Sensor Data, Events, and Logs

Sensor Data, Logs

Confirmation, Events


Web App (The Cloud)

Stores: Users, FarmBots, Sensor Data, Zones, Plant Groups, Plants, Events, Sequences, Operations, and Logs

Manual Syncing by the User

1. User presses the Sync button
2. Browser sends Web App: Here are some updated Sequences, Plants, Plant Groups, Zones, and Events
3. Web App says back: Got it, thanks
4. Browser sends Device: Hey, I updated the Web App, go sync!
5. Device does the three step syncing flow (above)
6. Device sends Browser: I'm done syncing
7. Browser asks Web App: Yo, give me the latest Sensor Data and Logs
8. Web App says: Okay, here ya go
9. Browser says: Thanks!

Web App (The Cloud)

Stores: Users, FarmBots, Sensor Data, Zones, Plant Groups, Plants, Events, Sequences, Operations, and Logs

Sensor Data, Logs

FarmBot Device

Stores: Sensor Data, Events, and Logs


Sensor Data, Logs

Go sync!

I'm done syncing

Browser UI

Modifies: all data of the Web App except Sensor Data and Logs

Sequences, Plants, Plant Groups, Zones, Events

Real-time data exchange

In addition to synchronization, data is also exchanged in real-time between the user's web browser and the FarmBot device. This is used for emergency stop and real-time control commands, as well as real-time log and video streaming.

High Level Overview

Description of the FarmBot software toolchain