Controlling remote devices from within FarmOS

@MBConsultingUK That sounds like some cool work you’re doing!! Would love to hear more about your ideas for the demo farm. I’ve been thinking about that & this (bi-directional IoT in farmOS) a lot more lately…

FarmOS publishes state changes to a messaging bus (I’d suggest MQTT here as it seems to be the most used in the IoT space). At this point “something” (either a hub as in (1) or the devices themselves) would connect to the message bus and act based on the messages they receive

Just re-reading your first post, I definitely agree that Option 2 makes the most sense. I’m quite interested in MQTT as a means of passing this data around. If farmOS could push state changes out over MQTT (when a log is created, a harvest is completed) and listen to data from sensors coming over MQTT (temperature, gate open/closed, etc), that would allow for a very robust system!!!

In Schedule a log based on a quantity value @mstenta mentioned the Drupal Rules module. This is an interesting concept that would allow some of this functionality internally within farmOS (create a log once another log is finished, etc) BUT I think this could be done externally, too.

I came here to mention node-red… this could be a neat IoT tool outside of farmOS. Have you heard of it @MBConsultingUK? It has some great ways of creating rules with “Nodes” - various inputs and outputs. The community can submit additional “Nodes”, and can also publish rules as “flows” and share them in a JSON format.

This is WAY cool - in 5 minutes I was able to download node-red and create a webpage that displays subway stations in San Francisco via this flow someone shared In another 5 minutes I created a flow that re-routed the results of a farmOS API request… You could easily create a flow that listens to an MQTT topic and sends the data via HTTP POST to a sensor in farmOS

1 Like