Hi FarmBot Community,
Today we released a version 5.0.0 of the FarmBot software stack! We focused the last six weeks of development on stability, under-the-hood changes, and a grab bag of new features that make using the web app quicker. Here we go:
The largest changes to the web app are ones most people will not see. Before, we had two code repositories - one for the frontend, and one for the backend API. We originally chose this architecture because we felt it would make casual open-source contributions easier and less intimidating. However, having two repositories for the single app has only confused people, made development/self-hosting setups more difficult to get running, and hindered our abilities to develop a real-time messaging API and continuous integration toolchain. The two codebases have now been merged into a single repository named FarmBot-Web-App.
Merging the repositories has allowed us to better use code testing tools. You will now see in the repository README a few badges for the code coverage. While the coverage is still low, Gabriel, Rick, and Chris have been writing tons of tests that will allow us to ensure we don’t introduce bugs or regressions into the software. If you are “watching” the repository, you will see automated emails after every pull request showing how the coverage is improving with the new code.
Because of the above two changes, we have also been able to set up a continuous integration toolchain. This means that every time a pull request with new code is submitted, our continuous integration server “tries it out” and runs all of the tests. If it passes all the tests, we know that the code can be safely merged. The continuous integration server makes testing faster and more consistent, allowing us to begin deploying to production with smaller updates more often.
Ok, now for some things that you can actually see:
The form for creating Farm Events has been streamlined. Now by default, events will not be repeating events. If you want to make a repeating event, you can click the checkbox and then add the repeat details. Note that we don’t currently support repeating regimen events - only repeating sequence events.
Search-filterable dropdown menu for selecting a Sequence or Regimen for a Farm Event:
Regimen items are now displayed in the calendar along with the parent regimen event.
The controls widget now shows the current motor positions in addition to providing the absolute movement input fields. There are also some extra toggle switches located in the advanced menu for viewing raw and scaled encoder positions which might help some people (especially DIY builders) debug their encoders and settings. (Thanks @klimbim for the suggestion)
Search-filterable Sequences and Regimens Lists allow you to quickly find and select one for editing.
We added search-filterable dropdown menus for selecting a Sequence in an Execute command.
And for importing coordinates into the Move Absolute command.
There are new buttons for selecting/deselecting all of the available days when adding a Sequence to a Regimen.
The Farm Designer now uses Spread values from OpenFarm (how big a plant is expected to grow) when rendering the filled-in green circle on the map, allowing you to better plan out your garden layout.
Hotkeys for syncing, navigating pages, and adding plants and events. See the hotkeys menu by pressing
ctrl + shift + /
We implemented a “Last Seen” feature in the Device Widget so you can see when FarmBot last connected to the cloud server.
- The URL of the web browser now changes when navigating between sequences and regimens. This allows you to use the browser back and forward buttons for faster navigation, and refreshing brings you back to where you were.
- The Sequence or Regimen being currently edited is now highlighted in the list.
- Better empty-state formatting and messages on the Sequences and Regimens pages.
- The date has been added to all status ticker messages.
- The main navigation is sticky, so it always stays visible on the screen. Thanks @creimers for the suggestion)
The latest Arduino Firmware that is bundled with FarmBot OS v5.0.0 has many improvements:
- Rotary encoders are now read more quickly. Technically speaking, Tim has moved the stepper movement code out of the interrupt and into the main loop function. This allows interrupts to run faster because the interrupt is now only responsible for reading the encoders. Please note that this has come at a very slight cost to the smoothness of movements. We will continue to improve the firmware and push the Arduino to its limits to try and get both movements and encoder readings as fast and reliable as possible.
- The new firmware echoes all commands sent from the Rasberry Pi which makes communication between the two much more reliable. This addresses issues related to skipped Sequence steps.
- When the bot is e-stopped then it will enter into a “safe state” where it turns off all peripherals and stops the motors. An additional toggle switch in the Motors category in the Hardware widget allows for “E-stop on movement errors”, which will also send the bot into a safe state when a movement fails to complete after its max number of retry attempts. The user will need to unlock the device from the web app to have it resume work in either situation. This feature will prevent flooding the garden when an e-stop happens while watering.
- The movement retry feature has been moved from the OS into the firmware.
- Unlocking the device from an e-stop no longer requires a reboot, so unlocks happen much more quickly.
Most of the changes to FarmBot OS were to support the new features and changes in the other codebases. We did however:
- Lay more groundwork for the farmware plugin system, which is what the weed detection system uses.
- Add download progress messages so you can see that FarmBot is downloading an update or farmware plugin. Note that you won’t actually see these messages until the next release is downloaded.
- Switching to a RabbitMQ message broker - this will solve issues where FarmBots or web browsers behind a school or company firewall are blocked from using the current MQTT ports (which prevents communications). This will also allow us to add real-time messaging abilities to the web app (think: better reliablility, faster log syncing to backend, etc)
- We plan to have all regimen events start at midnight, because it doesn’t make much sense to start a regimen part-way through a day.
- We plan to allow you to back-schedule regimens, so you could for example transplant a three-week-old-plant into your FarmBot, back-schedule a regimen for taking care of the plant from seed, and then the first three weeks worth of items in the regimen would be skipped.
- Calendar filters that allow you to more easily find events
- A jump-to-today button on the calendar in case you scroll really far and want to get back to today
- Some network status indicators in the Device widget and toast notifications for the app. These will help you debug connectivity issues, especially in cases where FarmBot or your web browser are behind a school or company firewall that is blocking access to the MQTT message broker.
- Deploying weed detection farmware.
- An ability to click-to-add plants in the farm designer so that the experience is more compatible with touchscreens and eye-tracking software (for people with disabilities), and so adding many plants at once is much faster.
While many of the features in this release make working with the app and bot faster and easier, we’re still working on addressing the tediousness discussed in the last software update. Now that we have the technical infrastructure in place for smaller updates that are more frequent, we hope to move towards weekly production pushes and more regular update posts. Stay tuned!