Github Boards Devices Community Docs Blog

Compiling OpenMQTTGateway with RTL_433 support

Hi

platformio , ESP32 dev board v4 , CC1101 transmitter

i try to compile OpenMQTTGateway 0.9.6 with RTL_433 support

in platformio.ini i use : default_envs = esp32dev-rf

in User_config.h i dont find any related to RTL_433 , so i add a line : #define ZgatewayRTL_433 “RTL_433” //ESP32

i also uncomment : #define ZradioCC1101 “CC1101” //ESP8266, ESP32

but compilation terminated with these errors :

C:/…/OpenMQTTGateway-0.9.6/main/ZgatewayRF.ino:33:39: fatal error: ELECHOUSE_CC1101_SRC_DRV.h: No such
file or directory



include <ELECHOUSE_CC1101_SRC_DRV.h>

                                   ^

compilation terminated.
*** [.pio\build\esp32dev-rf\src\main.ino.cpp.o] Error 1

C:/…/OpenMQTTGateway-0.9.6/main/ZgatewayRTL_433.ino:33:26: fatal error: rtl_433_ESP.h: No such file or
directory



include <rtl_433_ESP.h>

                      ^

compilation terminated.
*** [.pio\build\esp32dev-rf\src\main.ino.cpp.o] Error 1

what i am doing wrong ?

for any hints thanks in advance

Try using the predefined ESP32 rtl_433 environment

[env:esp32dev-rtl_433]

to start with. It already has the rtl_433 lib dep and ‘-DZradioCC1101=“CC1101”’ included.

Hope this helps

hi

thanks for the reply

in platformio.ini
i added the line :
default_envs = esp32dev-rtl_433

in User_config.h
i uncomment :
#define ZradioCC1101 “CC1101” //ESP8266, ESP32
#define ZgatewayRTL_433 “RTL_433” //ESP32

now compiling and flashing works , thanks for that

i get only SYStoMQT mqtt messages :

N: Subject: /SYStoMQTT
N: Received json : {“uptime”:1202,“version”:“version_tag”,“freemem”:141632,“freestack”:4200,“rssi”:-34,“SSID”:“meinwan”,“ip”:“192.168.2.182”,“mac”:“84:CC:A8:5E:7C:B0”,“mhz”:433,“RTLminRssi”:-82,“RTLRssi”:-66,“RTLCnt”:0,“modules”:[“RTL_433”]}

but not reciving any data
how i can check the CC1101 is working ?

i did the wiring in this way : SmartRC-CC1101-Driver-Lib/Esp32_CC1101.png at master · LSatan/SmartRC-CC1101-Driver-Lib · GitHub

but the pinout divers from here : RF gateway (433mhz/315mhz) | OpenMQTTGateway v0.9.6

pins 27/26 and 12

which is the right one ?

thanks for any help

Hi

i changed the antenna and i get messages to my mqttbroker :

{“model”:“unknown”,“protocol”:“signal parsing failed”,“duration”:3350994,“signalRssi”:-49,“pulses”:67,“train”:0,“messageCount”:8,"_enabledReceiver":1,“receiveMode”:0,“currentRssi”:-138,“minimumRssi”:-82}

and messages to the serial konsole in platformio :

rtl_433_ESP(6): Unparsed Signal length: 214930349, Signal RSSI: -70, train: 1, messageCount: 3, pulses: 328

rtl_433_ESP(6): RAW (214930349): with a bunch of nummbers

so wiring seems ok

tomorow i take a deeper look in the data , maybe adjust the frequency

Yes, and that now uses the environment defined further down in platformio.ini - line 538(ish) onwards

[env:esp32dev-rtl_433]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = min_spiffs.csv
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.rtl_433_ESP}
build_flags =
  ${com-esp.build_flags}
  '-DZradioCC1101="CC1101"'
  '-DZgatewayRTL_433="rtl_433"'
  '-DGateway_Name="OpenMQTTGateway_rtl_433_ESP"'
  '-DRF_RECEIVER_GPIO=4'
;  '-DRTL_DEBUG=4'        ; enable rtl_433 verbose device decode

Therefor you don’t actually have to make any changes in User_config.h at all.

The default receiver pin for rtl_433 is 4, as defined in the environemt above - ‘-DRF_RECEIVER_GPIO=4’ - so if you hooked up your ESP32 as in

SmartRC-CC1101-Driver-Lib/Esp32_CC1101.png at master · LSatan/SmartRC-CC1101-Driver-Lib · GitHub

you should be fine.

What rtl_433 devices do you have for which you are expecting signal messages?

Crosstalked just now :wink:

To change the frequency you can just add a build flag for it to the environment, e.g.

'-DCC1101_FREQUENCY=868.32'

All the best

Hi

i have some digoo temperature sensors and 433mhz plugs (dont know the factury)

the temperature sensors are recived by an d1mini-esp8266 + RBX6 with rflink-ESP
the plugs are recived by d1mini-esp8266 + RBX6 with opengateway RF aswell Pilight

and RFtech temperature sensors wich are not recognized from rflink-Esp nor RF and Pilight so i hope RTL_433 do this for all

yes crossing :wink:

and a 868 mhz conrad weatherstation

i take a look tomorow

thanks for the help

Your RFtech temperature sensors might be recognised, depending on their model, as there is an RFtech decoder included in RTL_433_ESP.

With your 868Mhz Conrad weather station you might have a similar issue as I have with my weather station. They mostly seem to use FSK modulation, which is not supported in RTL_433_ESP yet, but @NorthernMan54 is testing and working on it, so it’ll hopefully be included in a future release.