Trial port of the rtf_433 Library for use with OpenMQTTGateway on a ESP32 and a CC1101 Transceiver

Overview

This is an attempt at creating an Arduino library for use on ESP32 boards with a CC1101 transceiver with the device decoders from the rtl_433 package. And be available for use with openMQTTGateway as an available module.

Inspiration for this came from the ESPiLight effort. Kudos to puuu for this, and the awesome package.

The initial port implements only enables a subset of the available modulations and device decoders, and is limited to devices I have access to and can test with.

Enabled Pulse Demodulation modules

	OOK_PPM :         Pulse Position Modulation
	OOK_PWM :         Pulse Width Modulation

Enabled Device Decoders

Registering protocol [2] "Acurite 609TXC Temperature and Humidity Sensor"
Registering protocol [3] "Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas"
Registering protocol [4] "Acurite 986 Refrigerator / Freezer Thermometer"
Registering protocol [5] "Acurite 606TX Temperature Sensor"
Registering protocol [6] "Acurite 00275rm,00276rm Temp/Humidity with optional probe"
Registering protocol [7] "Acurite 590TX Temperature with optional Humidity"
Registering protocol [8] "Akhan 100F14 remote keyless entry"
Registering protocol [9] "AlectoV1 Weather Sensor (Alecto WS3500 WS4500 Ventus W155/W044 Oregon)"
Registering protocol [10] "Ambient Weather TX-8300 Temperature/Humidity Sensor"
Registering protocol [11] "Auriol AFW2A1 temperature/humidity sensor"
Registering protocol [12] "Auriol HG02832, HG05124A-DCF, Rubicson 48957 temperature/humidity sensor"
Registering protocol [13] "BlueLine Power Monitor"
Registering protocol [14] "Blyss DC5-UK-WH"
Registering protocol [16] "Bresser Thermo-/Hygro-Sensor 3CH"
Registering protocol [18] "Burnhard BBQ thermometer"
Registering protocol [19] "Calibeur RF-104 Sensor"
Registering protocol [20] "Cardin S466-TX2"
Registering protocol [21] "Chuango Security Technology"
Registering protocol [22] "Companion WTR001 Temperature Sensor"
Registering protocol [25] "Ecowitt Wireless Outdoor Thermometer WH53/WH0280/WH0281A"
Registering protocol [26] "Eurochron EFTH-800 temperature and humidity sensor"
Registering protocol [30] "Esperanza EWS"
Registering protocol [32] "Fine Offset Electronics, WH2, WH5, Telldus Temperature/Humidity/Rain Sensor"
Registering protocol [33] "Fine Offset Electronics, WH0530 Temperature/Rain Sensor"
Registering protocol [34] "Fine Offset WH1050 Weather Station"
Registering protocol [35] "Fine Offset Electronics WH1080/WH3080 Weather Station"
Registering protocol [37] "FT-004-B Temperature Sensor"
Registering protocol [38] "Generic wireless motion sensor"
Registering protocol [39] "Generic Remote SC226x EV1527"
Registering protocol [40] "Generic temperature sensor 1"
Registering protocol [41] "Globaltronics QUIGG GT-TMBBQ-05"
Registering protocol [42] "Globaltronics GT-WT-02 Sensor"
Registering protocol [43] "Globaltronics GT-WT-03 Sensor"
Registering protocol [44] "Microchip HCS200 KeeLoq Hopping Encoder based remotes"
Registering protocol [45] "Honeywell ActivLink, Wireless Doorbell"
Registering protocol [46] "HT680 Remote control"
Registering protocol [47] "inFactory, nor-tec, FreeTec NC-3982-913 temperature humidity sensor"
Registering protocol [49] "Interlogix GE UTC Security Devices"
Registering protocol [51] "Kedsum Temperature & Humidity Sensor, Pearl NC-7415"
Registering protocol [52] "Kerui PIR / Contact Sensor"
Registering protocol [53] "LaCrosse TX Temperature / Humidity Sensor"
Registering protocol [54] "LaCrosse TX141-Bv2, TX141TH-Bv2, TX141-Bv3, TX141W, TX145wsdth sensor"
Registering protocol [55] "LaCrosse/ELV/Conrad WS7000/WS2500 weather sensors"
Registering protocol [56] "LaCrosse WS-2310 / WS-3600 Weather Station"
Registering protocol [58] "Maverick et73"
Registering protocol [60] "Missil ML0757 weather station"
Registering protocol [64] "Nexus, FreeTec NC-7345, NX-3980, Solight TE82S, TFA 30.3209 temperature/humidity sensor"
Registering protocol [66] "Opus/Imagintronix XT300 Soil Moisture"
Registering protocol [67] "Oregon Scientific SL109H Remote Thermal Hygro Sensor"
Registering protocol [69] "Philips outdoor temperature sensor (type AJ3650)"
Registering protocol [70] "Philips outdoor temperature sensor (type AJ7010)"
Registering protocol [71] "Prologue, FreeTec NC-7104, NC-7159-675 temperature sensor"
Registering protocol [73] "Quhwa"
Registering protocol [75] "Rubicson Temperature Sensor"
Registering protocol [76] "Rubicson 48659 Thermometer"
Registering protocol [77] "Conrad S3318P, FreeTec NC-5849-913 temperature humidity sensor"
Registering protocol [78] "Silvercrest Remote Control"
Registering protocol [79] "Skylink HA-434TL motion sensor"
Registering protocol [80] "Wireless Smoke and Heat Detector GS 558"
Registering protocol [81] "Solight TE44/TE66, EMOS E0107T, NX-6876-917"
Registering protocol [82] "Springfield Temperature and Soil Moisture"
Registering protocol [83] "TFA Dostmann 30.3221.02 T/H Outdoor Sensor"
Registering protocol [84] "TFA Drop Rain Gauge 30.3233.01"
Registering protocol [85] "TFA pool temperature sensor"
Registering protocol [86] "TFA-Twin-Plus-30.3049, Conrad KW9010, Ea2 BL999"
Registering protocol [87] "Thermopro TP11 Thermometer"
Registering protocol [88] "Thermopro TP08/TP12/TP20 thermometer"
Registering protocol [90] "TS-FT002 Wireless Ultrasonic Tank Liquid Level Meter With Temperature Sensor"
Registering protocol [91] "Visonic powercode"
Registering protocol [92] "Waveman Switch Transmitter"
Registering protocol [93] "WG-PB12V1 Temperature Sensor"
Registering protocol [94] "WS2032 weather station"
Registering protocol [95] "Hyundai WS SENZOR Remote Temperature Sensor"
Registering protocol [96] "WT0124 Pool Thermometer"
Registering protocol [98] "X10 Security"

The gaps in the numbers are device decoders disabled by default.

Wiring and Building the Example

To wire my device, I followed this guide

https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/blob/master/img/Esp32_CC1101.png

And to build the example I use platformio and opened the example folder as a new window and built from their.

Projects using the library

Roadmap / Next Steps

  • Firmware size tuning
  • Further heap usage tuning
  • Find stack leak when running all devices
  • Enable addition pulse demod functions

Compile definition options

MINRSSI						; Default rssi to enable receiver, defaults to -82
MY_DEVICES					; Only include my personal subset of devices

DEMOD_DEBUG					; enable verbose debugging of signal processing
DEVICE_DEBUG				; Validate fields are mapped to response object ( rtl_433 )
MEMORY_DEBUG				; display heap usage information
RAW_SIGNAL_DEBUG			; display raw received messages
RSSI						; Enable collection of per pulse RSSI Values during signal reception
RTL_DEBUG					; Enable RTL_433 Verbose option ( 0=normal, 1=verbose, 2=verbose decoders, 3=debug decoders, 4=trace decoding. )

Porting approach

  • Copy subset of files in src/rtl_433/devices without any modification

    • Generated a list of files that used OOK_PPM and OOK_PWM with tools/device.awk
    • Copied into src/rtl_433/devices
    • Marked newkaku.c, nexa.c, and proove.c as unavailable as the device decoder triggers a stack overflow
    • Based on the reduced list, updated include/rtl_433_devices.h, src/rtl_433_ESP.cpp, and src/rtl_433_ESP.h
  • Copy of only used files in src/rtl_433, with minimal modifications

  • abuf.c - No changes made
  • bitbuffer.c - No changes made
  • data.c - Defined out unneeded functions ( #ifndef ESP32 )
  • decoder_util.c - No changes made
  • list.c - No changes made
  • pulse_demod.c - Move 'bitbuffer_t bits' to class level
  • r_api.c - Significant tuning and tweaking applied
  • r_util.c - No changes made
  • util.c - No changes made
  • include directory is a copy
  • abuf.h - No changes made
  • am_analyze.h - No changes made
  • baseband.h - No changes made
  • bitbuffer.h - No changes made
  • compat_time.h - No changes made
  • data.h - Added '#define _POSIX_HOST_NAME_MAX 128'
  • decoder.h - No changes made
  • decoder_util.h - No changes made
  • fatal.h - No changes made
  • fileformat.h - No changes made
  • list.h - No changes made
  • log.h - Not from rtl_433.h
  • optparse.h - No changes made
  • pulse_demod.h - No changes made
  • pulse_detect.h - Adjusted structures to reduce size
  • r_api.h - No changes made
  • r_device.h - Adjusted structures to reduce size
  • r_private.h - Adjusted structures to reduce size
  • r_util.h - No changes made
  • rtl_433.h - Adjusted structures to reduce size
  • rtl_433_devices.h - Only added my skylink device
  • rtl_devices.h - Not needed ??
  • samp_grab.h - No changes made
  • term_ctl.h - No changes made
  • util.h - No changes made

Codebase conflicts

  • ESPiLight and rtl_433 conflict on silvercrest
.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: Warning: size of symbol `silvercrest' changed from 4 in .pio/build/rtl_433-9e0770/libb28/libESPiLight.a(protocol.c.o) to 76 in .pio/build/rtl_433-9e0770/lib395/librtl_433_ESP.a(silvercrest.c.o)

Memory footprint

OpenMQTTGateway

Build definitions

  '-Dota_password=""'
  '-DMQTT_SERVER="192.168.1.12"'
;  '-DMDNS_SD=true'
  '-DESPWifiManualSetup=true'
  '-DGateway_Name="cc1101-ec20dc"'    ; 9e0770  ; ec20dc
  '-DOMG_VERSION="$PIOENV"'
  '-DSERIAL_BAUD=921600'
 ; '-DZgatewayRF="RF"'
  '-DZgatewayRTL_433="rtl_433"'
 ; '-DZgatewayPilight="Pilight"'
  '-DZradioCC1101="CC1101"'
;  '-DZsensorBH1750="BH1750"'
;  '-DZsensorBME280="BME280"'
;  '-DLOG_LEVEL=LOG_LEVEL_TRACE'
;  '-DMEMORY_DEBUG=true'
;  '-DDEMOD_DEBUG=true'
; '-DRTL_DEBUG=4'           ; rtl_433 verbose mode
;  '-DRAW_SIGNAL_DEBUG=true'
  '-DRF_EMITTER_GPIO=2'
  '-DRF_RECEIVER_GPIO=4'
;  '-DMY_DEVICES=true'
  '-UZmqttDiscovery'
  • Version 1
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  23.1% (used 75776 bytes from 327680 bytes)
Flash: [========  ]  79.1% (used 1036818 bytes from 1310720 bytes)
  • Version 2

Cleaned up device decoder list, ( OOK PPM and PWM only)

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  20.6% (used 67344 bytes from 327680 bytes)
Flash: [=======   ]  70.4% (used 922990 bytes from 1310720 bytes)
Comments
  • how to pull devices from rtl_433 project

    how to pull devices from rtl_433 project

    Hi there,

    first of all, thanks for great job here.

    I have a question, I need EMOS E6016 sensor support but I have trouble getting it decoded using this lib with OpenMQTTGateway.

    I ran update_rtl_433_devices.sh, output said to update rtl_433_ESPcpp with contents of rtl_433_ESP.fragment, I did that. However I did not touch the rtl_433_devices files. I noticed there are 3 fragment files

    compiling went fine, but EMOS E6016 seems not to be recognized. Other sensors are recognized, for example Nexus-TH

    observations:

    • E6016 is transmitting for sure and I am able to see and decode signal by my own program. I just wanted it to get it done by OMG
    • when I remove Nexus support, nexus sensors stop appearing in the MQTT messages
    • when I remove everything and keep only EMOS protocols, no messages get through
    • CC1101 is working fine (i can see other protocols)

    what is the process of updating protocols from rtl_433 github project? what else needs to be done besides running update_rtl_433_devices.sh ?

    thanks a lot!

    opened by mgx0 42
  • Sensitivity drop with latest version used in OpenMQTTGateway

    Sensitivity drop with latest version used in OpenMQTTGateway

    Hi there, i just updated to the latest development version of openmqttgateway, which references rtl_433_ESP in version 0.1.3.

    I have some issue with my Nexus-T temperature sensor, which has been captured fine before the update but now the signal seems to be ignored. If i put the sensor closer to the receiver, the signal is captured. i there some build flag i can tweek? I'm a bit confused about the new RSSI_THRESHOLD and AVERAGE_RSSI (which seems not to be used anywhere from rtl_433_esp)

    That's what the sensor normally sends out:

    { "model": "Nexus-T", "id": 167, "channel": 1, "battery_ok": 1, "temperature_C": 22.1, "protocol": "Nexus, FreeTec NC-7345, NX-3980, Solight TE82S, TFA 30.3209 temperature/humidity sensor", "rssi": -53, "duration": 956000 }

    thanks in advance

    opened by Dattel 37
  • Can't get to work in Arduino IDE with DOIT ESP32 DEVKIT1

    Can't get to work in Arduino IDE with DOIT ESP32 DEVKIT1

    Hi, Has anyone managed to get rtl_433_ESP to compile and load on a DOIT ESP32 DEVKIT1. I get the following errors:

    C:\Users\DEFAUL~2\AppData\Local\Temp\arduino_build_72779\libraries\rtl_433_ESP\rtl_433_ESP.cpp.o:(.literal._ZN11rtl_433_ESP8rtlSetupEP5r_cfg+0x4): undefined reference to acurite_rain_896' C:\Users\DEFAUL~2\AppData\Local\Temp\arduino_build_72779\libraries\rtl_433_ESP\rtl_433_ESP.cpp.o:(.literal._ZN11rtl_433_ESP8rtlSetupEP5r_cfg+0x8): undefined reference toacurite_th' C:\Users\DEFAUL~2\AppData\Local\Temp\arduino_build_72779\libraries\rtl_433_ESP\rtl_433_ESP.cpp.o:(.literal._ZN11rtl_433_ESP8rtlSetupEP5r_cfg+0xc): undefined reference to `acurite_txr' ...... I have had lots of errors with the example ESP_rtl_433.ino - managed to fix most of them but cant get the above to go.

    Maybe I have put the downloaded library files in wrong place - where should they go ?.

    I did try the compiled version on openmqttgateway, it uploaded to the ESP32, but didn't work, and when I tried to re-upload to ESP32 again it had been bricked.. I could no longer upload anything to it - so don't want to try that again.

    I have a CC1101 module connected to the ESP32, and it works with a SmartRC-CC1101-Driver example thats in the Arduino IDE. I can receive code from a 433mhz remote and send to homeassistant via mqtt publisher - eg {"id":31,"unit":15,"state":"down"}, {"id":31,"unit":15,"state":"up"}, "{"systemcode":480,"unitcode":0,"state":"on"}. So I am guessing I have wired up everything ok.

    Anyway if anyone has example code they can share for the DOIT ESP32 that works with a fine offset weather station, that would be great.

    Thanks

    opened by davoau 23
  • TFA Dostmann 30.3221.02 T/H Outdoor Sensor not parsed

    TFA Dostmann 30.3221.02 T/H Outdoor Sensor not parsed

    Hi, since my old sensor got flooded during the last rain if've bought a "TFA Dostmann 30.3221.02 T/H Outdoor Sensor".

    Is there anything i need to know to enable parsing? My debug-console only reports "unparsed data" I'm using rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP#e03f689 in OpenMQTTGateway

    here are some captures from the console if i press the "TX" button on TFA-Sensor

    rtl_433_ESP(6): Unparsed Signal length: 272560, Signal RSSI: -18, train: 0, messageCount: 2, pulses: 201
    rtl_433_ESP(6): RAW (272560): +501-860+817-864+820-868+809-859+209-533+205-528+198-534+455-271+450-287+206-526+209-517+224-517+205-530+461-261+207-528+459-276+196-550+193-534+439-295+205-510+468-277+457-271+450-287+206-526+210-512+224-518+205-528+460-260+209-525+208-538+445-284+209-528+206-512+469-278+431-298+198-532+206-528+206-518+197-541+209-530+204-512+231-500+459-278+470-259+206-579+806-864+820-869+807-862+804-880+220-518+206-529+208-516+464-277+459-269+200-532+195-534+209-519+226-503+469-272+209-517+471-283+207-521+200-530+447-271+210-538+444-285+451-268+459-286+200-537+194-536+210-516+197-539+441-294+209-517+197-539+440-294+212-514+199-538+440-293+461-285+178-540+207-529+207-513+222-511+217-510+235-517+196-536+441-269+460-284+448-332+794-870+802-884+805-866+794-893+206-512+205-526+209-520+468-284+449-270+206-538+197-540+207-508+229-510+446-271+236-518+446-284+208-530+205-513+444-301+210-512+447-286+447-271+459-285+202-540+195-534+211-511+222-516+465-271+210-515+223-516+441-295+208-519+196-539+440-295+437-285+201-542+206-530+206-514+204-526+209-540+197-519+220-534+440-272+452-289+206-575+800-865+802-875+812-863+823-869+202-533+205-526+211-515+469-283+442-268+232-513+196-540+207-530+207-509+468-276+192-536+458-260+218-538+207-506+455-286+195-534+456-275+449-285+466-273+195-534+208-536+196-512+210-533+454-288+205-526+210-513+444-306+208-519+201-528+440-299+433-278+219-529+204-526+210-516+199-541+205-529+206-514+203-526+460-274+445-287+232-78913+75-506+0-549+0-524+124-101+0-303+74-100+100-101+350-125+176-74+150-74+0-125+324-227+125-101+125-327+250-76+75-100+0-76+0-227+200-101+297-428+125-279
     
    
    rtl_433_ESP(6): Unparsed Signal length: 142499, Signal RSSI: -22, train: 1, messageCount: 3, pulses: 37
    rtl_433_ESP(6): RAW (142499): +286-241+207-528+207-519+221-517+221-509+463-278+195-523+222-534+439-276+219-526+197-534+439-297+456-264+199-538+205-528+206-514+226-508+208-545+201-530+207-524+439-286+446-279+454-80337+76-99+74-375+209-125+198-527+175-402+176-126+226-278+350-351+425-175+127-125+427-127+173-279+195-75+151-101
     
    
    rtl_433_ESP(6): Unparsed Signal length: 172251, Signal RSSI: -67, train: 0, messageCount: 4, pulses: 79
    rtl_433_ESP(6): RAW (172251): +118-419+250-511+204-526+459-278+195-546+196-535+433-275+472-287+445-271+459-278+442-286+206-529+460-287+445-280+456-270+200-535+442-275+459-322+810-885+801-877+795-873+812-858+221-534+191-537+208-510+469-277+433-297+199-533+208-525+208-512+223-517+207-529+206-539+442-278+212-516+199-528+469-271+209-517+468-284+450-269+456-286+202-536+193-535+210-517+442-280+208-533+203-530+205-527+460-277+194-522+222-534+431-277+470-287+445-272+461-278+443-284+206-531+433-286+471-275+432-303+194-532+449-293+212-76795+447-504+124-478+444-175+51-304+124-428+126-126+102-126+210-99+126-328+441-127+99-453+174-380+123-457+124-327+199-100+124-399
     
    rtl_433_ESP(6): Unparsed Signal length: 268762, Signal RSSI: -22, train: 1, messageCount: 5, pulses: 190
    rtl_433_ESP(6): RAW (268762): +430-868+781-901+783-889+797-868+229-508+221-512+210-542+450-289+419-295+208-516+199-540+195-534+213-513+470-285+206-506+457-286+207-526+208-517+444-307+208-508+455-284+445-274+457-293+198-532+208-524+208-516+445-307+209-518+200-531+206-525+437-285+202-541+208-531+430-288+444-299+433-275+222-530+205-526+435-311+423-281+454-294+457-263+205-526+464-278+442-337+794-870+810-889+803-875+795-873+209-518+221-517+196-535+462-278+443-284+207-530+204-539+198-536+194-536+434-285+201-540+440-294+209-517+199-538+450-270+204-541+443-279+454-293+432-285+207-526+208-517+222-518+465-271+208-517+222-517+195-534+460-277+195-554+191-534+434-298+447-288+445-272+208-537+198-519+466-269+461-275+444-286+450-292+208-516+444-309+179-571+811-859+828-875+798-873+808-864+206-526+208-541+198-537+440-270+461-283+202-537+195-539+205-516+198-539+440-297+207-516+444-282+208-548+200-528+446-271+209-543+444-284+450-270+457-286+202-535+194-535+211-514+444-280+208-545+204-528+200-508+458-276+223-527+206-527+436-282+449-306+425-295+203-539+197-513+454-272+477-262+471-275+458-272+198-532+446-298+211-572+779-880+811-861+820-869+808-860+207-548+196-530+206-528+433-287+448-279+208-547+199-528+205-527+209-516+444-283+206-545+426-311+179-529+207-540+446-276+209-534+427-311+448-269+459-284+201-520+194-533+209-544+444-285+206-506+230-510+205-526+461-275+196-526+217-536+439-295+430-286+445-300+210-518+199-546+441-272+458-277+443-285+447-296+208-517+443-282+208-74328+382-1103+353-574+404-504+100-353+97-253+177-75+474-325+510-855+399-75+200-77 
     
    rtl_433_ESP(6): Unparsed Signal length: 147803, Signal RSSI: -24, train: 0, messageCount: 6, pulses: 49
    rtl_433_ESP(6): RAW (147803): +118-242+202-540+195-535+207-518+224-516+462-271+209-517+468-258+235-521+199-505+471-271+209-520+468-284+451-268+456-288+199-513+235-506+205-534+445-272+235-518+199-518+219-511+459-275+223-526+205-528+436-284+447-282+452-272+226-513+223-511+465-274+451-285+446-276+456-268+221-530+444-277+206-74499+100-426+128-401+151-403+100-277+300-202+1183-75+210-150+398-125+224-175+376-175+205-200+426-150
    
    rtl_433_ESP(6): Unparsed Signal length: 275968, Signal RSSI: -52, train: 0, messageCount: 12, pulses: 198
    rtl_433_ESP(6): RAW (275968): +694-862+814-868+806-883+814-852+220-519+234-501+236-486+469-276+463-271+228-487+221-511+236-504+231-510+465-275+193-533+460-263+235-500+237-493+470-260+215-509+489-253+465-286+463-244+234-519+199-510+477-268+231-492+223-512+232-506+229-511+467-253+213-536+206-516+467-278+466-250+220-505+233-526+461-261+447-281+236-497+471-263+474-244+234-520+220-514+464-293+841-843+824-853+810-867+821-869+232-485+230-526+211-518+468-257+456-270+226-513+235-496+237-488+220-518+464-272+235-494+468-258+235-510+225-510+471-246+216-534+460-265+464-259+476-268+232-490+222-509+463-269+235-515+197-512+218-532+211-515+468-284+208-506+230-510+445-272+485-249+222-529+205-504+487-259+448-282+235-496+475-262+473-247+233-518+196-537+196-580+815-845+826-855+834-863+817-842+231-516+229-499+240-484+470-286+450-268+232-491+226-508+234-506+230-511+443-275+236-495+471-283+209-504+232-510+470-248+236-510+447-290+445-269+462-288+201-538+207-506+459-288+207-503+234-514+223-512+218-509+461-275+219-501+233-502+462-285+446-280+210-521+224-501+471-271+461-280+217-498+465-271+461-276+219-528+205-501+239-540+825-855+811-868+822-844+827-880+210-509+228-502+226-506+486-249+470-264+233-502+234-488+223-537+206-522+452-261+218-509+459-275+221-530+195-533+456-273+223-509+465-277+464-248+481-257+217-535+211-505+456-290+206-528+211-519+198-538+205-505+458-288+237-498+209-519+467-259+475-247+227-514+223-511+463-271+457-266+219-519+464-274+460-274+221-498+234-501+234-82018+99-1001+224-201+174-399+150-75+203-76+477-177+251-78+99-100+176-101+127-176+126-101+602-77+74-126+328-150+200-299+77-73+250-125+452-77
     
    
    rtl_433_ESP(6): Unparsed Signal length: 143350, Signal RSSI: -19, train: 1, messageCount: 13, pulses: 29
    rtl_433_ESP(6): RAW (143350): +202-219+235-498+213-512+221-517+220-507+463-270+223-511+232-498+460-278+468-262+234-502+208-515+467-279+465-274+198-533+445-271+461-275+220-503+231-502+235-83467+100-479+75-452+175-100+484-305+125-101+275-101+176-152+428-76+75-99
    
    

    Thanks :-D

    opened by Dattel 17
  • Support for RX127X Transceiver Chipset

    Support for RX127X Transceiver Chipset

    I finally received my parts today and am ready to start adding support for this chipset

    For parts I have received the 433Mhz and 868Mhz modules https://heltec.org/project/wifi-lora-32/

    IMG_6191 IMG_6192

    Stay tuned over the next few weeks for this.

    FYI @1technophile

    opened by NorthernMan54 12
  • Insteon Support

    Insteon Support

    @NorthernMan54 Really nice work, sir - I'm using this with OpenMQTT Gateway to control some fans and it works great! I noticed in the rtl_433 project that there is a decoder for Insteon RF packets. Since most devices are dual-band, thought this might be a potential inexpensive alternative to a Hub/PLM. I messed with your example code from the fsk branch and have the CC1101 detecting Insteon RF signals. Where I run into issues is at the packet decode - it starts to decode the packets, finds the Insteon preamble, but then completely crashes (hard reset) at the stage where it begins to parse the Insteon packet. No errors, nothing to help determine the cause. I'm far from an expert on RF or ESP32, but any guesses what might be causing the reset? Assume it might be a memory thing, but thought I'd reach out to see if you had ideas, or had decoding working for any other FSK devices. Thanks!

    opened by kuestess 11
  • rtl_433_Callback stops receiving messages

    rtl_433_Callback stops receiving messages

    Hello,

    any idea why rtl_433_Callback stops receiving messages after some time?

    I'm trying to plot sensor data and, well picture describes it the best - image it's especially visible in RSSI part. My loop() is -

    void loop( void ) {
    
      ArduinoOTA.handle();
      webServer.handleClient();
      rf.loop();
    
    }
    

    esp32 is working fine all the time ..

    opened by mozgy 10
  • Switch between RTL Rx and RcSwitch TX -- Rx stops working

    Switch between RTL Rx and RcSwitch TX -- Rx stops working

    I'm trying to

    • use Rx from the RTL_433_ESP library to listen for sensors
    • disable it with a Tx request
    • switch to Tx with the RC Switch library; send a pulse and switch back to listening

    The good news (that may be surprising) is that it works ... prototype is here

    The bad news is, after a few toggles Rx just stops. I can't figure out if it similar to the deaf-state or even the freq change Rx stop OR if Im just doing something either impossible or missing something silly.

    The swap works, sometimes. I usually get 1 swap before I can't get any more Rx. But there are some times I can get a few. But it always goes deaf. Any ideas .. appreciate it

    The main bits for enabling/disabling are

    // RTL
    //
    void rtlSetup() {
        Log.notice(F(" " CR));
        Log.notice(F("****** RTL setup begin ******" CR));
        Log.notice(F("Frequency: %F" CR), config.frequency);
        rf.initReceiver(config.receivePin, config.frequency);
        enableRx();
        rf.setCallback(rtl433Callback, messageBuffer, messageBufferLen);
        Log.notice(F("****** RTL setup complete ******" CR));
    }
    
    void enableRx() {
        ELECHOUSE_cc1101.SpiStrobe(CC1101_SIDLE);
        ELECHOUSE_cc1101.SetRx(config.frequency);
        //ELECHOUSE_cc1101.setMHZ(config.frequency);
        rf.enableReceiver(config.receivePin);
    }
    
    void switchTransmit(float freq, int pulse, int decimal, int bits) {
        Log.notice(F("Sending:" CR));
        Log.notice(F("  freq: %F" CR), freq);
        Log.notice(F("  pulse: %d" CR), pulse);
        Log.notice(F("  decimal: %d" CR), decimal);
        Log.notice(F("  bits %d" CR), bits);
    
        rf.disableReceiver();
        ELECHOUSE_cc1101.SpiStrobe(CC1101_SIDLE);
        //ELECHOUSE_cc1101.setMHZ(freq);
        ELECHOUSE_cc1101.SetTx(freq);
    
        mySwitch.enableTransmit(config.transmitPin);
        mySwitch.setPulseLength(pulse);
        mySwitch.send(decimal, bits);
        mySwitch.disableTransmit();
    
        enableRx();
    }
    
    void rtl433Callback(char* message) {
        Log.notice(F("Received message: %s" CR), message);
        messagePost("sensor", message);
    }
    
    void messagePost(String path, char* message) {
        HTTPClient http;
        WiFiClient client;
    
        String url = String(config.serverURL);
        url.trim();
    
        http.begin(client, url + path);
        http.addHeader("Content-Type", "application/json");
        int httpResponseCode = http.POST(message);
    }
    
    void setup() {
        Serial.begin(115200);
        Log.begin(logLevel, &Serial);
    
        ELECHOUSE_cc1101.Init();
        configSetup();
        rtlSetup();
    }
    
    void loop() {
        configManager.loop();
        rf.loop();
    }
    
    opened by cgmckeever 7
  • Additional Receivers

    Additional Receivers

    đŸ‘‹ @NorthernMan54 ... Got this running using the basic configs. Works like magic for sniffing some of my devices. THANK YOU

    TLDR; Whats your "BUY YOU A BEER ADDRESS" -- because I'd like to prime you for an ask ;)

    Having the same receiver distance issue as noted in other issues and also stumbled across some posts about possible futurereceiver work .. @skiphansen (ever resolve your distance issue)

    Wondering if there has been any further thought into different receivers .. and also curious if this library is able to use very basic receivers such as shown in the attached images .. OR .. if the chipset (or base library) needs to be smarter as alluded to in your other thread?

    Standard Generic Arduino Module

    • wouldnt expect this to be much better than CC1101 612YmAsyQGL AC_SX679

    Open-Smart

    • This is the wild card chipset sku_481971_1_210x210

    AdaFruit

    • discussion that its receiver is very good with distance 3071-06
    opened by cgmckeever 7
  • How to enable protocol

    How to enable protocol

    Hi, I am using OpenMQTTGateway and I want to enable to rtl_433 Intertechno protocol. But I don't know how to do that.

    Could you please help me?

    Regards

    opened by hvorragend 7
  • Proposal to introduce SUPPRESS_UNPARSED build flag to suppress MQTT messages being published for unparsed signals

    Proposal to introduce SUPPRESS_UNPARSED build flag to suppress MQTT messages being published for unparsed signals

    While testing my OMG 0.9.6 setup with an 868Mhz CC1101 I found that the MQTT broker constantly receives messages from my many Homematic devices, as unknown/signal parsing failed

    {"model":"unknown","protocol":"signal parsing failed","duration":72226,"signalRssi":-59,"pulses":146,"train":1,"messageCount":1,"_enabledReceiver":1,"receiveMode":0,"currentRssi":-90,"minimumRssi":-82}

    etc.

    Using a custom reduced definition for MY_DEVICES did help in bringing down these unrecognised messages a bit, but I thought it would be desirable to be able to completely suppress any unparsed signal from creating MQTT messages, so I came up with the following changes.

    So setting the build_flag

    '-DSUPPRESS_UNPARSED=true'

    all recognised but unparsed signals do not get published, reducing the MQTT load.

    Maybe you think this might be helpful to be included in your great rtl_433 OMG implementation.

    Thanks

    opened by DigiH 7
Releases(v0.1.5)
  • v0.1.5(Dec 19, 2022)

  • v0.1.4(Nov 9, 2022)

    What's Changed

    1. After discussing with @DigiH, implemented an updated version of the lacrosse_tx141.c based on this issue from rtl_433 https://github.com/merbanan/rtl_433/issues/2206 and this proposed change https://github.com/merbanan/rtl_433/commit/081de0ba9af69f198924994deb208376c92b062f

    2. For SX127x disabled the automated level setting for OOKFixThreshold, it was occasionally problematic. And set the value to 90. It can be re-enabled with the compiler directive AUTOOOKFIX

    3. For CC1101, changed the maximum signal gap to micros() - signalEnd < 40000 && micros() - signalStart > 30000.

    4. Added new complier directive DISABLERSSITHRESHOLD - Disable automatic setting of RSSI_THRESHOLD ( legacy behaviour ), and use MINRSSI ( -82 ). This resolves #42

    5. For SX127x, changed the maximum signal gap to PD_MAX_GAP_MS * 1000 ( from rtl_433 ).

    6. Added Github Actions to build the examples and lint check the code base. Also includes lint fixes.

    Full Changelog: https://github.com/NorthernMan54/rtl_433_ESP/compare/v0.1.3...v0.1.4

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Aug 3, 2022)

    Significant Major changes with this pull request and release.

    1 - Change Transceiver Library to RadioLib

    2 - Add support for SX127X transceiver module ( I used the 433 Mhz version of this Heltec module for development ).

    3 - Added automatic calibration of the RSSI Signal detection Threshold

    4 - Removed dependency on loop for start and end of signal detection, and moved to a ESP32 Task

    5 - Moved received signal decoding to a ESP32 Task

    6 - Identified Blueline PowerCost Monitor decoder as source of significant memory overhead and disabled.

    Source code(tar.gz)
    Source code(zip)
  • v0.0.4(Jan 27, 2022)

    • Rework OOK Receiver sample and rename directory to OOK_Receiver
    • Cleaned up diagnostic logging
    • Added logging of device decoder return codes ( DEMOD_DEBUG & RTL_DEBUG=4 )
    • Fixed some compiler warnings

    What's Changed

    • Clean up of logging and reworking of OOK Sample by @NorthernMan54 in https://github.com/NorthernMan54/rtl_433_ESP/pull/25

    Full Changelog: https://github.com/NorthernMan54/rtl_433_ESP/compare/v0.0.3...v0.0.4

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(Dec 23, 2021)

    Includes the following updates:

    1 - Workaround for cc1101 module going deaf after 24 hours, issue #16.

    • By default the workaround is enabled, define NO_DEAF_WORKAROUND to remove the workaround

    2 - Improved process for updating from rtl_433 for GitHub, almost totally automated.

    • FYI - Their is a shell script in the tools subdirectory which does most of the heavy lifting required

    3 - Updated device decoders to latest release of rtl_433

    • They are now in align with rtl_433 release 21.12

    4 - Updated r_api.c to prioritize ook demodulators - feature from rtl_433

    5 - Created contrib directory for other device decoders to be merged into code base as part of the rtl_433 update process

    6 - Bump library version to 0.0.3

    7 - Tuned signal receiver logic and now throw away the first received byte. On testing this appears to dramatically reduce the number of unparsed signals.

    8 - Fixed README feedback from @DigiH and updated the wording for 'PUBLISH_UNPARSED'. Also removed serial logging of unparsed messages unless 'PUBLISH_UNPARSED' is set

    9 - Fixed gitignore so that the clone of rtl_433 is no longer part of the repository.

    10 - Added new DEFINITION to enable rtl_433 verbose mode for a single device decoder. RTL_VERBOSE=##

    What's Changed

    • Update of rtl_433 device decoders to rtl_433 Release 21.12 by @NorthernMan54 in https://github.com/NorthernMan54/rtl_433_ESP/pull/18
    Source code(tar.gz)
    Source code(zip)
Owner
Northern Man
Just playing around with devices for home automation. ESP8266, DHT22, X-10/heyu, bme280, TCC, ECO PLUG
Northern Man
SX1262//68 Low Power Long Range Transceiver driver for esp-idf

esp-idf-sx126x SX1262//68 Low Power Long Range Transceiver driver for esp-idf. I ported from here. Ai-Thinker offers several LoRa modules. You can get

null 3 May 9, 2022
SI4432 ISM Transceiver driver for esp-idf

esp-idf-si4432 SI4432 ISM Transceiver driver for esp-idf. I refered this. Software requirements esp-idf v4.4 or later. This is because this version su

null 4 Dec 29, 2022
CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf

esp-idf-cc2500 CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf. I ported from this. 2.00mm pitch External Antena 1.27mm pitch PCB

null 3 May 29, 2022
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

null 6 Oct 27, 2022
null 313 Dec 31, 2022
Allows for multiple SwitchBot buttons and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Meter/Temp Sensor

SwitchBot-MQTT-BLE-ESP32 Switchbot local control using ESP32. no switchbot hub used/required. works with any smarthub that supports MQTT https://githu

null 343 Dec 27, 2022
AnalogWrite for ESP32 and ESP32-S2 with LEDC PWM. Includes PWM Phase Control, DAC and Smart GPIO resource management.

analogWrite() ESP32 Installation Instructions This library was tested using using the ESP32 Arduino IDE Boards Manager installation method. Stable rel

null 36 Jan 5, 2023
A port of the Uxn virtual machine to the ESP32

Uxn An assembler and emulator for the Uxn stack-machine, written in ANSI C. Build Linux To build the Uxn emulator, you must have SDL2. If you wish to

Maxime ANDRÉ 27 Mar 24, 2022
Bluetooth Monitor port for the ESP32

ESP32 BT Monitor What is it? This is a (at the moment partial) port of andrewjfreyer/monitor for the popular and super cheap ESP32 boards. For a more

null 38 Dec 28, 2022
ESP32 + GitHub Actions + Husarnet. A boilerplate project for ESP32 allowing in-field firmware update using GitHub Actions workflow.

esp32-internet-ota ESP32 + GitHub Actions + Husarnet. A boilerplate project for ESP32 allowing in-field firmware update using GitHub Actions workflow.

Husarnet 31 Sep 22, 2022
Library for ESP32 to use OV5640's autofocus function

Enable OV5640's autofocus function on ESP32 AI-THINKER Board This library contains the necessary firmware and source code to enable the OV5640 autofoc

Eric 40 Jan 6, 2023
A utility library to use/bootstrap Soracom Arc easily on ESP32 Arduino boards

soracom-arc-esp32-arduino A utility library to use/bootstrap Soracom Arc easily on ESP32 Arduino boards. Synopsis #include <SoracomArcESP32.h> #includ

Soracom Labs 2 Dec 20, 2021
A couple of demos showing how to use the Ultra Low Power coprocessor on the ESP32

ESP32 Ultra Low Power (ULP) coprocessor You can watch a video explanation of this code here This repo contains two demo project: ulp-gpio Shows you ho

atomic14 8 Nov 9, 2022
Turn 2 esp32 boards into pixhawk telemetry for use with Ardupilot/Ardurover Mission Planner.

RoverLink Turn 2 esp32 boards into pixhawk telemetry for use with Ardupilot/Ardurover Mission Planner I used to use these cheap Chinese 900mhz Pixhawk

Jeffrey Berezin 3 Dec 9, 2022
ESP32 IR transmitter for use with the PriceHax project.

PricehaxESP32 This is an ESP32 based implementation of an IR transmitter for use with Furrtek's Android App or Python code for communicating with infr

Skip Hansen 3 Aug 19, 2022
Turn your ESP32 into a easy to use micro web-server allowing to interact with any GPIO by simple http(s) calls.

WebhooksTriggeredESP32WiFi Turn your ESP32 into an easy to use and manage wireless micro web-server allowing it to process reliably and asynchronouly

JayDeLux 3 Nov 24, 2022
Library of useful C++ snippets and reusable classes I've created as I build out Arduino Uno and ESP32 projects.

Arduino Snippets Library of useful C++ snippets and reusable classes I've created as I build out Arduino Uno and ESP32 projects. Button A simple butto

Max Lynch 7 Feb 5, 2022
S2-LP driver library, low-level and easy-to-port

S2-LP Library This library provides a simple way to use S2-LP transciever module. This library is WIP, but mostly done. https://www.st.com/en/wireless

Wojciech Olech 7 Oct 10, 2022
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 42 Oct 28, 2022