Basic wall plugs with codes like 12345ABCDE

Post here about devices that are not yet or not fully supported

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Post Reply
Message
Author
sierramike
New user
Posts: 3
Joined: 25 Jun 2018, 23:53

Basic wall plugs with codes like 12345ABCDE

#1 Post by sierramike » 26 Jun 2018, 00:48

Hello,

I'm pretty new to the RFLink, but it's been a while I'm sending commands to "cheap" 433MHz wall plugs that are coded with DIP switches 12345ABCDE.

Basically, 12345 is a combination set on the remote AND on the plugs, then A, B, C, D, E does set which switch of the remote it should respond to. Unfortunately, not all remotes provide the "E" button, most only present A to D.

But, when I decoded the code, and programmed it into an Arduino, I noticed that all combinations of ABCDE switches are possible, even if they don't respond to remote individual switches. I could set a combination like 1111101110 (setting B, C and D), and then send this code with my Arduino and get the plug play the command. This makes it possible to command up to 1024 different plugs.

Now, back to the RFLink. I plugged it on a Jeedom installation but that's not the purpose.

I'm listening to codes and pressing my remote buttons.

Using the remote code 11111, pressing button A, I get:
20;D8;AB400D;ID=60;SWITCH=1;CMD=OFF;

Using the remote code 01111, pressing button C, I get:
20;D8;AB400D;ID=5f;SWITCH=3;CMD=OFF;

Using the remote code 00111, pressing button D, I get:
20;D8;AB400D;ID=5d;SWITCH=4;CMD=OFF;

Well, it is known as AB400D protocol (let's ignore that RFLink also recognizes other weird commands, like Eurodomest, Kaku etc.).
So:
- converting 60(hex) to binary, I get: 01100000
- converting 5f(hex) to binary, I get: 01011111
- converting 5d(hex) to binary, I get: 01011101
I cannot recognize the remote code in those ...

Based on the following article : https://www.domoticz.com/forum/viewtopi ... 7075#p7075, I see that there should be some conversion table between AB400D protocol and the DIP switches.

I cannot find anywhere on the Internet any guide where I could find the command syntax for RFLink to calculate the codes depending on the plug's DIP switches.

Let's say, I have a switch where 12345ABCDE code is 1101100111. What values should I transmit to RFLink to emit the proper code?

This coding is so straightforward, I made it so simple in my Arduino sketches, can't understand why it is recognized so complex by RFLink ... Hope someone can help me with this?

User avatar
Stuntteam
Site Beheer
Posts: 786
Joined: 27 Jan 2016, 16:46

Re: Basic wall plugs with codes like 12345ABCDE

#2 Post by Stuntteam » 26 Jun 2018, 09:44

reverse the dip setting / bits
eg. 00111 becomes 11100
take that as binary and turn into hexadecimal (in this case 0x1c)
and add 0x41 (0x41+ 0x1c = 0x5d)
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8

sierramike
New user
Posts: 3
Joined: 25 Jun 2018, 23:53

Re: Basic wall plugs with codes like 12345ABCDE

#3 Post by sierramike » 26 Jun 2018, 10:14

Thanks, that's for the ID part, got it.

Now for the switch part, how would I encode ABCDE = 00111 ?

User avatar
Stuntteam
Site Beheer
Posts: 786
Joined: 27 Jan 2016, 16:46

Re: Basic wall plugs with codes like 12345ABCDE

#4 Post by Stuntteam » 26 Jun 2018, 12:03

looks like buttons a,b,c,d,e are corresponding to switch numbers 1,2,3,4,5
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8

sierramike
New user
Posts: 3
Joined: 25 Jun 2018, 23:53

Re: Basic wall plugs with codes like 12345ABCDE

#5 Post by sierramike » 26 Jun 2018, 13:14

If you read carefully what I wrote before, even if A, B, C, D, E are designating remote buttons :
10000 = Button A
01000 = Button B
00100 = Button C
00010 = Button D
00001 = Button E

It is safe to configure a plug with a code 01110. You won't be able to send commands from regular remotes because you can't configure them for such a code, but you can still send the corresponding RF code so that it is recognized by the plug. This enhances the quantity of codes available to 1024, reducing the risk of using the same codes as the neighbours.

These plugs just recognize a 10 bits code. And this theory has been verified including by myself by sending the code from an Arduino via my own sketch.

It is sad that RFLink places an abstraction layer on this instead of simply leaving us writing the 10 bits code we want to send.

User avatar
Stuntteam
Site Beheer
Posts: 786
Joined: 27 Jan 2016, 16:46

Re: Basic wall plugs with codes like 12345ABCDE

#6 Post by Stuntteam » 26 Jun 2018, 16:27

You can make pretty much any code you want with the RFFind option.
Alternatively it is possible to extend the RFlink code, but so far noone needed it and noone bothered to send any debug logs or other info.
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests