Add new decode via conf file

64 views
Skip to first unread message

md

unread,
Jun 9, 2024, 11:24:25 AMJun 9
to rtl_433
I just implemented a custom conf file for a Dickert garage door opener remote. 
I used some of the examples in the conf directory as a starting reference.

daubsi@s935:~$ cat ~/.config/rtl_433/Dickert.conf
decoder {
n=Dickert,
m=OOK_PCM,
s=365,
long=365,
r=993,
    get=Pos1+2:@0:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
    get=Pos3+4:@12:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
    get=Pos5+6:@24:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
    get=Pos7+8:@36:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
    get=Pos9+10:@48:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
}

Sample output when reading a file with "-r <savedsignal> -c ~/.config/rtl_433/Dickert.conf"

time      : @0.125118s
model     : Dickert      count     : 1             num_rows  : 1             rows      :
len       : 111          data      : 924b2d924b6db24b2cb2cb6cb2c8            Pos1+2    : ++            Pos3+4    : 0-            Pos5+6    : ++
Pos7+8    : --           Pos9+10   : 0+
codes     : {111}924b2d924b6db24b2cb2cb6cb2c8

Several questions:

a) Do I always need to explicitly name my conf file with the -c argument for it to be considered?
b) The code consists of 10 Dip switches. However outputing 10 different values error'ed out with something like "no more than 8 getters possible". So I made that "trick" and printed 2 switch settings in one value and also calculated new values (it's 6 bit per dip switch) but now ofc not had to made an enum of 3 values, but of 3x3 values. Is there a better way to do this? Looks a little bit awkward to me.

md

unread,
Jun 9, 2024, 11:49:58 AMJun 9
to rtl_433
Also I am not sure how to use the match operator.
As far as I saw, every transmission ends with 0 0 0 0 - 0 0 - (as 
binary 101100 101100 101100 101100 101101 101100 101100 101100 1)

How do I need to specify the match option in order to match this full sequence, starting at position 60

md

unread,
Jun 9, 2024, 12:19:18 PMJun 9
to rtl_433
And is there a way to only print one line of output, no matter how long I pressed the button?
When I recorded a long button press, I saw that between the individual messages is a delay of 10000. However, adding this to my configuration, the decoder doesn´t match anymore. Or isn´t rows/reset not meant to do this kind of filtering?

The manual says the sender needs to be pressed for at least 2 sec and that the receiver will check 3 consecutive transmissions. If I keep the button pressed I´ll easily have 3+ transmission within this time slot. My idea would be that the result is only output when there are at least 3 complete transmissions?

md

unread,
Jun 9, 2024, 12:22:57 PMJun 9
to rtl_433
Sorry, forgot that a sample file says more than a 1000 words ;-)
recording.zip

md

unread,
Jun 9, 2024, 12:25:55 PMJun 9
to rtl_433
And one recording with multiple key presses
multiple.zip

Greg Troxel

unread,
Jun 10, 2024, 6:34:31 AMJun 10
to md, rtl_433
md <markusdau...@gmail.com> writes:

> Sample output when reading a file with "-r <savedsignal> -c
> ~/.config/rtl_433/Dickert.conf"
>
> time : @0.125118s
> model : Dickert count : 1 num_rows : 1
> rows :
> len : 111 data : 924b2d924b6db24b2cb2cb6cb2c8
> Pos1+2 : ++ Pos3+4 : 0- Pos5+6 : ++
> Pos7+8 : -- Pos9+10 : 0+
> codes : {111}924b2d924b6db24b2cb2cb6cb2c8
>
> Several questions:
>
> a) Do I always need to explicitly name my conf file with the -c argument
> for it to be considered?

I believe so. Flex decoders lack CRC so are ineligible to be default
on.

> b) The code consists of 10 Dip switches. However outputing 10 different
> values error'ed out with something like "no more than 8 getters possible".
> So I made that "trick" and printed 2 switch settings in one value and also
> calculated new values (it's 6 bit per dip switch) but now ofc not had to
> made an enum of 3 values, but of 3x3 values. Is there a better way to do
> this? Looks a little bit awkward to me.

This is the second time this month that I've seen a comment about
exceeding 8 getters.

I would suggest you change the sources (to 16?) and recompile, and
perhaps submit a PR. I am unclear on the downsides of allowing more,
but then a) you'd be able to run what you want locally b) we'd have a
concrete proposal on the table and c) I bet it would provoke better
shared understanding.

Greg Troxel

unread,
Jun 10, 2024, 6:37:58 AMJun 10
to md, rtl_433
md <markusdau...@gmail.com> writes:

> And is there a way to only print one line of output, no matter how long I
> pressed the button?
> When I recorded a long button press, I saw that between the individual
> messages is a delay of 10000. However, adding this to my configuration, the
> decoder doesn´t match anymore. Or isn´t rows/reset not meant to do this
> kind of filtering?
>
> The manual says the sender needs to be pressed for at least 2 sec and that
> the receiver will check 3 consecutive transmissions. If I keep the button
> pressed I´ll easily have 3+ transmission within this time slot. My idea
> would be that the result is only output when there are at least 3 complete
> transmissions?

Generally, rtl_433 prints each received signal.

If you want to recreate "pressed for N esconds" semantics, then the way
to do it (now) is to write a python program and pipe the json decodes
into it and implement your logic. Or really any language.

I use

-F syslog:127.0.0.1:1433

and you can see rtl_433_mqtt_relay.py for how that is received.

See #2957 and #2640. But I do not expect us to cross into the kind of
decoding you want within rtl_433, at least not soon.

md

unread,
Jun 10, 2024, 4:31:17 PMJun 10
to rtl_433
Re 2 myself: "Do I always need to specify -c to ...." 
No! It can be put just the same in the config file directly.
So this will work as well and will automatically be used

~/.config/rtl_433/rtl_433.conf

#-v
verbose

# -s 1M
sample_rate 1M

# enable TFA 30.3161 rain sensor
# protocol 37

decoder {
n=Dickert_Flex,
m=OOK_PCM,
s=365,
long=365,
bits=111,
gap=900,
reset=10000,am not sure
rows>=1,

    get=Pos1+2:@0:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
    get=Pos3+4:@12:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
     get=Pos5+6:@24:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
     get=Pos7+8:@36:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
     get=Pos9+10:@48:{12}:[2340:++ 2348:+0 2349:+- 2852:0+ 2860:00 2861:0- 2916:-+ 2924:-0 2925:--],
}

Re: Multiple repetitions.
I am not sure if we mean the same:

If I record a signal from my rain sensor (protocol 37 by the way) I can clearly see that it is basically the same message sent 7x one after the other. However, rtl_433 does not print it 7 times, but - apparently - only when it sees the signal 7 times it is printed once. I haven´t verified this though. 

I tried to accomplish my goal using the reset and gap settings for the decoder but I am not sure how to properly use them. What exacly does "gap" specify? In my signals all the 1 and 0 are next to each other, so there is no gap in between. So is this gap = 0? Or is gap the delay between two consecutive repetitions (when I keep the button on the remote pressed)?

So it´s not about any post processing via mqtt or syslog or whatever.

Christian Z.

unread,
Jun 10, 2024, 4:54:43 PMJun 10
to rtl_433
Possible getter count in flex is now increased from 8 to 12 with https://github.com/merbanan/rtl_433/commit/cd74bcc

md

unread,
Jun 11, 2024, 4:54:21 PMJun 11
to rtl_433
Thank you for this change!
Reply all
Reply to author
Forward
0 new messages