openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[silvercrestwifisocket] Add support for Lumitek/Ankuoo devices #4590

Closed ljalves closed 5 years ago

ljalves commented 5 years ago

The Silvercrest wifi socket binding can be easily enhanced to support "Ankuoo" devices.

Needed changes:

Some captured packets:

Socket plug (http://www.lumitek.cn/en/productsd.php?pid=1095): 0x0, 0x4, 0xdb, 0xdf, 0xf1, 0x21, 0xb4, 0x6, 0x0, 0x0, 0xff, 0xff

Module (http://www.lumitek.cn/en/productsd.php?pid=1093): 0x0, 0x0, 0x30, 0xd1, 0xf1, 0x21, 0xb4, 0x2, 0x0, 0x0, 0x0, 0xff 0x0, 0x16, 0x1a, 0xd1, 0xf1, 0x21, 0xb4, 0x6, 0x0, 0x0, 0xff, 0xff 0x0, 0x0, 0x39, 0xdf, 0xf1, 0x21, 0xb4, 0x61, 0x5c, 0x39, 0xf5, 0x63 0x0, 0x70, 0xd, 0xd1, 0xf1, 0x21, 0xb4, 0x62, 0x8, 0x8, 0x8, 0x8

kattlukt commented 5 years ago

These are also known as Malmbergs in Sweden. Would love to get them working with openhab!

ljalves commented 5 years ago

I ended up by making a new firmware for these devices... For now it has a MQTT client (so it just works with openhab) and I plan to keep adding more features (my goal would be to make it similar to espeasy). Can also be controlled by http requests (http://ip/state?sw=0 or 1)

Have it running on all my devices for 1 week now without any issue.

Feel free to try it: https://github.com/ljalves/hfeasy/ Can be easily reverted to the official firmware (something I'll never do!).

By the way, feel free to close this request... I don't need it anymore...

kattlukt commented 5 years ago

Ok, but the link does not work. Getting 404....

ljalves commented 5 years ago

Which link?

kattlukt commented 5 years ago

https://github.com/ljalves/hfeasy/

ljalves commented 5 years ago

Sorry, I forgot to make it public! Should work now...

kattlukt commented 5 years ago

Thank you!

ljalves commented 5 years ago

0v2 released (mostly adds mqtt authentication)

ljalves commented 5 years ago

The cool thing is that I can have 2 modules subscribed to the same mqtt topic and control both with 1 switch :)

stevo44444 commented 4 years ago

Hello, sorry i am new to this. can you tell me how to decrypt the UDP data from wireshark? I understand to use the 123456789abcdef key but not too sure how to do it. Thanks in advance