merbanan / rtl_433

Program to decode radio transmissions from devices on the ISM bands (and other frequencies)
GNU General Public License v2.0
6.13k stars 1.32k forks source link

Switch detected as 2 devices ? #1053

Closed bakman2 closed 5 years ago

bakman2 commented 5 years ago

Hi, I am new to this project, it is fantastic and overwhelming at the same time.

I have an RF switch from banggood "KTNNKG 433MHz", this has 2 buttons and triggers a single signal (no on/off, just a signal)

switch

Obviously this is not correct, how can I map/fix/rename this myself ? (this is the overwhelming part for me)

Btw; Is it possible to 'just' filter for the raw code as those appear to be unique ?

Left button:

pi@raspberrypi:~/Documents/rtl_433/conf $ rtl_433 -r g002_433.92M_250k.cu8 -a -A 
rtl_433 version 18.12-203-ge47b62d branch master at 201904291632 inputs file rtl_tcp RTL-SDR
Trying conf file at "rtl_433.conf"...
Trying conf file at "/home/pi/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

    Consider using "-M newmodel" to transition to new model keys. This will become the default someday.
    A table of changes and discussion is at https://github.com/merbanan/rtl_433/pull/986.

Registered 98 out of 125 device decoding protocols [ 1-4 8 11-12 15-17 19-21 23 25-26 29-36 38-60 62-63 67-71 73-100 102-103 108-116 119 121 124-125 ]
Test mode active. Reading samples from file: g002_433.92M_250k.cu8
Detected OOK package    @0.252156s
Analyzing pulses...
Total count:    1,  width: 0.38 ms      (   94 S)
Pulse width distribution:
 [ 0] count:    1,  width:  376 us [376;376]    (  94 S)
Gap width distribution:
Pulse period distribution:
Level estimates [high, low]:  15911,    388
RSSI: -0.1 dB SNR: 16.1 dB Noise: -16.2 dB
Frequency offsets [F1, F2]:  -12424,      0 (-47.4 kHz, +0.0 kHz)
Guessing modulation: Single pulse detected. Probably Frequency Shift Keying or just noise...

Detected OOK package    @0.262988s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.262988s
model     : Akhan 100F14 remote keyless entry      ID (20bit): 0xcb978
Data (4bit): 0x1 (Lock)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.262988s
model     : Akhan 100F14 remote keyless entry      ID (20bit): 0xcb978
Data (4bit): 0x1 (Lock)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.262988s
model     : Akhan 100F14 remote keyless entry      ID (20bit): 0xcb978
Data (4bit): 0x1 (Lock)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.262988s
model     : Akhan 100F14 remote keyless entry      ID (20bit): 0xcb978
Data (4bit): 0x1 (Lock)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.262988s
model     : Smoke detector GS 558                  id        : 3918
unit      : 19           learn     : 0             Raw Code  : 81e9d3
Analyzing pulses...
Total count:  106,  width: 184.80 ms        (46200 S)
Pulse width distribution:
 [ 0] count:   51,  width: 1084 us [1080;1096]  ( 271 S)
 [ 1] count:   55,  width:  368 us [360;376]    (  92 S)
Gap width distribution:
 [ 0] count:   51,  width:  328 us [320;336]    (  82 S)
 [ 1] count:   50,  width: 1004 us [1000;1016]  ( 251 S)
 [ 2] count:    4,  width: 10492 us [10488;10496]   (2623 S)
Pulse period distribution:
 [ 0] count:  101,  width: 1392 us [1368;1420]  ( 348 S)
 [ 1] count:    4,  width: 10860 us [10856;10868]   (2715 S)
Level estimates [high, low]:  15954,    375
RSSI: -0.1 dB SNR: 16.3 dB Noise: -16.4 dB
Frequency offsets [F1, F2]:  -18183,      0 (-69.4 kHz, +0.0 kHz)
Guessing modulation: Pulse Width Modulation with multiple packets
Attempting demodulation... short_width: 368, long_width: 1084, reset_limit: 10500, sync_width: 0
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=368,l=1084,r=10500,g=1020,t=284,y=0'
pulse_demod_pwm(): Analyzer Device
bitbuffer:: Number of rows: 5
[00] {25} 34 68 7e 80 : 00110100 01101000 01111110 1
[01] {25} 34 68 7e 80 : 00110100 01101000 01111110 1
[02] {25} 34 68 7e 80 : 00110100 01101000 01111110 1
[03] {25} 34 68 7e 80 : 00110100 01101000 01111110 1
[04] { 6} 34          : 001101

*** signal_start = 53042, signal_end = 121948, signal_len = 68906, pulses_found = 107
Iteration 1. t: 182    min: 92 (56)    max: 272 (51)    delta 5
Iteration 2. t: 182    min: 92 (56)    max: 272 (51)    delta 0
Pulse coding: Short pulse length 92 - Long pulse length 272

Short distance: 81, long distance: 250, packet distance: 2621

p_limit: 182
bitbuffer:: Number of rows: 6
[00] { 1} 00          : 0
[01] {25} cb 97 81 00 : 11001011 10010111 10000001 0
[02] {25} cb 97 81 00 : 11001011 10010111 10000001 0
[03] {25} cb 97 81 00 : 11001011 10010111 10000001 0
[04] {25} cb 97 81 00 : 11001011 10010111 10000001 0
[05] { 6} c8          : 110010
Iteration 1. t: 0    min: 0 (0)    max: 0 (0)    delta -727379968
Iteration 2. t: 0    min: 0 (0)    max: 0 (0)    delta 0
Distance coding: Pulse length 0

Short distance: 1000000, long distance: 0, packet distance: 0

p_limit: 0
bitbuffer:: Number of rows: 0
zuckschwerdt commented 5 years ago

Looks like the usual EV1527/PT2262 encoder (PWM with 1:3 and 3:1 lengths). Use the suggested line (you can omit the sync) and disable other decoders:

rtl_433 -R 0 -X 'name=mybuttons,modulation=OOK_PWM,short=368,long=1084,gap=1100,reset=11000,tolerance=300,bits>=24'

I have rounded the values and expanded the names to make it easier to follow. Compare to the examples in conf/ -- you may want match, count_only, or get.