Connecting sensors to FarmOS with Node-RED

https://nodered.org/ Seems like a good flexible GUI for IoT programing.
It is provided by default on Open Energy Monitor and GrovePi so there is some examples to look at.

I am also using it in https://github.com/chrowe/ansible-pi

I figured out how to send data to FarmOS

Example code https://gitlab.com/snippets/1701266

Now trying to get GrovePi sensors working. I created
https://github.com/DexterInd/Raspbian_For_Robots/issues/168 but maybe this something that comes with Raspian.

I got it working!

Pretty simple once you figure out what is needed.
Starting from a basic GrovePi setup like http://forum.goatech.org/t/grovepi-basic-setup-reading-sensor-values/96 all I had to do was

  1. Install npm and a newer version of Node-Red that has the ā€œManage Palletā€ menu option. I used the official script from https://nodered.org/docs/hardware/raspberrypi for this
  2. Add https://flows.nodered.org/node/node-red-contrib-grovepi from the ā€œManage Palletā€ menu.

From there you should have some new GrovePi nodes in Node-RED and the options are pretty clear.

I am starting to work on a demo video. If you want do see that let me know, it might encourage me to get it done faster :slight_smile:

Ok, I discovered by accidentally unplugging this pi that Node-RED will not automatically restart unless you run sudo systemctl enable nodered.service as stated on https://nodered.org/docs/hardware/raspberrypi

Hi, Iā€™m new to the forum and just wanted to introduce myself. I couldnā€™t find a ā€˜meet and greet sectionā€™ so I posted it in a section I have specific interest in.

Iā€™m a freelance software/hardware developer in South Africa. I grew up on a farm and itā€™s still a passion, therefore the interest in AgTech. Iā€™ve been tinkering with some farm IoT ideas for a while and looking for like minded individuals. Happy to have found this forum.

I have put together a Raspberry Pi IoT gateway running Node-Red to connect with (potentially) various sensors on low cost cheap hardware via MQTT. So far I have used the ESP8266 running https://mongoose-os.com/. A very cool open source embedded OS.

1 Like

Wow this is so cool, Iā€™ve never seen that before. Iā€™m super impressed. If you get something cool up and running that ag-specific in itā€™s orientation using Node Red, Iā€™d love to see a walk through video (even a poorly edited one). @mdc you should check this out - watch the video at the beginning of the node red page.

Check out http://farmhack.org/tools/collecting-sensor-data-farmos-using-grovepi-and-node-red for a tutorial on how to do this with a GrovePi. I also have a video of this

2 Likes