Sending data via LoRa on ESPHome

If anyone would like to use our company carrier grade Chirpstack core, then message me directly. If you add your own gateways, I am happy to offer this free of charge… This model works well and is how we have launched our own “National” (Yes Jersey at 9mi x 5mi is classed as a country :slight_smile: ) LoRa Network on the island of Jersey…

From what I reading, using MQTT is the best way to get the LoRa data into Home Assistant?

Yes, via openmqttgateway.

1 Like

FWIW I ended up giving up here. I thought what I wanted to accomplish was relatively simple, but getting a LoRa enabled ESP to communicate with my WisGate Edge/rak-7240 turned out to be more complex that i imagined. Maybe I will give it a shot again if there is tutorial that can walk me through it.

While I don’t have anything that’s ready to go yet I do have an external component for a LoRa gateway I’ve been working on. Right now it’s actually just a receiver since that’s my requirement and what I focused on. But it’s not LoRaWAN - I have some sensors I coded up (not using ESPHome) that send a JSON payload over LoRa that my gateway receives. I have sensors for battery level, RSSI and a binary sensor (motion) working right now. These are sensors on the ESPHome device, so Home Assistant gets their status over the API. And right now it’s just the gateway running ESPHome - the remotes I’m using aren’t even ESPs so I programmed them using the Arduino IDE.

I have some work if I’m going to make it usable for anyone else. It doesn’t do any encryption right now - the JSON is clear text. And right now it only supports the SX1262 chip since that’s what I’m using. I am using the RadioLib library for LoRa support. If/when I get this to where it’s more usable I plan to make a post in this forum category. Right now it works very well for my use case - but I do want to add encryption even just for my own use. I was having trouble finding a library that would work on the SX1262 I’m using for the remote sensors so skipped it with the intention of revisiting.

1 Like

But how can I then react in esphome on message from LORA gateway | OpenMQTTGateway v1.5.1 ? I would like to ie. trigger gpio to UP state etc.

It seems it would still require C++ code.

ESPHome currently does not support LoRa.

You could add an automation into HA based on MQTT topic content from OMG Lora to change the ESPHome entity.

I would like ie turn on power socket in remote location connected to ha us8ng lora p2p

You don’t need ESPHome to do this:
HA->OMGLora->LoraNode(power socket)

The LoraNode can be developed with this program as a base:

1 Like

Hi @hummingbear
I have a Lora32 flashed with MeshTastic (TTGO LoRa32 V2.1 _ 1.6 Version 433 Mhz) and I try to capture MQTT message broadcasted in my intranet by my HA OS …
Do you have a small YAML code or road for me (I’m not an expert, just beginner).

I would not bother with 3rd party mqtt brokers etc… just get Chirpstack up and running, it has everything you need. This will save you a LOT of frustration and time. The radio side, can be tricky enough without having to fiddle with stuff that is included right out the box with Chirpstack. You can then either bridge a MQTT broker in HA or simply connect your MQTT client in HA to your (Mosquitto) broker in chirpstack

For bridge use mosquitto 2.0.14 only.

2.0.15 have issues

Hello. I would apreciate so mucho if you show the code . I´m working on a Meteorological station that comunicate via LORA sending the data over the air and a receptor that cauch the data and put it in the esphome.
I don´t know how to get the data by a custom text sensor (by SX1278).
Thank you very much in advance

What LoRa network are you using?

https://flasher.meshtastic.org/

1 Like

Meshtastic is hard to interface.

Talking via serial to Meshtastic node, it’s not a optimal solution.

Anyone can create a custom component to ESPHome.

As ESPHome use C++ it’s a little more complicated for newbies.

Proof concept for Tasmota:

[edpbox-dev/tasmota/xdrv101-gw-lora at dev · nikito7/edpbox-dev · GitHub]