NorthernMan54 / rtl_433_ESP

Trial port of the rtl_433 Library for use with OpenMQTTGateway on a ESP32 and a CC1101 Transceiver
GNU General Public License v3.0
475 stars 106 forks source link

Can rtl_433_ESP be used/adapted to read smart meters at center frequency ~912MHz (902-928MHz industrail band) similar to rtlamr project #131

Open puterboy opened 3 months ago

puterboy commented 3 months ago

Current Situation

Will rtl_433_ESP work (or can it be adapted) to decode smart meter messages on the ~912MHz frequency range? This can be done on Windows/Linux using rlt_sdr dongles with the rtlamr software https://github.com/bemasher/rtlamr. It would be great to do this on an esp32 rather than having to use a "bigger" separate PC/RPi device.

Proposed Change

Add rltamr support to rtl_433_ESP

Additional Context

Assuming it is possible, do you think the LilyGo LoRa32 V2.1_1.6 dev board with 915MHz crystal [Q211 or maybe Q212] would work?

NorthernMan54 commented 3 months ago

This from my 915Mhz Lilygo board ( I'm not sure if its a Q211 or Q212, but I don't think it makes a difference, as the difference appears to be just the prepackaged firmware ). So 912Mhz should be supported

Screen Shot 2024-03-16 at 10 53 55 AM

The challenging part here would be the signal decoder, as rtlamr is written in GO and it would need to rewritten in C to support the ESP32 chip. Which is a massive task. With the rtl_433 port it was pretty straightforward as it is written in C already. Personally I think you should just get a RPI 4/5 with the rtl_sdr dongle and use that.

puterboy commented 3 months ago

The challenging part here would be the signal decoder, as rtlamr is written in GO and it would need to rewritten in C to support the ESP32 chip. Which is a massive task. With the rtl_433 port it was pretty straightforward as it is written in C already. Personally I think you should just get a RPI 4/5 with the rtl_sdr dongle and use that.

This is how I am doing it now but I was hoping to streamline things and reduce size/power consumption/complexity by just using an esp32 board. BTW, I now have the rtl_433 working great on my lilygo board and it's awesome so far...

Entropy512 commented 2 weeks ago

These are already in the list of supported protocols in the README:

Registering protocol [44] "ERT Interval Data Message (IDM)"
Registering protocol [45] "ERT Interval Data Message (IDM) for Net Meters"
Registering protocol [46] "ERT Standard Consumption Message (SCM)"

and Registering protocol [92] "Neptune R900 flow meters"

Edit: The challenge here might be that the various AMR meters are spread spectrum systems that hop channels - while the author hasn't confirmed it, rtlamr appears to rely on a very high sampling rate not just to have many samples per symbol, but also to be able to capture multiple channels at once. Since the modulation is OOK, all rtlamr appears to do is decide "was there energy anywhere in my sampling bandwidth" to allow simultaneously monitoring a pile of channels at once.

per https://fccid.io/P2SNTGECDR900D/Test-Report/TEST-REPORT-897476.pdf the channel spacing was measured at 131.6 kHz - I suspect it's really 131.072 as that's exactly 4x the data rate. Looks like one of the channels is almost exactly 911.1 MHz

Edit: After running rtl_433 a bit with the -M level command and the sample rate cranked up to match what rtlamr uses, it's 125 kHz channel spacing, and approximately 11 minutes 40 seconds for a complete hop cycle (e.g. after 11m40s it'll return to a frequency and the sequence of frequencies starts repeating)