• 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


Aukey Switches
#1
Brick 
Hi everyone,

I'd like to request protocol support for switches branded "Aukey" see here

These are the results from Debug output:
Code:
Switch 1 On     284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 852 284 852 284 852 284 852 284 284 9656
Switch 1 Off    284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 852 284 852 284 852 284 284 852 284 9656
Switch 2 On     284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 852 284 852 284 284 852 852 284 284 9656
Switch 2 Off    284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 852 284 852 284 284 852 284 852 284 9656
Switch 3 On     284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 852 284 284 852 852 284 852 284 284 9656
Switch 3 Off    284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 852 284 284 852 852 284 284 852 284 9656
Switch 4 On     284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 284 852 852 284 852 284 852 284 284 9656
Switch 4 Off    284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 284 852 852 284 852 284 284 852 284 9656
Switch All On   284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 284 852 284 9656
Switch All Off  284 852 284 852 852 284 852 284 284 852 852 284 852 284 852 284 852 284 852 284 284 852 852 284 284 852 852 284 284 852 284 852 852 284 284 852 284 852 852 284 284 852 284 852 284 852 852 284 284 9656

I did some analysis using the pilight-debug output. Following results:
  • One command consists of 50 pulses
  • Pulse lengths are multiples of around 284us
  • Pulses are always in pairs of one short (284us) and one long (3x 284us = 852us) pulse except for the last one (footer) which is one short pulse and one very long (34x 283us = 9656us)
  • Order of those pairs (long first or short first) decides about the transmitted bit
  • That results in the protocol having 24 payload bits and the footer
  • I was not yet able to define the single bits of the payload as I only have one setup here. I would assume there would be a portion identifying the remote (might be up to 20 bits because in my case only the last 4 bits are varying depending on the actually pressed button)
  • For the single switch cases the last bit seems to determine the command (i.e. 1=on, 0=off) but it is actually the other way around for the switch ALL circuits button







This would be my translation assuming short first = 0 and long first = 1 (might as well be exactly the other way around)
Code:
Switch 1 On    00110111110101001001 111 1 F
Switch 1 Off   00110111110101001001 111 0 F
Switch 2 On    00110111110101001001 110 1 F
Switch 2 Off   00110111110101001001 110 0 F
Switch 3 On    00110111110101001001 101 1 F
Switch 3 Off   00110111110101001001 101 0 F
Switch 4 On    00110111110101001001 011 1 F
Switch 4 Off   00110111110101001001 011 0 F
Switch All On  00110111110101001001 001 0 F
Switch All Off 00110111110101001001 000 1 F

I have tried sending the above raw codes, they all work.

I'd be thankful if anyone would find the time to create a protocol from that or support me in doing so. I guess it would even be okay not to support the "Switch All" case if that makes things easier.

Thanks everyone and please let me know if there's anything else I should investigate to support protocol development.

BR,
Markus
 
Reply
#2
Just try based on the existing protocols and we'll help you on the way.
 
Reply
#3
Thanks for the fast reply!

I have created a protocol for the simple case (not handling the "All" case). I have attached that here. I'll try and figure out how to get that into my raspberry tomorrow. Any hints are welcome. Do I need to recompile pilight completely or is there a way to just compile and add the protocol?


Attached Files
.zip   aukey_switch.zip (Size: 2.86 KB / Downloads: 6)
 
Reply
#4
Easiest is to fully recompile.
 
Reply
#5
I did a recompile and tried my new protocol. After fixing a compile error the protocol seems to be able to build but is not running. I have attached the latest version of the code (including the special case handling for the "ALL" switches). When I do a "pilight-receive" the protocol is not listed. When I try a pilight send I receive an error:

Code:
pilight-send -p aukey_switch -s 601068 -u 5 -t
pilight-send: ERROR: failed to send codes

How can I debug deeper what exactly is failing? Is there a way to raise verbose level?

Thanks!

Ok never mind. For some magical reason after restarting the pilight daemon it is working now. I'll test some more.

What would be the process to get this supported natively by pilight?
 
Reply
#6
Letting your final code be reviewed by us first.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Unitec Switches rien-ne-va-plus 48 33,842 05-29-2019, 02:16 PM
Last Post: bitboy
  RSL366T Switches juri 60 31,446 05-24-2018, 06:48 PM
Last Post: bobg
  [Fully Supported] Clarus Switches Marcin 69 30,980 01-30-2018, 07:10 PM
Last Post: Niek
  Unitec / Intertek Switches dieterhatn 1 1,456 03-07-2017, 07:04 PM
Last Post: pilino1234
  CLOSED: Unbranded White Programmable plug-in wall switches alasdairc 8 3,341 11-13-2016, 11:47 PM
Last Post: alasdairc
  eHome Switches ligi 95 39,886 12-01-2014, 04:40 PM
Last Post: curlymo
  DBPower Switches joaoasilva 5 3,543 09-25-2014, 08:45 PM
Last Post: joaoasilva
  Support for Schwaiger/Goobay switches plinden 10 6,787 05-16-2014, 11:20 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)