- Farmware installation failed
- Farmware execution failed
- Farmware input issues
- The web UI is unresponsive when I run my Farmware
Verify the following:
- The URL you are providing for installation points to the raw Farmware
manifest.jsonfile. (If using GitHub to host your Farmware, the URL should start with
manifest.jsonfile is valid JSON.
manifest.jsonpoints to the raw
.zipfile including your Farmware code.
- The Farmware manifest is compatible with the FarmBot OS version used.
There are several ways to determine what went wrong:
- Try running the Farmware code on your computer. (
pip install --user farmware_toolsfirst if you are using Farmware Tools. See more about Farmware Tools for details.)
- Use an FTDI cable to view low-level device logs.
stderrare sent here.
- Try catching the error as shown below. This method will not catch syntax errors, and should be used only for temporary debugging purposes on the device.
import farmware_tools try: code except Exception as error: farmware_tools.device.log(repr(error))
Only a few specific packages outside of the standard library are available to Farmware. See currently supported languages and packages for a complete list.
Verify the following:
farmware_tools.get_config_valuematches the value for
farmware_tools.get_config_valuematches the value for the
See Hello Farmware Input for an example.
Here are some facts to keep in mind when developing a performant Farmware:
- A log message (or RPC) requires a screen update at the UI layer.
- An update to the bot’s state (such as a change in the
sync_status) requires a screen update at the UI layer.
- A screen update requires CPU resources
Therefore, an unusually high number of log messages (or operation causing the bot’s state to change too often, such as polling) will consume all of the browsers CPU resources.
Some things to look for are:
- Sending too many RPC messages at one time
- Sending too many logs
- Performing a polling operation (Doing RPCs on a timer)
Sending too many logs?
A warning sign that you are sending too many logs is that the server “throttles” your device.
You will receive a message similar to this if you are throttled:
"Device is sending too many logs (%s). Suspending log storage and display until %s."
- Avoid sending excessive logs
- Consider using an event-based architecture instead of performing polling. With few exceptions, polling (particularly across a network) is almost always an architectural mistake.