I purchased a couple of LoRa data loggers and a LoRa gateway from Seeed Studio probably more than a year ago. I liked these data loggers because of the quality of Seeed products, great customer support, reasonable price, and that they could each accept two analog inputs.
The analog inputs allowed me to add Vegetronix VH400 soil moisture sensors, which I’ve been impressed with from past use in a WiFi irrigation system I built. Moving to LoRa isn’t necessary, but as far as that goes, neither is an automated garden irrigation system!
Part of the appeal of the Seeed system is that they have a Home Assistant integration where I can set the gateway up using Chirpstack to transmit the data to my Home Assistant system and access my sensor data for data logging and irrigation system control.
This worked in my test setup for several months, but after a Home Assistant update, it stopped working several months ago. At least I thought it had. I posted an issue about this on Seeed’s github page but never really got a good answer. I’m not blaming them… they don’t have to make integrations just to satisfy my needs, but it was disappointing that it didn’t work.
I checked all of the settings in my Home Assistant setup, even reinstalled everything (three times!). No luck. I next tried a fresh install of everything on a different Rasberry pi (Home Assistant runs on a pi). Still no luck.
Going back through Seeed’s installation wiki, It said to check the gateway to see if it was transmitting. I logged into the gateway and it was. I then checked to see if the pi was getting data in the MQTT broker in the Home Assistant setup. It was too. I was on to something!
I dusted off my Node-Red skills… well, not so much skill as tinkering. I haven’t used Node-Red as much as I used to since I don’t build (solder and program) as many microcontroller sensor and switches as I used now that Home Assistant has so many integrations and the automations have improved so much. Anyway, with the help of ChatGPT, I was able to bring the data in via MQTT, parse it for what I needed, format it to be recognized as sensors that MQTT could discover, and bam! It works.
I set up a simple dashboard and can now see and log the data. This is just an indoor set up for now. No control or output to a database. Rather, it is the first step in rebuilding BBAGIES (BrummBilt Automated Garden Irrigation Efficiency System) v3ish.something. BBAGIES will allow me to monitor four zones in my garden and control a pump from a IBC tote to turn the system on when a moisture level threshold is reached and off when the moisture level is sufficient. This will be on a zone-by-zone basis. I’ll have to establish the moisture level thresholds. I’ve tried calculating a moisture percentage in the past, but in reality, the raw data from the sensors and my experience and observation will let me set these thresholds.
More to come (if I can actually make myself sit down and write and post blog updates)!!
Leave a comment