Getting Started with the Kankun Small K / KK-SP3
Out of the box
I recently purchased a couple of wifi switches. Specifically the Kankun Small K, which I bought through AliExpress.com for ~$20 each. Very reasonable, compared to others out there, for dipping your toes into the “smart home” world.
Once they arrived, I plugged them into a socket, plugged in a lamp, and installed the Kankun iOS app (which is in English and Simplified Chinese, even though the listing is in Chinese).
The manual that came with them was completely in Chinese, but luckily the iOS app has pretty good instructions in English for getting setup.
My home wifi is setup with both a 2.4ghz and 5ghz network with a shared SSID and password. This works fine for most devices, which just switch between them as needed depending on strength. The switches seemed to have trouble with that though, so I setup a guest network on 2.4ghz, and that seemed to work better.
Once they were configured, I could control them from the app. Hooray!
But I wanted to play a little further…
I was hoping to hack these little devices so I could communicate with them more easily from some kind of web-based dashboard. I did a little searching and discovered the Kankun wifi switch plug Google+ Community!
There are some great and informative people on there who’ve also had fun hacking their Kankun switches. In particular, member Mengke Li is very active and has become somewhat of a distributor for the items, based in Melbourne, Australia. Quite handy!
He’s also gone to the trouble of translating the manual into English too, which is awesome.
To get started with hacking the device, you need to be able to connect to them. Using the admin tool for your wifi router, you should be able to work out the IP address for your switches (tip: look at the switches listed in the iOS app, below the name is the MAC Address for the switch, which will help you identify the correct IP address from your router).
Once you know the IP address for a switch, using the Terminal application on a Mac (or PuTTY on Windows), connect to the device with Telnet:
This should then give you some direction on how to set a password for your device. Once you’ve set a password, you can connect over SSH instead of Telnet. You can do the same stuff, but it’s better to have secured the device, otherwise anyone on your wifi network could Telnet to the switches.
After setting the password with
passwd, you can SSH to the switch:
Then you’ll be prompted for the password.
Now you’re connected and can begin to customise your switch!
Happy hacking 🙂