Kankun Smart Wifi Plug

From Omnia
Revision as of 15:57, 21 January 2017 by Kenneth (talk | contribs) (Created page with "Anites: Hacking Kankun Smart Wifi Plug - http://www.anites.com/2015/01/hacking-kankun-smart-wifi-plug.html To enable connection via ssh key (and not password) you need to pla...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Anites: Hacking Kankun Smart Wifi Plug - http://www.anites.com/2015/01/hacking-kankun-smart-wifi-plug.html

To enable connection via ssh key (and not password) you need to place the authorized key in /etc/dropbear/authorized_keys (and not the traditional ~/.ssh/authorized_keys)

The home-assistant configuration in case someone need:

switch:
platform: command_line
switches:
ikonke:
command_on: "ssh root@[switch-ip] 'echo 1 > /sys/class/leds/i-konke:red:relay/brightness'"
command_off: "ssh root@[switch-ip] 'echo 0 > /sys/class/leds/i-konke:red:relay/brightness'"


or depending on the version of your Kankun switch:

switch:
platform: command_line
switches:
ikonke:
command_on: "ssh root@[switch-ip] 'echo 1 > /sys/class/leds/tp-link:blue:relay/brightness'"
command_off: "ssh root@[switch-ip] 'echo 0 > /sys/class/leds/tp-link:blue:relay/brightness'" 

http://www.anites.com/2015/01/hacking-kankun-smart-wifi-plug.html