I’ve finally reached a point with my Farmbot where I feel I can contribute some of what I’ve done back with the community. I’ve developed two projects for my personal setup and am considering sharing them more broadly if there is interest.
DIY Bill of Materials (BOM)
A lot of my setup was built from scratch. The farmduino, UTM and plates are from the Farmbot store (thankyou to Roy for helping with this); all other parts are self-sourced or 3D-printed. I’ve put together a supplier list and full costings for everything I purchased but it’s missing some details
Home Assistant Integration
I managed to get MQTT-based control of peripherals: rotary tool, vacuum, water and lighting, and can trigger FarmBot sequences and emergency-stop from Home Assistant. I also can read current states of a number of sensors. This was done largely with the help of ChatGPT though so I wouldn’t be able to provide any support for it.
Before I put time and effort into either of them though I’d love to know if there is any interest.
Great! I’ve found it useful so far for notifications when it stalls and skipping watering during rain.
what sensors/switches etc. do you think would be useful to expose? So far I’ve got
all peripherals
X, Y, Z coordinates (individual sensors)
e stop sensor/switch
I can also trigger sequences with buttons but it’s tricky because you need to know the sequence ID which I believe you can only get using an MQTT browser. Unless anyone has a better idea I think I’ll just leave documentation on how to add your own sequences
A Sequence Id can only be acquired through the Web API.
Sequence objects are “resources” which you can GET, DELETE, POST and PATCH I believe.
You may need to fetch all Sequences and filter them to choose the one you need; the Id number is a property of that object.
Thanks for the reply, I discovered my sequence ID by inspecting the MQTT traffic when running the sequence using the web app, I’m guessing this just makes use of the fact that the web app is connected to the API to get the sequence id.
Your approach of calling the Web API’s /api/sequences endpoint and filtering by name makes a lot of sense. I’ll have to play around a bit more but would it be possible then to automatically fetch all the sequences in home assistant using the API? If so I can probably use that to just make a button for every sequence automatically
If you need just 1 sequence and you already have its id number then append it to the URI /api/sequences/65372 for example.
Aha! Good job. MQTT carries just "command and control* messaging (e.g. find_home, execute a sequence, pin_control, etc. is not used to manage Assets a.k.a. “resources”)
Cheers for the advice, got it to work as a dropdown sequence selector with the only caveat being you currently can’t include a plant/group for the sequence to use. Anyone interested can check out the full integration here: https://github.com/sambiam/Farmbot-for-Home-Assistant.git