Is there any interested in creating an API to allow importing data / live datastream into FarmOS? Is anyone using the AgGateway data format? http://www.aggateway.org/
I am looking to send data from this sensor from ROS (ros.org) to FarmOS https://www.amazon.com/CJMCU-8128-Temperature-Humidity-Pressure-Precision/dp/B07M6DL6DM
Temperature
Humidity
Pressure
CO2
Hi Matt @ROS-Agriculture! I haven’t worked with AgGateway, but I’d love to think through what an integration might look like.
Regarding sending data from a CJMCU8128 sensor, you could use the “Sensor Listener” module that comes with farmOS. https://farmos.org/guide/assets/sensors/
You basically just create a new sensor asset in farmOS for the device (optionally with location). Sensor listeners have a unique URL endpoint that you can post data to as JSON.
For example:
URL: https://myfarm.farmos.net/farm/sensor/listener/xxxxxx?private_key=yyyyyy
JSON: { "timestamp": 1541519720, "temperature": 76.5, "humidity": 60 }
You can put as many pieces of data as you want into that format. timestamp
is not required, it will be auto-filled if you don’t provide it based on when farmOS receives it. All of those API details are documented here: https://farmos.org/guide/assets/sensors/
Thanks for the link and information.
One thought was to go from ROS -> AgGateway -> FarmOS That way the data would be in a common format.
Maybe the first step would be just from ROS -> FarmOS
Matt
That makes sense - I could see either/both approaches being useful in different situations. I’m not familiar with AgGateway, but I could help you get ROS -> farmOS working. It’s pretty straightforward if you have the ability to send the sensor values as HTTP requests.
There are a couple of tools in ROS - http://wiki.ros.org/rosbridge_suite http://wiki.ros.org/roslibjs
I haven’t tried streaming data but I think it could helpful to be able to send data logs to FarmOS from an automated system (greenhouse, IOT device).
Yea that would be great!
I’d like to explore triggering more things based on sensor values in farmOS as well… we already have basic email/text alerts, and we’ve given some thought to setting values that trigger relays (so actions can be initiated remotely).
Ultimately I think farmOS can play a role in that kind of setup, but there always should be independence in the remote device itself, so that we don’t introduce a dependency on network connectivity for something critical to happen.