>>> Join Us in the Fight Against Air Pollution

AirGradient Forum

AirGradient + LoRA

I’ve been having some WiFi reception issues for some of my devices, notably my Solar power monitoring solution (A Pi running haproxy connected to the service port of my solar monitor so I can pull stats and push them into Clickhouse and visualize in Grafana). For that solution I was looking at XBee 900 as I’ve used that before (including with AirGradient) but realized LoRA might be a way better option.

Which got me wondering if anyone has extended any of the AirGradients with LoRA capability? I see there’s an ESP32 LoRA module available but it’s not pin compatible with the Wemos D1 (or at least it has a lot more pins and won’t fit in the same footprint).

LoRA might be a good option for the outdoor sensor solution (in fact my own DIY weather station uses XBee 900). At least at my house, the radiant barriers plus the number of Wifi networks around here just crush any Wifi signal outside my house.

Anyways before I went down this path I thought I’d check to see if anyone has done this already and had some thoughts.

Almost like you read my mind. No, I haven’t, but I did go down the LoRa rabbit hole last weekend with a bunch of reading and looking at those Lilygo boards hoping to do exactly what you’re proposing here.

Im also interested in this topic. I have some experience with lora and know how it should work and have a TTGO lora nodemcu.

For only Lora you need a sender and receiver module so thats more work to setup. Otherwise you could use lorawan and send your data trough the thingsnetwork for example. Setting up lora is a lot more work than simply using wifi and mqtt. Lora is an oneway system by nature and losing data is common if you don’t account for it.

I think lora is a bit too much to overcome the wifi range. I have rf 433mhz weatherstation sensors and receive them with rflink. Maybe its possible to integrate a rf transmitter but it still needs a lot of coding.

No experience with ble, xbee900, zigbee and their range.

Xbee 900 and LoRA seem somewhat similar. Xbee is presented as a serial interface. The AirGradient in my darkroom is out of Wifi range. The darkroom shed and for whatever reason it dislikes wifi and cellular - that also kinda makes it my tech escape room :stuck_out_tongue:

Anyways for that one I ended up just spitting out serial which I capture via a SparkFun Xbee USB dongle on my Home Assistant Pi. I send my non-AG weather station data the same way.

On the receiver side, it’s just a Python script (I need to rewrite it in Go at some point) that listens on serial for certain strings and does things with them.

It’s not as simple as Wifi + MQTT (which is what I use for the AG that’s inside my house) but it’s not so bad and unlike my Wifi is VERY reliable.

I do agree it’s not an option for the typical AG user perhaps but then again I’m not a typical user :wink:

Lora is not a one way system and you can send data back to a device over Lora from a Dashboard.
A device listens for remote control commands on LoRaWAN Port 2. Multiple commands per downlink are possible by concatenating them, but must not exceed a maximum of 10 bytes per downlink.

Send for example 83 86 as Downlink on Port 2 to get battery status and time/date from the device

Settings can be stored in NVRAM to make them persistent (reloaded during device startup / restart).
Using this on another project with ESP32 sensors spread across a town with TTN as backhaul to a Dashboard.

You will need to use a TTGO ESP 32 type device as someone mentioned in this thread. forget Wemos D1

Hope this helps. Waiting for my Airgradient DIY boards.

Enjoy your weekend!

Much time has passed since this post but I’m still looking at LoRA and indeed as warned it is kinda complicated. The lack of interoperability burned me while testing things tonight for another project. I find LoRAWAN, as I understand it, to be way more than I’d need. I still really just need some LoRA senders with a listener connected to my HomeAssistant Pi or my NAS over serial. Also gives me a reason to learn more about the whole thing perhaps for future projects.

The WaveShare modules almost got me there. They have a USB dongle and a Pi-Hat. I was under the assumption that since they used the same LoRA chip they would work, though they don’t :confused:

That particular project is actually for reliably grabbing my solar telemetry directly off my SunPower module. It’s an esoteric config where I have to setup a proxy to pull the raw stats down off the wired service port and forward it over Wifi. But since my wifi signal is wildly unreliable there (doesn’t help the monitoring box is near the ground), I need something else and would prefer a push rather than pull solution anyway.

I mention all that to say, I noticed there are now more LoRA options that work with ESP32 and makes me wonder if one might be a drop-in for the AirGradient modules. If so, I might end up just converting all my modules to LoRA so I have a single consistent way to grab and forward the data. I’m using several of these now, although at present do not have the outdoor solution (still waiting on either figuring out a solar powered option or, preferably, AirGradient coming up with a recommended option since my DIY weather station is current solar powered). I noticed the Waveshare modules use a device ID of sorts but sounds like that might not be standard/required for LoRA itself (noting folks have mentioned collisions when reading up on things).