Ambient Weather F007TH, AcuRite 00592TXR/06002RM, LaCrosse TX7U, Auriol HG02832 (IAN 283582).
I have written C++ code for receiving data from temperature/humidity sensors Ambient Weather F007TH (~$10) with cheap RF 433MHz receiver like RXB6, RX-RM-5V, etc.
C++ is not my primary language (as well as English) but still I implemented some non-trivial features:
- I used pigpio library to catch interruptions. The handler of interruptions tries to filter short spikes, long intervals and also drops short sequences of acceptable intervals. Lengths of intervals are stored in cyclic buffer.
- Decoding is done outside of the handler in another thread. It means that support for other protocols can be potentially added.
- The decoder tries to interpret data after and before preamble. The sensor repeats its message 3 times. So this feature helps to successfully decode chunked sequences with missing preamble at the beginning. Of course, checksum is checked in any case.
- Decoded messages are queued and read by main thread (or any other thread). I provided a code for printing the data and generating JSON.
The code should be compiled and linked with argument -pthread and with libraries rt and pigpio. For unknown for me reasons the code does not work if it was compiled with optimization. But I am not very familiar with C++. If anybody knows why it happens then I will be glad to know it too. It is possible that it happened because I used cross-compiler on my WIndows machine.
This proof of concept program demonstrates better rate of successfully received messages than rtl_433 with SDR on my Windows machine. I have 8 sensors in my house and I am able to receive data from sensors on distances more than 30 feet through walls .
The code is available on GitHub https://github.com/alex-konshin/f007th-rpi
But I just submitted it without details.
I know that I have to provide more details and I will do it if anybody really needs it .