LoRa mailbox counter

I want to add a LoRa ESP32 board into my mailbox, already tested the range and everything. Not sure which is the best way to proceed, so laying out my thoughts here.

I have an ESP8266 with OpenMQTTGateway which relays the 433MHz devices. I’m thinking of replacing that one with the ESP32 w. LoRa module and stick the 433 receiver on one of the pins. Hopefully the OpenMQTTGW supports LoRa, though should not be too hard to write something simple that just takes whatever is incoming and pushes it to a topic.

Since the reception might me spotty, I will keep a counter on the ESP32 inside the mailbox. When the switch or sensor is triggered, the counter is incremented. The module will send once a minute the counter back to the gateway (just plain LoRa, not WAN).

I probably need to create an automation to trigger a mailbox alert, not sure how to do that. Keep a global variable based on the received LoRa message and trigger if the new variable is bigger?

There might be better ways to do this.

I would get a dragino open close sensor, a heltec dual channel gateway, and then spin up chirpstack in docker which will then forward via mqtt into home assistant directly.

Esp libraries for LoRa are not great…. All of the above kit should cost no more that $50

Then for automation, i would trigger an alert on open and close as there will more than likely be packet loss

1 Like

Could you give an idea of the range needed ?

The sender sits in a metallic mailbox, I need about 15m range through at most one wall (or a door) and the metallic box. A 433 PIR sensor sometimes gets through, 99% of the time it doesn’t. With the LoRa thingie I get more than double on standard power settings with ~50% success rate.

Not sure why the success rate is so low, it performs the same if the units are next to each other, but I didn’t spend too much time playing with it. Antenna orientation seems to affect things in a big way, but non-intuitively.

That’s not a lot and should be covered by 433mhz regular sensor with good antenna placement maybe BLE also.

What 433mhz gateway antenna do you use?

If you are using a network core, like chirpstack or ttn, you need to check on which packet forwarder you are using. The older ones used udp which did drop loads of packets…