Upgrade Kankun Smart Plug

To preserve some changes and files I added. Add their path to sysupgrade.conf, in my case this is /www/ and /www/cgi-bin/.

# cat /etc/sysupgrade.conf

## This file contains files and directories that should
## be preserved during an upgrade.

# /etc/example.conf
# /etc/openvpn/
/www/
/www/cgi-bin/
root@cat:/rom/www/luci-static#

 

Download the upgrade to /tmp/

wget -O /tmp/openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin

Run the upgrade and set back and wait. One site I found on the web said they had problems with wireless being disabled after running sysupgrade -c on one of three attempts. If that happens it means I’ll be opening the case and soldering pins to the headers to get wireless enabled again.

sysupgrade -c /tmp/openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin

BusyBox v1.23.2 (2016-01-02 18:01:44 CET) built-in shell (ash)

W I R E L E S S F R E E D O M
—————————————————–
CHAOS CALMER (15.05.1, r48532)
—————————————————–
* 1 1/2 oz Gin Shake with a glassful
* 1/4 oz Triple Sec of broken ice and pour
* 3/4 oz Lime Juice unstrained into a goblet.
* 1 1/2 oz Orange Juice
* 1 tsp. Grenadine Syrup
—————————————————–

root@cat:~#

Seems like it worked, the plug is sitting there with a blue light like it is still upgrading.

root@cat:~# cat /etc/openwrt_release
DISTRIB_ID=’OpenWrt’
DISTRIB_RELEASE=’15.05.1′
DISTRIB_REVISION=’r48532′
DISTRIB_CODENAME=’chaos_calmer’
DISTRIB_TARGET=’ar71xx/generic’
DISTRIB_DESCRIPTION=’OpenWrt Chaos Calmer 15.05.1′
DISTRIB_TAINTS=”
root@cat:~# cat /etc/openwrt_version
15.05.1
root@cat:~#

After the install finished I was good and logged back in using the password that I had set for root. The relay didn’t work to turn the switch on and off  but adding two lines to rc.local corrected this problem.

echo 26 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio26/direction

After doing that and testing with a couple of reboots I can run the commands below to turn the outlet on and off from the CLI or go to the web page that I build and do the same there. Just the line with the word echo in them.

#ON:
#echo 1 > /sys/devices/virtual/gpio/gpio26/value
#OFF:
#echo 0 > /sys/devices/virtual/gpio/gpio26/value

Space is at a premium on this device after the upgrade.

root@corner:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.0M 256.0K 768.0K 25% /
/dev/root 2.0M 2.0M 0 100% /rom
tmpfs 14.2M 68.0K 14.1M 0% /tmp
/dev/mtdblock3 1.0M 256.0K 768.0K 25% /overlay
overlayfs:/overlay 1.0M 256.0K 768.0K 25% /
tmpfs 512.0K 0 512.0K 0% /dev
root@corner:~# exit
root@cat:/~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 512.0K 396.0K 116.0K 77% /
/dev/root 2.3M 2.3M 0 100% /rom
tmpfs 14.0M 64.0K 13.9M 0% /tmp
/dev/mtdblock3 512.0K 396.0K 116.0K 77% /overlay
overlayfs:/overlay 512.0K 396.0K 116.0K 77% /
tmpfs 512.0K 0 512.0K 0% /dev
root@cat:~#

Smartthings is broken now and I can’t use voice commands on Alexa for this plug either until I sort that out.

 

Advertisements
Quote | This entry was posted in Home Automation, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s