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
488 stars 110 forks source link

How to add missing devices to decode? #68

Closed beta-tester closed 1 year ago

beta-tester commented 1 year ago

hi, i am using the example OOK_Receiver.ino to see what i get from the sensors around me. i have two sensors that wont get decoded.

they only produce a RAW dump.

with my RTL_SDR + RTL_433 on my Raspberry Pi it apears as an "Ambientweather-F007TH" the device is located in: https://github.com/merbanan/rtl_433/blob/master/src/devices/ambient_weather.c

how can i include this device from rtl_433 to rtl_433_ESP ?

just copying all the devices from ~/git/merbanan/rtl_433/src/devices to ~/git/NorthernMan54/rtl_433_ESP/src/rtl_433/devices and recompile does not do anything.

i don't know how the devices are linked together

CazYokoyama commented 1 year ago

add your device to rtl_433_devices.h. The macro, DEVICES lists the devices which can be decoded. Don't forget to increase NUMOFDEVICES.

Even you add your device, it still not be decoded, your device does not satisfy the requirements which are 433MHz OOK(On-Off-Keying), not FSK(Frequency shift keying).

beta-tester commented 1 year ago

by adding to https://github.com/NorthernMan54/rtl_433_ESP/blob/master/src/decoder.cpp#L168


memcpy(&cfg->devices[104], &ambient_weather, sizeof(r_device));

and adding/changing https://github.com/NorthernMan54/rtl_433_ESP/blob/master/include/rtl_433_devices.h#L116

  DECL(ambient_weather)                                                              \
  /* Add new decoders here. */
#define NUMOFDEVICES 105

and commenting out all three decoder_logf_bitrow (because in the meantime the error handling changed in the rtl_433 master) from https://github.com/merbanan/rtl_433/blob/master/src/devices/ambient_weather.c#L59

it DOES decode the sensor!

the.modulation = OOK_PULSE_MANCHESTER_ZEROBIT, seems to work.

thank you for the hint.

CazYokoyama commented 1 year ago

You are welcome. Please close the cause.

CazYokoyama commented 1 year ago

I am glad if you find whether you need to add memcpy(&cfg->devices[104], &ambient_weather, sizeof(r_device)); I am skeptical.

beta-tester commented 1 year ago

@NorthernMan54 told me in another issue i opened that there is a branch rtl_433-22.11 that already has some more devices included i was missing