Firmware Downloads


kankun-json CGI script

kankun-json is a CGI script to install on your Kankun Small K switch which gives it a JSONP API that can be used with the HomeDash dashboard.

Download kankun-json-0.0.1

Once you’ve downloaded the ZIP file above, unzip it. The file you need to copy to your Kankun switch is called json.cgi.

You can do this by opening the Terminal application on a Mac (or PuTTY on Windows), and doing the following steps, substituting the IP address for your own:

Note: The following assumes you’ve already done as much as shown in the Getting Started blog post.

1. Connect to the switch’s terminal

Connect via SSH:

ssh root@

You’ll then be prompted for the password you set in Getting Started.

You should now see something like this:

BusyBox v1.19.4 (2014-03-27 17:39:06 CST) built-in shell (ash)

Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
BARRIER BREAKER (Bleeding Edge, r39365)
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao

2. Create a cgi-bin directory

We’ll need to create a special directory called cgi-bin. It must be named this way, as the switch’s web server knows how to treat it then.

mkdir /www/cgi-bin/

3. Copy the json.cgi file to the switch

From your computer, wherever you downloaded and unzipped to, run this command:

scp json.cgi root@

You’ll be prompted to enter your password, and the file will copy over.

4. Set permissions

Now you’ll need to connect to the switch over SSH again, and run the following command to set permissions on the json.cgi file correctly:

chmod -R 0755 /www/

5. Check everything worked

Now browse to the json.cgi file on your switch’s IP address in your browser (Safari, Google Chrome, Firefox, whatever you use):

You should see something like this:


You’re done installing kankun-json!

Want to control all your switches from a single web page? Visit My HomeDash.

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 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…