Plant soil monitoring LoRaWAN TTN

I have been using LoRaWAN technology for soil monitoring on the farm. LoRaWAN has 2 huge advantages over WIFI. Lot bigger coverage or range and lot less battery power needed. Just an example we are talking about kms instead of a few 100 meters, or year long battery life instead of 15 days or 1 month. LoRaWAN needs a gateway but one can get cheap from Aliexpress. Anyways LoRaWAN is million times better for large farms or large areas. Propagates much better thru walls too.

The LoRaWAN sensor I am using is from here https://tinovi.com/tinovi-shop/
The LoRaWAN gateway is the classic Aliexpress RAK2245 Pi HAT
I am using a Raspberry Pi 4 with the RAK2245 Pi HAT.
Attention: RAK HAT will be pretty hot, so i ordered alu heatsink to it. Kind of a must.
I bought an external LoRaWAN omnidirectional antenna from Mikrotik.

To setup LoRaWAN with The Things Network, i used just some youtube tutorials.

Home Assistant integration info is here: https://www.home-assistant.io/integrations/thethingsnetwork/

The actual code in home assistant is the following for the above sensor:
sensor:

  • platform: thethingsnetwork
    device_id: soilsensor
    values:
    airHum: “%”
    airPres: mBar
    airTemp: “\u00b0C”
    bat: “%”
    devid: “”
    e25: x
    ec: “\u0025”
    leak: l
    lux: lux
    raw: r
    temp: “\u00b0C”
    time: T
    valv: o
    vwc: n

thethingsnetwork:
app_id: gardensoilsensor
access_key: ttn-account-v2._-Q-PsomethingyoucanfindonyourTTNaccount

First you need to make the sensor readings available on The Things Network, you need to use a decoder code to decode the values and use the 7 day free data storage for the data.
Decode function can be dowloaded from tinovi.com

I must say it works great, More expensive than the WIFI sensors but remember its long range and long battery life.


5 Likes

Nice project. I have something similar but need help on the decoder to get the data I want.

1 Like

Hi, Nice project!, and fantastic use case for LoRa.

You should have a look at the plant sensors as well as plant database.

I recently did a project for a customer where we monitor the pants in the drive with the Dragino Soil Sensors… plug in the plant type and then the dashboards give a visual cue as to what the plant needs…
I used Chirpstack instead of TTN as I find the performance in a different class… I also like knowing where my data is stored…

If anyone would like to use our Chirpstack core to have a test out LoRaWAN, PM me…

(House obscured for privacy)

1 Like