rtl_433 icon indicating copy to clipboard operation
rtl_433 copied to clipboard

Add support for ELRO home control remote

Open jenskdsgn opened this issue 2 years ago • 11 comments

ELRO AB440R is a simple power socket on and off switch

jenskdsgn avatar May 09 '22 18:05 jenskdsgn

This is very likely just the tenary signal of a EV1527 or similar. Best to use a flex decoder for such remotes, see https://github.com/merbanan/rtl_433/tree/master/conf

zuckschwerdt avatar May 09 '22 18:05 zuckschwerdt

@zuckschwerdt can you point me to some documentation of flex decoder so I can give it a try?

jenskdsgn avatar May 09 '22 21:05 jenskdsgn

We only have the examples in the conf files and the short help from rtl_433 -X for now.

zuckschwerdt avatar May 10 '22 06:05 zuckschwerdt

I don't see how I can only take even-bits into consideration and use the odd-bits which are always 1 as some kind of sanity check.

jenskdsgn avatar May 10 '22 07:05 jenskdsgn

They are only always on by chance, the third ternary symbol just isn't used here.

For the

BBBB:  1000 = button A
       0100 = button B
       0010 = button C
       0001 = button D
SS:    10 = ON
       01 = OFF

You can view the full pattern as

1B1B1B1B:  11101010 = 0xea = 234 = button A
           10111010 = 0xba = 186 = button B
           10101110 = 0xae = 174 = button C
           10101011 = 0xab = 171 = button D
1S1S:      1110 = 0xe = 14 = ON
           1011 = 0xb = 11 = OFF

And e.g. then write getters:

get=@10:{8}:button:[234:A 186:B 174:C 171:D],
get=@20:{4}:toggle:[11:OFF 14:ON],

Since channel is fixed you best filter that with a match=

zuckschwerdt avatar May 10 '22 08:05 zuckschwerdt

They are only always on by chance, the third ternary symbol just isn't used here.

For the

BBBB:  1000 = button A
       0100 = button B
       0010 = button C
       0001 = button D
SS:    10 = ON
       01 = OFF

You can view the full pattern as

1B1B1B1B:  11101010 = 0xea = 234 = button A
           10111010 = 0xba = 186 = button B
           10101110 = 0xae = 174 = button C
           10101011 = 0xab = 171 = button D
1S1S:      1110 = 0xe = 14 = ON
           1011 = 0xb = 11 = OFF

And e.g. then write getters:

get=@10:{8}:button:[234:A 186:B 174:C 171:D],
get=@20:{4}:toggle:[11:OFF 14:ON],

Since channel is fixed you best filter that with a match=

This is clear but the bits that are reversed for the channel information is quite tricky and I think can only be programmatically be solved unless we want to map each channel to the pattern which would be 32 pattern. Let me know how to proceed here.

jenskdsgn avatar Aug 19 '22 12:08 jenskdsgn

Ideally we need more decode helpers like the decode_uart in the flex spec. A decode_ternary or decode_x1527 would be nice (and could also sanity check).

zuckschwerdt avatar Aug 22 '22 11:08 zuckschwerdt

A generic symbol decode for flex was now added with #2161

To decode a 1B two-bit to one-bit format use e.g., note that the symbols bits need to be MSB aligned: symbol_zero={2}8,symbol_one={2}c

zuckschwerdt avatar Aug 27 '22 13:08 zuckschwerdt

For a payload format of 1C1C1C1C1C 1B1B1B1B 10 1S1S 1 e.g. 1011101110 10101110 10 1110 1 which is {25}bbabae8 you get {12}512 which is 010100010010:

rtl_433 -R 0 -X 'n=name,m=OOK_PWM,s=330,l=970,r=1200,symbol_zero={2}8,symbol_one={2}c' -y '{25}bbabae8'

The getters now would be: get=@0:{5}:channel, get=@5:{4}:button:[8:A 4:B 2:C 1:D], get=@10:{2}:toggle:[2:ON 1:OFF],

zuckschwerdt avatar Aug 27 '22 13:08 zuckschwerdt

There are two automated checks failing for this pull request. Perhaps it need an update?

petterreinholdtsen avatar Nov 03 '22 08:11 petterreinholdtsen

The goal is to make decoders like this easy as flex conf files. That way most users can tweak timings or adapt them for new devices.

zuckschwerdt avatar Nov 03 '22 08:11 zuckschwerdt