Kankun KK-SP3 – OpenWrt Webserver and Comandline Hacks
1. This Post shows how to find the IP address of Kankun KK-SP3 using the MAC ID displayed in Android App.
2. Explore the web-server running on Kankun KK-SP3
3. Kankun KK-SP3 Relay ON/OFF through Command line.
1.Finding the IP address of Kankun KK-SP3 WiFi smart plug.
Here is the MAC of two wifi smart plugs running.
These same MAC address can be found on the wifi routers DHCP Lease logs .
This video shows how to find the IP Address of wifi smart plug using DHCP Lease to Wifi router.
2.Creating WebPages on Kankun KK-SP3 openwrt Webserver
Login to Kankun Secured Shell using the following command
1 2 |
ssh root@192.168.1.4 'Substute your IP address found on the DHCP table |
The Password for root is admin
navigate to /www directory and create a file named index.html
1 2 |
cd /www vim index.html |
Paste the following script in the index.html file and save
1 2 3 |
<html> This is test page. </html> |
To save the file press Esc then : then W the Q
Change the file permission’s to Executable
1 |
chmod +x index.html |
and Now you can browse the webpage on
http://192.168.1.4 on mine you can put your Kankun IP Address.
Here is the video How to create web Pages.
3.Kankun KK-SP3 Relay ON/OFF through Command line.
Login to the secure shell of Kankun using the above mentioned username and password
Kankun KK-SP3 wifi smart plug shell login and relay activation by command line.
Turn on the relay
1 |
echo 1 > /sys/class/leds/tp-link:blue:relay/brightness |
Turn OFF the relay
1 |
echo 0 > /sys/class/leds/tp-link:blue:relay/brightness |
Here is the Video
Coming next the web script for controlling the relay