Skip to content
CAI
Software that uses CAICheck a score

FarmBot/farmbot_os

39.1

Weak · 23 September 2026

25.9k

lines of production code

Elixir

with Python

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an embedded operating system for Farmbot hardware, providing a comprehensive layer for device control, automation, and state management. It manages hardware interactions through a structured firmware communication layer, GPIO handling, and serial communication with Arduino-based controllers. The system supports complex automation via a custom Lua scripting environment and a new CeleryScript compiler, enabling users to define sequences, control movement, and interact with sensors. Additionally, it maintains synchronization with a remote API, handles network configuration via a web-based configurator, and tracks system health through telemetry workers.

Features

Add Configurator web interface for initial device setup

The lib/os/configurator directory now contains a complete web-based configuration interface for setting up the device. This includes a Phoenix router and Cowboy server to serve the setup pages, alongside specific layers for handling network configuration, telemetry data, and logging. The implementation introduces a new DataLayer abstraction to manage configuration storage and introduces a LoggerBackend to stream logs via WebSocket, enabling users to configure network settings, authentication, and view system logs during the initial setup process.

lib/os/configurator · high confidence

Add network configuration layer using VintageNet

The configurator now uses the VintageNet library to handle network setup. New modules implement a network layer that scans for Wi-Fi access points, lists available interfaces, and converts internal network settings into VintageNet-compatible configurations for both wired and wireless connections.

platform/target/configurator · high confidence

Add take-photo farmware with optional arguments

A new Python-based farmware named 'take-photo' has been added to the system. This component enables the device to capture images using either a USB or Raspberry Pi camera, with support for optional arguments passed via environment variables (take\_photo\_width, take\_photo\_height, take\_photo\_args). The script handles camera selection, image capture, and logging, integrating with the Farmware Tools library when available.

priv/farmware/take-photo · medium confidence

Added build, test, and configuration files for the repository

Added configuration files for the Busted test runner (.busted, .luacov), Elixir code formatter (.formatter.exs), and CI/coverage tools (coveralls.json). Added .tool-versions to specify Erlang 26.2.5 and Elixir 1.16.2-otp-26. Added .gitignore to exclude build artifacts, logs, and temporary files. Added a CHANGELOG.md, a release notes file (RELEASE\_NOTes.md), a version file (v15.5.2), and a feature minimum versions JSON (fEATURE\_MIN\_VERSIONS.json). Updated README.md with build status badges and updated download links.

(repo-wide) · high confidence

Added farmware diagnostic and CI configuration

Added a Python diagnostic script (noop.py) that prints versions of key dependencies (requests, numpy, cv2, farmware\_tools) and environment details, alongside CI configuration files (.travis.yml) and linting/setup configs (.landscape.yml, .pre-commit-config.yaml) to support testing and quality checks for farmware scripts.

priv/farmware · high confidence

Added host-level configuration and system task implementations

The platform/host directory now includes new Elixir modules: Configurator, which sets up the local environment and validates required environment variables (FARMBOT\_EMAIL, FARMBOT\_PASSWORD, FARMBOT\_SERVER), and SystemTasks, which implement reboot and shutdown behaviors for the host. These changes provide the underlying infrastructure for host configuration and system control.

platform/host · high confidence

Added iex helper and ALSA configuration

The system image now includes an iex helper script that enables the Toolshed library for interactive Elixir sessions, and a default ALSA configuration file that defines standard audio device mappings and defaults for the Linux sound system.

_rootfs\overlay · high confidence

Database schema updated with new fields for tools, points, and configurations

The database schema has been updated to support new features and configuration options. The \tools\ table now includes \flow\_rate\_ml\_per\_s\ and \seeder\_tip\_z\_offset\ fields. The \points\ (plants) table has been extended with \depth\, \water\_curve\_id\, \spread\_curve\_id\, and \height\_curve\_id\ to support plant curve data. Additionally, \fbos\_configs\ now stores \boot\_sequence\_id\ and \default\_axis\_order\, while \sensor\_readings\ includes a \read\_at\ timestamp. These changes enable more precise tool calibration, plant growth tracking, and system configuration.

priv/repo · high confidence

Expanded Lua scripting API with new helpers and improved error handling

The Lua scripting environment now includes a broader set of built-in helpers for device configuration, firmware control, and data manipulation. Users can now make HTTP requests, encode/decode JSON, update device and firmware settings, and access system information like UTC/local time, bot state, and job progress. New firmware helpers allow calibration, emergency locking/unlocking, and movement control. Additionally, the Lua runtime now supports calling Python builtins and arbitrary C\# code, and error handling has been improved to prevent crashes on HTTP client failures and invalid Lua code.

lib/os/lua · high confidence

Introduce internal scripting and telemetry infrastructure

The system now includes a new internal scripting language (Celery) that allows Lua code to execute arbitrary commands via a scheduler and step runner. Additionally, a new telemetry module has been added to track system metrics and events, storing them in a local database for later dispatch. The application startup process has been restructured to include these new components alongside existing supervisors.

lib · high confidence

Introduced new plant detection farmware components

Added a new set of Python modules for plant detection, including Capture.py for image acquisition, CeleryPy.py for API interactions, DB.py for data management, ENV.py for environment variable handling, GUI.py for interactive parameter adjustment, Image.py for image processing, Log.py for logging, P2C.py for pixel-to-coordinate conversion, Parameters.py for input settings, and PatternCalibration.py for camera calibration. These files collectively enable the farmware to capture images, process them, and convert pixel locations to machine coordinates.

_priv/farmware/plant\detection · high confidence

Introduces new API synchronization and state management modules

The \lib/ext\ directory is populated with a new suite of modules to handle API interactions and state management. This includes \FarmbotOS.API\ for fetching and syncing remote resources, \FarmbotOS.APIFetcher\ for HTTP communication, and \FarmbotOS.API.Reconciler\ to manage local cache and database updates. Additionally, \FarmbotOS.DirtyWorker\ and \FarmbotOS.EagerLoader\ are introduced to handle background uploads and preloading of assets, while \FarmbotOS.Bootstrap\ and its submodules manage authentication and token handling. These changes implement a more robust, transactional sync process for keeping the device's local state in sync with the remote API.

lib/ext · high confidence

Introduces new Lua helpers and OS-level system modules

The \lib/os\ directory now includes several new modules: \FarmbotOS.FileSystem\ for accessing the RW data partition, \FarmbotOS.LegacyMigrator\ to handle database migrations from older versions, \FarmbotOS.Lua\ which provides a comprehensive set of Lua helper functions for scripting (including API access, firmware control, and data manipulation), \FarmbotOS.Migrator\ for Ecto migrations, \FarmbotOS.System\ for reboot/shutdown logic, and \FarmbotOS.UpdateProgress\ and \FarmbotOS.UpdateSupport\ for managing OTA update states. These changes expand the capabilities available to users writing Lua scripts and improve the underlying OS infrastructure.

lib/os · high confidence

Introduces new asset models and database schema for core system resources

The system now persists a comprehensive set of core assets to the local database, including Device, FarmEvent, FbosConfig, FirmwareConfig, Point, PointGroup, Regimen, Sensor, Sequence, Tool, and their associated metadata. This change establishes the data layer for managing hardware configuration, scheduled events, and point groups, enabling the application to track and synchronize these resources with the remote API.

lib/core · high confidence

New CeleryScript compiler and runtime

The system introduces a new CeleryScript compiler and runtime environment, replacing the previous scripting mechanism. This update includes a new AST (Abstract Syntax Tree) structure, a compiler that translates CeleryScript into Elixir code, and a scheduler to execute the compiled scripts. The new system supports features such as axis control, pin control, and Lua script execution, providing a more robust and flexible way to automate Farmbot OS tasks.

lib/celery · high confidence

New Lua helpers for automation scripts

Added several new Lua helper scripts in the \priv/lua\ directory to simplify common automation tasks. These include \api\ for making HTTP requests, \rpc\ for remote procedure calls, \sequence\ for executing named sequences with parameters, \move\ for controlling axis movement and speed, \grid\ for generating grid-based movement patterns, and \wait\ for timed delays. Additional helpers were added for specific hardware interactions: \mount\_tool\ and \dismount\_tool\ for tool management, \dispense\ and \water\ for liquid handling, \photo\_grid\ for camera-based grid generation, \get\_curve\ for retrieving growth curves, \get\_seed\_tray\_cell\ for seed tray positioning, and \verify\_tool\ for checking tool status. Configuration files for code coverage (\luacov\) were also added to support testing.

priv/lua · high confidence

New firmware communication layer and GCode command handling

The firmware module has been significantly restructured with the addition of new Elixir modules to handle UART communication, GCode parsing, and device flashing. Key additions include \UARTCore\ as the central processing hub for inbound and outbound serial data, \GCode\ and \GCodeDecoder\ for command formatting and parsing, and \TxBuffer\/\RxBuffer\ for managing message queues. The \Flash\ module now utilizes \Avrdude\ to handle firmware flashing with retry logic, while \ConfigUploader\ manages firmware configuration uploads. This refactoring introduces a more robust, stateful approach to interacting with the Arduino firmware, replacing previous ad-hoc serial handling with a structured, buffered communication layer.

lib/firmware · high confidence

New platform target implementations for GPIO, LEDs, network, RTC, and system tasks

The platform/target directory now contains new, dedicated modules for managing hardware and system functions on the device. This includes a CircuitsGPIOHandler for debounced pin bindings, a CircuitsHandler for controlling multiple LED colors and blink patterns, a Network module using VintageNet for Wi-Fi and Ethernet configuration, an RTCWorker for synchronizing time via I2C, and SystemTasks for rebooting or powering off the device. These changes provide the underlying hardware abstraction layer for the Farmbot OS platform.

platform/target · high confidence

New static assets for telemetry, logging, and UI icons

Added a new JSON schema for Farmware packages (farmware\_schema.json) and a suite of SVG icons (ethernet, eye, key, lock, none, unknown, warning, wifi) to support the user interface. Introduced a JavaScript logger (logger.js) that displays log entries in a table via WebSocket, and added telemetry visualization components (telemetry.html and telemetry.js) that render a real-time CPU usage line chart using Chart.js.

priv/static · high confidence

New system call modules for device control and state management

The \lib/os/sys\_calls\ directory now contains new, dedicated modules for managing core device operations. \ChangeOwnership\ handles the process of transferring device ownership, including credential updates and a soft restart. \CheckUpdate\ manages firmware update checks and reboots, including a new \uptime\_hotfix\ that applies updates based on local timezone and OTA hour. \FactoryReset\ provides logic for resetting the OS or Arduino firmware. \Farmware\ controls the execution and timeout management of farmware scripts. \Movement\ exposes functions for querying coordinates, moving the bot, and calibrating axes. \PinControl\ adds support for toggling and reading digital/analog pins, including new \toggle\_pin\ support. \PointLookup\ retrieves point data and calculates plant age. \ResourceUpdate\ handles updates to devices and points with templating support. \SendMessage\ renders templates with position and pin data. \SetPinIOMode\ configures pin modes. These changes introduce new capabilities for ownership transfer, update scheduling, pin control, and movement, while also refactoring existing logic into these specific system call modules.

_lib/os/sys\calls · high confidence

New system health monitoring workers for disk, memory, temperature, and network status

The platform now includes dedicated background workers that periodically collect and report system metrics to the bot state server. These include disk usage, memory usage, SoC temperature, CPU throttling status, uptime, available video devices, and Wi-Fi signal strength. Each worker runs on a timeout interval and reports its data via the BotState interface, enabling the system to track hardware health and connectivity conditions.

_platform/target/info\workers · high confidence

Behavioural changes

Added public keys for production and staging environments

New public key files (prod.pub, staging.pub) have been added to the priv directory, providing the necessary cryptographic material for production and staging environments.

priv · medium confidence

Centralized configuration for environment-specific settings

The application's configuration has been restructured into environment-specific files (config.exs, dev.exs, target.exs, test.exs) to manage settings for different deployment contexts. This change introduces environment-specific database paths, logger backends (e.g., RingLogger for targets, console for dev), and platform-specific initializers (Host vs. Target). It also adds Rollbar error tracking support for production environments and configures the Exqlite JSON library and Tesla HTTP adapter.

config · high confidence

Measure Soil Height farmware rewritten in Python

The 'Measure Soil Height' farmware has been completely rewritten in Python, replacing the previous implementation. This update introduces a new core module for environment and device abstraction, a calculation engine for processing stereo images and optical flow to determine soil height, and a plotting module for visualizing calibration data. The farmware now supports multiple stereo image sets, automatic calibration parameter adjustment, and detailed logging of the calculation process.

priv/farmware/measure-soil-height · high confidence

Redesigned and expanded the network configuration wizard

The network configuration flow has been completely restructured into a multi-step wizard. Users now select a connection type (WiFi or Ethernet) on a dedicated network page, which then routes to specific forms: a list of available WiFi networks with signal strength indicators, followed by a credential entry step that supports WPA2-PSK, WPA-EAP (802.1X), and open networks. A new 'Advanced' settings section allows users to configure the regulatory domain, DNS servers, NTP servers, and static IP addresses. Additionally, the firmware selection page now includes a progress indicator for flashing, and the configurator UI has been updated with new styling and layout components.

priv/static/templates · high confidence

Updated Arduino firmware for Genesis Express and Farmduino devices

The Arduino firmware binaries for the Genesis Express, Express (k10, k11, k12), and Farmduino (k14, k15) devices have been updated. These changes include new firmware versions (e.g., 6.6.26, 6.6.25) and bug fixes, ensuring compatibility with the latest system releases.

priv/firmware · high confidence

Updated Erlang VM configuration for the release build

The release configuration for the application has been updated with a new \vm.args.eex\ file. This change configures the Erlang Virtual Machine with specific runtime options, including distributed Erlang settings, shell history, heartbeat monitoring, and Elixir/IEx startup parameters. This modifies how the application is launched and monitored at the VM level.

rel · medium confidence

Updated Farmware Tools to version 3.5.6

The Farmware Tools library has been updated to version 3.5.6. This update includes changes to the core utility modules, including the environment variable handling, device state retrieval, and HTTP request wrappers for the FarmBot Web App and device API.

_priv/farmware/farmware\tools · medium confidence

Test coverage

Added comprehensive Lua test suite for core automation functions; Added comprehensive test coverage for the Celery script compiler; Added test coverage for OS-level system calls and firmware update support; Added test coverage for the OS configurator components; Added tests for API sync, preloading, and worker components; Added tests for asset models and commands; Added tests for asset, bot state, and CeleryScript execution; Added unit tests for Lua helper functions; Added unit tests for Lua integration components; Added unit tests for MQTT handlers and support modules; Added unit tests for config storage, LED handlers, and RSA encryption; Added unit tests for core FarmbotOS modules; Added unit tests for farm event workers; Added unit tests for firmware communication and control modules.

Dependencies

Updated project dependencies and lockfile

The \mix.exs\ and \mix.lock\ files have been updated to refresh the project's dependencies. This includes updating various Elixir packages such as \nerves\, \ecto\, \phoenix\_html\, and \vintage\_net\ to their latest compatible versions, ensuring the build environment and runtime libraries are up to date.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 48 → 39 (-8.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 96 → 93 (-3.4)
  • Architecture 100 → 98 (-2.0)
  • Maturity 35 → 35 (-0.1)
  • Readiness 55 → 56 (+1.1)
  • Security 44 → 66 (+21.8)
  • Accessibility 24 (new)

Resolved (23)

  • Concentrated knowledge decay
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (11 lines × 2) (lib/os/sys_calls/pin_control.ex)
  • Duplicated block (13 lines × 2) (lib/celery/compilers/axis_control_compiler.ex)
  • Duplicated block (7 lines × 2) (lib/os/sys_calls/pin_control.ex)
  • Duplicated block (8 lines × 2) (lib/core/asset.ex)
  • Duplicated block (9 lines × 2) (lib/os/lua/data_manipulation.ex)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • …and 3 more

New (96)

  • CI installs an unverified third-party binary (.circleci/config.yml)
  • Calculate.calculate (cognitive 16) (priv/farmware/measure-soil-height/calculate.py)
  • DB.identify (cognitive 31) (priv/farmware/plant_detection/DB.py)
  • DB.identify (cyclomatic 23) (priv/farmware/plant_detection/DB.py)
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Dormant codebase
  • Duplicated block (12–24 lines × 2) (lib/os/sys_calls/pin_control.ex)
  • Duplicated block (14 lines × 2) (lib/celery/compilers/axis_control_compiler.ex)
  • Duplicated block (7 lines × 3) (platform/target/info_workers/disk_usage.ex)
  • Duplicated block (8 lines × 2) (lib/core/asset.ex)
  • Duplicated block (8 lines × 2) (lib/os/lua/data_manipulation.ex)
  • Duplicated block (8 lines × 2) (lib/os/sys_calls/pin_control.ex)
  • FileTooLong: plant_detection/Image.py (priv/farmware/plant_detection/Image.py)
  • HackComment (lib/os/lua.ex)
  • HackComment (test/celery/scheduler_test.exs)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • …and 76 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

FarmBot/farmbot_os was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 65b5c05d62578df67de175a27e655e121620c22d — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.