• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


[Fully Supported] Remote Control Socket (RC101-U/RC201)
#1
Hi there,

I have a set of remote controlled power plugs which aren't branded, but is a 4-plug version of these: http://www.made-in-china.com/showroom/hd...C201-.html

So far I have managed to mirror the functionality of the remote control by using the raw protocol to broadcast the codes found by pilight-debug, however I'm wanting to look at building a protocol plugin so that the commands to control the plugs are much simpler than: sudo pilight-send -p raw -c "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 717 239 717 239 239 717 717 239 239 717 239 717 239 717 239 717 717 239 717 239 239 8126"
=> turns into something like sudo pilight-send -p protocol --on --id=1

The following is the codes for each of the buttons on the remote:

Code:
"S1_ON" => "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 717 239 717 239 239 717 717 239 239 717 239 717 239 717 239 717 717 239 717 239 239 8126",
"S1_OFF" => "239 717 717 239 239 717 717 239 239 717 239 956 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 8126",
"S2_ON" => "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 239 717 717 239 717 239 239 717 717 239 239 717 239 717 239 717 717 239 717 239 717 239 239 8126",
"S2_OFF" => "240 720 720 240 240 720 720 240 240 720 240 720 720 240 240 720 720 240 720 240 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 720 240 720 240 240 720 720 240 240 720 240 720 720 240 720 240 720 240 720 240 240 8160",
"S3_ON" => "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 239 717 717 239 239 717 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 8126",
"S3_OFF" => "240 720 720 240 240 720 720 240 240 720 240 720 720 240 240 720 720 240 720 240 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 720 240 240 720 720 240 240 720 720 240 240 720 240 720 720 240 240 720 240 720 240 720 240 8160",
"S4_ON" => "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 717 239 239 717 239 717 717 239 239 717 239 717 239 717 239 717 717 239 239 717 239 8126",
"S4_OFF" => "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 239 717 239 717 717 239 239 717 239 717 717 239 239 717 717 239 239 717 239 8126",
"ALL_ON" => "240 720 720 240 240 720 720 240 240 720 240 720 720 240 240 720 720 240 720 240 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 720 240 240 720 240 720 240 720 720 240 240 720 240 720 720 240 240 720 240 720 720 240 240 8160",
"ALL_OFF" => "239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 239 717 239 717 239 717 239 717 717 239 239 717 239 717 239 717 717 239 239 717 717 239 239 8126"

Anyone feel like pointing me in the right direction?
 
Reply
#2
Can you post full pilight-debug output for each button?
 
Reply
#3
Here you go:

Code:
Plug 1 On
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    246

Raw code:
246 738 738 246 246 738 738 246 246 738 246 738 738 246 246 738 738 246 738 246 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 738 246 738 246 738 246 738 246 246 738 738 246 246 738 246 738 246 738 246 738 738 246 738 246 246 8364
Binary code:
0011011111000110

Plug 1 Off
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    244

Raw code:
244 732 732 244 244 732 732 244 244 732 244 732 732 244 244 732 732 244 732 244 244 732 244 732 244 732 244 732 244 732 244 732 244 732 244 732 244 732 244 732 244 732 732 244 732 244 732 244 244 732 732 244 244 732 244 732 732 244 244 732 732 244 732 244 244 8296
Binary code:
0011011111000110

Plug 2 On
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    246

Raw code:
246 738 738 246 246 738 738 246 246 738 246 738 738 246 246 738 738 246 738 246 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 738 246 246 738 738 246 738 246 246 738 738 246 246 738 246 738 246 738 738 246 738 246 738 246 246 8364
Binary code:
0011011111100100

Plug 2 Off
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    245

Raw code:
245 735 735 245 245 735 735 245 245 735 245 735 735 245 245 735 735 245 735 245 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 735 245 735 245 245 735 735 245 245 735 245 735 735 245 735 245 735 245 735 245 245 8330
Binary code:
0011011111100100

Plug 3 On
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    246

Raw code:
246 738 738 246 246 738 738 246 246 738 246 738 738 246 246 738 738 246 738 246 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 246 738 738 246 738 246 246 738 738 246 246 738 738 246 246 738 246 738 246 738 246 738 246 738 246 738 246 8364
Binary code:
0011011111000111

Plug 3 Off
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    245

Raw code:
245 735 735 245 245 735 735 245 245 735 245 735 735 245 245 735 735 245 735 245 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 245 735 735 245 245 735 735 245 245 735 735 245 245 735 245 735 735 245 245 735 245 735 245 735 245 8330
Binary code:
0011011111000111

Plug 4 On
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    240

Raw code:
240 720 720 240 240 720 720 240 240 720 240 720 720 240 240 720 720 240 720 240 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 240 720 720 240 720 240 720 240 240 720 240 720 720 240 240 720 240 720 240 720 240 720 720 240 240 720 240 8160
Binary code:
0011011111010111

Plug 4 Off
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    239

Raw code:
239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 717 239 239 717 239 717 717 239 239 717 239 717 717 239 239 717 717 239 239 717 239 8126
Binary code:
0011011111010111

All On
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    239

Raw code:
239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 239 717 239 717 239 717 717 239 239 717 239 717 717 239 239 717 239 717 717 239 239 8126
Binary code:
0011011111010110

All Off
--[RESULTS]--

pulse:        3
rawlen:        66
binlen:        16
pulselen:    239

Raw code:
239 717 717 239 239 717 717 239 239 717 239 717 717 239 239 717 717 239 717 239 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 239 717 717 239 239 717 239 717 239 717 239 717 717 239 239 717 239 717 239 717 717 239 239 717 717 239 239 8126
Binary code:
0011011111110100
 
Reply
#4
Just wondering if anything came of this topic? I've tried playing around with a few things but haven't gotten anywhere.
 
Reply
#5
Not yet. Will be on the list.
 
Reply
#6
Hi,

I have two sets of something quite similar. Here is a picture of the box:

[Image: REMOTE%20CONTROL%20POWER%20SOCKET-500x500.jpg]

Here are the raw pulse timings (I must admit, I haven't assembled the proper pilight setup. I'm just using a modified version of sweetpi's rfcontrol + super heterodyne receiver on an arduino).


remote 1:
Code:
    s1 on => "712 272 716 280 708 280 708 276 232 760 228 756 708 280 712 276
708 280 232 756 232 760 228 756 232 760 228 760 228 760 228 756
232 756 232 760 228 760 232 756 708 276 712 280 708 276 712 276
712 276 712 276 708 280 708 280 712 272 712 280 232 756 228 752
232 8100"
    s1 off => "716 272 712 272 716 280 708 284 228 760 228 756 708 276 712 280
708 280 228 760 232 760 228 756 228 764 228 760 228 760 228 768
220 760 228 764 228 756 232 756 232 756 708 284 708 276 712 276
712 276 708 280 712 276 708 284 228 760 224 764 700 284 228 752
228 8100"
    s2 on => "712 276 712 280 708 280 708 284 228 756 228 760 708 284 704 280
708 280 232 756 228 764 228 756 232 764 220 764 228 756 232 760
228 760 228 760 232 760 224 760 708 280 232 760 704 280 708 280
708 284 708 280 704 280 708 280 708 280 228 760 708 280 232 748
232 8104"
    s2 off => "716 276 712 276 712 280 708 280 228 760 224 764 704 284 704 280
708 288 220 764 224 768 224 756 228 768 224 764 220 764 228 764
224 760 228 764 228 760 228 756 232 756 232 752 712 280 708 284
708 280 704 284 704 284 700 284 228 760 708 280 708 280 228 752
228 8100"
    s3 on => "712 276 712 276 708 280 708 284 228 760 228 756 712 280 704 284
708 280 228 760 224 764 228 760 224 768 220 764 228 764 224 764
224 760 228 760 232 760 228 760 708 280 704 284 228 760 704 284
704 284 704 280 708 280 708 280 708 280 708 280 708 284 228 752
224 8104"
    s3 off => "708 280 712 276 708 280 708 284 224 760 228 760 708 280 708 280
708 284 224 760 228 764 224 760 228 764 224 760 228 760 228 760
228 760 232 756 228 764 228 756 232 756 708 284 228 756 708 280
708 280 708 280 708 280 708 284 224 760 228 764 224 756 712 272
228 8100"
    s4 on => "752 240 748 240 748 240 748 240 268 716 268 720 752 240 744 244
748 240 264 724 264 724 264 724 264 724 264 724 264 724 264 724
264 724 264 724 264 724 264 724 740 248 740 248 740 252 256 728
740 248 740 248 736 252 740 248 740 248 736 252 260 728 736 240
260 8072"
    s4 off => "760 228 760 228 788 200 760 232 276 696 312 688 760 228 768 220
756 232 280 696 292 712 272 716 292 692 280 708 276 704 284 716
272 716 292 696 272 716 272 704 284 716 752 232 752 240 272 712
756 232 756 232 764 216 760 240 272 716 272 712 752 236 752 232
268 8056"
    all on => "716 272 716 272 712 276 712 276 232 756 232 756 712 276 712 276
712 280 228 756 228 764 228 756 232 760 228 764 224 760 228 760
228 760 228 760 228 760 232 756 228 756 716 280 228 760 224 764
704 280 708 276 712 280 708 284 224 760 228 764 224 760 228 752
228 8096"
    all off => "720 268 720 272 712 260 732 272 236 756 232 748 720 268 716 276
712 276 232 760 228 760 228 756 232 756 232 752 236 756 232 756
232 756 236 748 236 756 232 756 708 280 232 756 232 756 232 756
708 276 716 272 716 276 708 276 712 276 232 756 232 756 232 744
236 8096"
remote 2:
Code:
        s1 on =>
"716 280 716 276 712 280 232 760 712 284 224 768 224 764 712 284
704 288 228 764 228 764 224 768 224 768 224 768 228 764 224 768
228 760 232 760 228 768 228 760 712 280 712 280 708 284 712 280
712 276 712 284 708 288 224 764 708 280 712 284 708 284 228 756
228 8132"
        s1 off =>
"720 276 720 268 720 280 232 756 716 272 240 760 232 760 708 280
712 284 228 764 228 756 236 764 228 764 228 764 228 760 232 764
228 760 232 760 232 760 232 760 232 764 712 280 708 280 712 284
708 280 712 280 712 284 224 764 232 760 232 764 228 756 716 268
236 8128"
        s2 on =>
"736 256 740 252 740 256 252 732 744 252 256 732 260 736 740 252
740 252 260 732 256 736 260 732 260 736 256 736 252 740 256 736
256 736 260 732 256 736 260 732 740 252 260 736 736 256 736 252
740 252 740 252 740 256 252 736 740 252 256 740 252 740 740 244
256 8116"
        s2 off =>
"720 268 720 276 716 280 228 760 716 280 232 760 232 760 712 276
712 284 228 764 228 760 232 760 232 764 228 764 228 764 228 764
232 760 228 764 228 764 228 760 232 764 228 764 708 280 712 280
716 280 708 280 716 276 232 760 232 760 716 276 228 764 712 272
232 8132"
        s3 on =>
"720 272 716 284 712 276 232 760 716 280 228 756 236 764 708 280
708 284 232 760 232 760 232 760 228 764 232 760 232 760 232 764
228 760 232 760 232 760 236 756 712 284 708 284 224 760 716 280
708 284 712 280 712 284 228 760 712 280 712 280 232 760 712 272
228 8136"
        s3 off =>
"716 276 716 276 712 284 232 752 716 276 236 764 228 760 712 280
712 284 228 764 228 760 228 768 224 764 228 764 232 764 228 760
232 760 228 768 224 760 232 764 228 764 712 280 228 760 716 280
708 284 708 284 708 284 228 764 228 764 228 760 712 280 712 276
228 8132"
        s4 on =>
"716 276 716 280 708 284 228 760 712 280 232 764 232 764 708 280
708 284 228 764 228 764 228 760 232 760 228 768 228 764 228 764
228 764 228 764 228 764 228 764 712 280 712 280 708 284 228 760
712 284 708 280 712 280 232 760 712 280 712 280 712 280 712 276
228 8128"
        s4 off =>
"724 268 720 276 716 276 236 752 720 276 232 760 232 756 716 280
712 284 228 760 232 764 228 760 232 760 232 760 232 760 228 764
228 764 232 764 228 764 228 760 232 760 712 280 716 276 232 760
712 280 712 280 712 284 228 760 232 760 228 764 232 764 232 748
232 8136"
        all on =>
"724 264 724 276 712 280 236 756 712 280 232 760 232 760 712 284
708 276 232 764 232 760 228 764 232 764 224 768 228 764 224 772
224 760 232 760 232 764 228 764 228 760 712 280 232 760 232 760
708 288 708 276 712 280 232 760 232 764 228 764 708 284 228 752
232 8132"
        all off =>
"720 276 716 272 716 284 228 760 716 280 224 768 232 756 712 280
712 280 228 760 232 764 232 756 232 764 228 760 232 764 228 764
232 760 232 756 232 768 224 760 716 280 228 764 228 760 232 760
716 276 716 280 712 280 228 760 716 280 228 764 712 280 232 752
228 8132"

Which I break down as 66 pulses, averaging about 250 = 0, 730 = 1 and 8100ms = footer.

From the order of pulses though, it seems to be a different protocol...

Also, rcswitch summarises as follows:

remote 1:
Code:
column 1   2    3             4    5    6  7
1 on:  011 1001 1100000000000 1111 1111 11 00
1 off: 011 1001 1100000000000 0111 1111 00 10
2 on:  011 1001 1100000000000 1011 1111 10 10
2 off: 011 1001 1100000000000 0011 1111 01 10
3 on:  011 1001 1100000000000 1101 1111 11 10
3 off: 011 1001 1100000000000 0101 1111 00 01
4 on:  011 1001 1100000000000 1110 1111 11 01
4 off: 011 1001 1100000000000 0110 1111 00 11
A on:  011 1001 1100000000000 0100 1111 00 00
A off: 011 1001 1100000000000 1000 1111 10 00

remote 2:

Code:
column 1   2    3             4    5    6  7
1 on:  011 0100 1100000000000 1111 1110 11 10
1 off: 011 0100 1100000000000 0111 1110 00 01
2 on:  011 0100 1100000000000 1011 1110 10 01
2 off: 011 0100 1100000000000 0011 1110 01 01
3 on:  011 0100 1100000000000 1101 1110 11 01
3 off: 011 0100 1100000000000 0101 1110 00 11
4 on:  011 0100 1100000000000 1110 1110 11 11
4 off: 011 0100 1100000000000 0110 1110 00 00
A on:  011 0100 1100000000000 0100 1110 00 10
A off: 011 0100 1100000000000 1000 1110 10 10

I have broken these down into identical versus non identical columns.

Columns 1 and 3 are identical across all buttons on both remotes.
Columns 2 and 5 are identical across all buttons, but different on each remote
Columns 4 and 6 are identical across both remotes but different for each button. I take it these are the button IDs
Column 7 fits a similar pattern grouping buttons across both remotes, but the numbers don't match up.
 
Reply
#7
I've uploaded a first version of this protocol. Can you guys please test!

Consider a donation if it works for you
 
Reply
#8
pilight works fine using 'raw' protocol but will not accept (invalid id error message) with the computed ID value 57767 when configured using 'rc101' protocol in pilight config.json.

The switch hardware is labeled 'Bauhn' - common on ebay (AU) and probably same as displayed in green pack shown in image above.

Here is how I have interpreted the raw code - am I missing something?:

# PairVals = Binary
----|--------------|-------
00. 729 243 = 1
01. 729 243 = 1
02. 729 243 = 1
03. 243 729 = 0
04. 243 729 = 0
05. 729 243 = 1
06. 243 729 = 0
07. 729 243 = 1
08. 729 243 = 1
09. 243 729 = 0
10. 243 729 = 0
11. 243 729 = 0
12. 243 729 = 0
13. 729 243 = 1
14. 729 243 = 1
15. 729 243 = 1
16. 243 729 = 0
17. 243 729 = 0
18. 243 729 = 0
19. 243 729 = 0 (0-19 gives the ID = 57767)

ON: OFF:
20. 729 243 = 1 (20 State=1) 247 741 = 0 (State = 0)

Unit ON: Unit OFF:
21. 729 243 = 1 247 741 = 0
22. 729 243 = 1 741 247 = 1
23. 729 243 = 1 (21-23 Unit=7 (inverted 111)) 741 247 = 1 (Unit=3 (inverted 011))

24. 729 243 = 1
25. 729 243 = 1
26. 729 243 = 1
27. 243 729 = 0
28. 243 729 = 0
29. 243 729 = 0
----------------------- Ignore below here
30. 243 729 = 0
31. 729 243 = 1
32. 243 8262

BINARY REPRESENTATION OF ABOVE:
11100101100001110000 1 111 111000
 
Reply
#9
Hi tsinatra@uymail.com,

Can you post the raw values for each button? I also have bauhn (Aldi) switches, and the remote and plugs work interchangeably with the generic ones I mentioned earlier.

I guess I should also grab/post the raw data from the new bauhn remotes I purchased...
 
Reply
#10
Since running into the rc101 protocol ID problem, I am only testing with a single switch. Using the 'raw' protocol below works well - it is the same Bauhn switch as mentioned in earlier post

ON...
pilight-send -p raw -c "729 243 729 243 729 243 243 729 243 729 729 243 243 729 729 243 729 243 243 729 243 729 243 729 243 729 729 243 729 243 729 243 243 729 243 729 243 729 243 729 729 243 729 243 729 243 729 243 729 243 729 243 729 243 243 729 243 729 243 729 243 729 729 243 243 8262"

OFF...
pilight-send -p raw -c "723 482 723 241 723 241 241 723 241 723 723 241 241 723 723 241 723 241 241 723 241 723 241 723 241 723 723 241 723 241 723 241 241 723 241 723 241 723 241 723 241 723 723 241 723 241 723 241 723 241 723 241 723 241 241 723 723 241 241 723 241 723 723 241 241 8194"

If you end up using the switches long term, then do seriously consider using using the ATTiny45 pilight firmware add-on - I can confirm that adding ATTiny45 filtering does reduce CPU usage very sigificantly... although, at the moment, I have to disconnect the ATTiny reset pin to reliably receive signals on a raspberry pi setup... I am still investigating that.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Partially Supported] TFA / Conrad Weather Yves 203 77,384 03-27-2020, 01:21 PM
Last Post: Ascenion
  [Fully Supported] KlikAanKlikUit Motion Sensor koen01 37 29,069 03-26-2020, 02:46 PM
Last Post: Gisto
Lightbulb [Fully Supported] Kaku Door sensor (AMST-606) geerttttt 53 45,988 10-19-2019, 06:26 PM
Last Post: curlymo
  [Fully Supported] DHT22 IcedEarth 86 63,462 11-18-2018, 09:33 AM
Last Post: curlymo
  [Fully Supported] Arctech Old Martin 111 73,857 03-27-2018, 04:43 PM
Last Post: genfersee
  11 Key RF Remote, LED controller Jeroenk 24 22,155 02-02-2018, 01:29 AM
Last Post: Silverhawk1986
  [Fully Supported] Clarus Switches Marcin 69 52,282 01-30-2018, 07:10 PM
Last Post: Niek
  [Fully Supported] LM75 and LM76 temperature sensor horst_dieter 64 46,992 11-19-2017, 08:54 PM
Last Post: edepi
  Hafele TV-elevator remote wessel_k 1 2,123 09-06-2017, 09:57 PM
Last Post: wessel_k
  [Fully Supported] No-brand temp/humidity sensor (alecto_ws1700) meloen 57 62,501 12-25-2016, 09:53 PM
Last Post: creamers

Forum Jump:


Browsing: 1 Guest(s)