Wemo Lights

I wanted a way to control my Smart Home devices inside the house if I had no Internet connection. I have a mix of Wemo and Kankun plugs right now that I’m using to control various lamps and my outdoor light.

I built a small web page on my Raspberry Pi with buttons for each device. I need to do a lot of cleanup to get the buttons lined up but what I used for the Wemo devices had a lot of padding around each image that was used. The small red light indicates the switch is on, on the Driveway button no light indicates it is off.

pi-webpage

Below is an image from the Wemo pages that I replaced with the buttons shown above.

on-1

For Wemo’s I used the instructions found here. I had a fair amount of trouble getting this working correctly because of permission issues. First it wouldn’t build the database because of a missing line at the top of wemo_backend.py not sure if I deleted that or if it was just missing but I added “#!/usr/bin/python” and that ran. Then I had to create the logfile in “/var/log/wemo/switchlog”.

Samsung Smartthings Hub

To get Google Home to play with my WeMo switches I ordered one of these hubs. For about fifty dollars it added a bunch of other features like door and window sensors along with multi sensors that can detect water leaks and motion. I sent Google Home back as it wasn’t as well integrated with other devices  as the Echo Dot ,aka Alexa and cost $99.99 on sale compared to Alexa at $39.99 on sale.

This has been easy to setup but requires another app on my phone and a connection to the cloud to work.

I used the labs section and connected my WeMo devices immediately and they worked with no more problems. I went to the Google Home and said hey google, “turn on the Christmas lights”, and everything worked. With Alexa I didn’t need the smart hub to make this work as the plug for this was a WeMo and native to Alexa.

The hub did add other options though like motion, and temperature sensing. I can’t find a decent doorbell option though. I just want the doorbell to ring inside and record when it was used, no fancy video or two way communication needed.

Geofencing

Once I got my location set this seems to work pretty well.

I have eight devices setup with the hub now, Belkin Wemo, Amcrest SmartPlug, Samsung Multisensor, Aeon Multisensor, and a Samsung Door sensor. The Amcrest SmartPlug has been the most interesting so far, it is a re-branded Kankun plug that needed some slight tweaking to make it work but cost about ten dollars less than the Wemo switch that does the same thing.

Google Home Arrived and was returned

Setup took about ten minutes from unboxing to being in use. It probably would have taken less time if I had my phone and the Google Home on the same wireless network.

I have two WiFi networks and decided to try and switch Google home to the one with the stronger signal. This left me in a loop for several minutes while my phone and Chrome-cast on the same network waited for Google Home to catch up. The App stayed in a loop waiting for the Google Home.

I wanted to listen to WGY Radio and I got a fail. WGY uses iHeart radio not Google radio. I can install iHeart radio on my Nexus 5x and cast the station over to the Google Home with no problem, but that isn’t going to fly with my seventy three year old mother and she is the one that wants to listen to this.

Google Calendar, Google Home can’t find anything on my calendar? I have a user with a vanity domain smithjon.com and Google didn’t like that, fortunately I also have a regular gmail account and shared the calendar between the two and events show up in both locations now. Google Home however still doesn’t know about any events on my cale

Google Home and Chrome-cast don’t play together very nicely. For example I have Warren Zevon playing on the Google Home and say “Hey Google, cast music to Chrome-cast”. The Chrome-cast comes up and starts Google Music. Nice but that’s not the music I wanted.

I ask Google Home to play Grandma Got Run Over by a Reindeer, sorry its not in my library and it plays something sort of similar, but different.

So far I’ve only used it to play music and asked a few random questions. For a hundred dollars I want it to do more, we’ll have to wait and see how more works out. I ordered a Samsung Smartthings hub to use to control the WeMo switches that I have. I’m trying work something out with the Amcrest plug and my door bell but we’ll see how that goes.

With the Smartthings hub my lights work but with a small delay sometimes, other times they are as quick as using Alexa with the lights direct connected. I still think the Google home is going back.

Google Home has been returned and Alexa has taken over. I kept the Samsung Smartthings hub that I got to work with Home and I’m using that with Alexa and replacing the different phone Apps that I had for WeMo and Amcrest switch control.

Amcrest Connect Plug aka Kakun WiFi Smart Plug

More info on this plug here.
Android App to program these plugs WidgetKK for SmartPlug.
Default user root and password p9z34c. SSH is enabled by default. As it 
turns out Amcrest has someone else make this, KONKE Technology Co.
BusyBox v1.19.4 (2014-03-27 17:39:06 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _    _               _    _
 | | _-_| _____ _____  | | _-_| _____ ____
 |  -_-  |     ||     ||  -_-  |     ||    |
 | |-_   |  -  ||  |  || |-_   |  -__||   _|
 |  _ -_ |_____||__|__||  _ -_ |_____||__|  
 |_| -__|  S M A L L   |_| -__| S M A R T
 -----------------------------------------------------
 KONKE Technology Co., Ltd. All rights reserved.
 -----------------------------------------------------
  * www.konke.com            All other products and   
  * QQ:27412237              company names mentioned
  * 400-871-3766             may be the trademarks of
  * fae@konke.com            their respective owners.
 -----------------------------------------------------
root@koven:~# passwd
Changing password for root
New password: 
Retype password: 
Password for root changed by root
root@koven:/www/cgi-bin# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Bleeding Edge"
DISTRIB_REVISION="r39365"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r39365"

I added an index.html in /www

I did find some information on building a web page to control this here.  I get an error as below. However if I grabbed the files from here and then upload them using WinSCP everything works fine. So this turns out to be caused by my cut and paste.

Unable to launch the requested CGI program:
  /www/cgi-bin/relay.cgi: Exec format error

My country was set to CN so I changed it to US.

To display current setting:
/sbin/uci get wireless.radio0.country

To set it (to US, for example):
/sbin/uci set wireless.radio0.country=US
/sbin/uci commit
reboot

I borrowed a script to test network connection and reboot if it drops. I’m using WidgetKK for some of the management its free on the ap store for android.

root@Modem:~# cat reboot.sh
#!/bin/sh
#This is the version 1 for WidgetKK reboot script
#This script will reboot the KK smartplug if it can’t ping the router.
#This script use arguments so you need to pass the router IP or Hostname
#Ex:
# Reboot.sh 192.168.1.1

ping -c5 $1

if [ $? -eq 0 ]; then
echo “ok”
else
reboot
fi
echo “rebootScript”>

chmod +x network_test

I added this to cron.

root@Modem:~# crontab -l
*/30 * * * * /root/reboot.sh 8.8.8.8

So if I can’t ping 8.8.8.8 in thirty minutes it power cycles my cable modem.

I then built a webpage on my Raspberry Pi where I can display multiple switches and turn them all off and on from one location. Since I only have one switch right now its the same switch three times.

nano /var/www/index.html

I bought  a second plug off Amazon this time it was branded as JTD WiFi SmartPlug. Its the same plug on the inside running OpenWRT. I also used WidgetKK to push json.cgi and set the cronjob to power cycle if it loses Internet connection.

jtd_plug

LivingRoom 
Repeat three times once for each switch.

amcrest_buttons

I need to make some labels and the little light at the top goes off when the switch is off on when it is on.I got a WeMo switch today and it is about twice the size of the Amcrest, but the WeMo App is better developed.november-29-2016-at-0656pmTurn the lights on and off from the cli. The advantage to this is there is no outside contact required, I can script the lights to run in a cron job and have the lights on and off on a timer without using the app or having any sort of outside control.

#lights off
echo 0 > /sys/class/leds/tp-link\:blue\:relay/brightness
#lights on 
echo 1 > /sys/class/leds/tp-link\:blue\:relay/brightness

Edit the host name with vi /etc/config/system and change it to whatever you like. I have six of these now so I’m using scp to push the scripts and index files around to new devices.

scp cgi-bin/*.cgi root@192.168.xxx.xxx:/www/cgi-bin

 

Unrealized Genius

So today I’m sitting at a stoplight in the 2016 F150 and the engine shuts off, as I take my foot from the brake it starts back up. A new gas saving feature in this pickup truck. Then it hits me, my father had this figured out years ago. Half the cars he had would shut down at a light and then you would have to restart them when the light went green.

Admittedly he didn’t have it all worked out as sometimes it wouldn’t restart when the time came and we’d have to get out and push it to the side of the road. I now realize this was just teething pains as he was nearly forty years ahead of Ford in getting this setup.

Remote Car Starter

Okay so over the past year I have ventured into installing a few aftermarket car radios and I’m three for four on those. The fourth one had an amp in it that I never sorted out but given enough time I think I can get it done.

Feeling pretty good about all this success I decided to try installing a remote car starter in the 2012 Ford Focus.

Factory OEM Remote Activated Plug and Play Remote Start 2012-2015 FORD FOCUS from Amazon.

carstarterLook at that only a few wires and T connectors where it plugs into the harness easy peasy. Oh I did have to use wire taps for two wires on the OBD plug, thats the two pink wires bottom center. I sort of wish they just made a pass through plug for those but this worked once I had my sister check the colors and inform me I had selected the wrong ones.

I also added a long range antennae as it only seemed to allow remote starting from about twenty feet or less away. The price on this seems to fluctuate a lot I found it for about thirty dollars but it is now listed at fifty six and I see the same kit in there for over eighty. All the wires and fobs were unneeded I just found the plug on the above item and connected it.

Five Button RF Add-on Kit

longrange

I wouldn’t do this myself without the T harness kit, that made it plug and play. I am happy to report I can start the car from the far end of my driveway now and the car hasn’t burst into flames.

Geocaching

I haven’t been active for the last few years, but in my absence my travel bug has been doing very well. All the way to Diego Garcia and back thanks to a merchant marine and a ride in a B1 bomber to get off the island. It still hasn’t made it to Hawaii, but I made that trip in 2015.
travelbug_travels

Diego Garcia

dgaerialfromsouth

Lawn Mower Repair

Two years on and it is still working, I think that second bolt was for a toilet bowl flange.

blog.smithjon.com

Last time I used the mower it was running rough. So in the spirit of good preventative maintenance I put it away until I had some time to look at it. It would appear that the bolts that hold the carburetor had evaporated. After some looking I found one bolt laying on top of the mower deck and the other had gone to the land of lost bolts.

I searched around in an old canning jar and found that little bolt on the right side that was missing. Looks pretty factory I think. The other one I just screwed it into the nearest empty spot.

I think Dad would be proud but Uncle Harold might shake his head at that one bolt but it’s all I had.

Mower

View original post

Door Locks

 

March 2019

I ended up with two Yale YRL220 locks. I linked them with the Ring Alarm app and can control them through that to lock and unlock.  I re keyed the locks to use one key  from Assa Abloy online.

I’m trying to settle on a set of locks that can be opened with a code, key, or RFID cards. I want something that my seventyish year old mother can use and will have enough unlocked time for her to unlock and get the door open.

My first run at this was a Schlage FE595VCAM716ACC Camelot Keypad Accent Lever Door Lock, Aged Bronze. This worked okay but is limited to a four digit code and a key. This allowed nineteen separate user codes. It isn’t recommended for outdoor installations where it is exposed to the elements. My second lock is outside and will face west so I decided to try something else. Changing the battery for this lock is not as easy as it should be. Most of the locks I looked at have a compartment on the inside of the door that can be opened with one or two screws for easy changes. Not so with this lock.

I went with an Adel 3398 Keyless Biometric Fingerprint Door Lock Trinity Fingerprint + Password+ Key. This is a very nice solid feeling lock. I ran into problems with this when my mother was unable to get the lock to recognize here fingers and when she did she wasn’t quick enough to operate the handle in the five second unlocked window. I decided to try another. Documentation for this lock was hard to follow with a number of mistakes in the instructions, nothing to terrible but it would make you go back and reread things a couple of times to understand what they are saying.

Easy to change batteries with a warning beep when the batteries are low and an area on the outside of the lock where you can touch a nine volt battery and temporarily power the lock up to get inside. Using the key requires the removal of the handle and isn’t very practical.

I went with METechs – Keyless Electronic RFID Card Reader Door Lock MID300 Right Hand next. I got a right and left hand lock since these are not reversible. This is the worst lock I have tried. One unit, right out of the box fell apart when I went to install it. It did not include any cards or tokens to operate the lock and I didn’t care for the hidden key slot. The seller also seemed hesitant to disclose what type of RFID fob worked with these and just directed people to buy fobs from them. I ended up sending both of these back and never got them fully installed on the door. I’m still waiting on the refund. the refund eventually came, thank you Amazon Prime.

Not one to be easily discouraged I went to another lock set I found on Amazon. The Rano Electronic Door Lock. W/ Code, Mifare Keyfob & Mechanical Key. (Version 2). This uses a key, a four to eight digit pass code, and RFID stickers or fobs. I can use any one of these methods to unlock the door. Its not as solid feeling as the Adel lock and it doesn’t have a fingerprint reader but it works well. It will store up to two hundred user codes, this includes fobs, stickers, and key codes. Individual codes can be deleted or deactivated for a period of time

  • Package includes 2 keys and 2 key chain fobs. Contact us via Amazon for Mifare Stickers if Needed 
  • Keypad, Keyfob, or Metal Key. Mifare Sticker Needed to Use Phone as Key.

I haven’t been able to figure out how to get my Nexus 5x to work with this yet as the instructions are a little unclear as to how I need to use a sticker and the phone. Using NFC Tester the phone seems to pass all tests for use with this lock. I think I just need to spend a little more time with the lock to get it working correctly. The line above seems a little confusing where it states you need a sticker to make it work with your phone.

I used the two RFID stickers that came with the lock on my wife’s MotoG (no NFC) and my sisters IPhone. Just place the sticker on the outside of the phone case and it works fine when held up to the lock.

I’m using a couple of eight digit codes and these work well you just need to hit # after entering the code. The door stays unlocked for about ten to fifteen seconds after a correct code is entered or a fob is used. I think this will be enough time for mom to get in and not freeze to death in the hallway come winter.

For the lock on the exterior door I added a cover to keep the moisture off it and so far that seems to be working well. I’ll have to see how this works once the snow starts to fall and maybe blow in through the bottom of the cover.

img_20160819_173253

The exterior door lock was kaput when I got home today. To much ice and snow on it so it gave up and I had to use a key to get in. I replaced it with Yale Real Living  Touchscreen Lever Lock with Z-Wave in Oil Rubbed Bronze (YRL220-ZW-0BP). WIth this connected to my Samsung Smartthings hub I can unlock the door from my phone. So far so good this has a touch screen rather than buttons so it should be a little more water tight.

yalereallivinglever

At first I used the Z-wave in these with SmartThings and then moved them to Hubitat and eventually connected both of the locks with my Ring Alarm. Moving between different Z-Wave systems was a small hassle but not terrible, just time consuming.

Batteries need to be replaced about every six to eight months so far. The key works and they can be unlocked with the button from inside or the keypad from outside. Using the keypad and the code setup through Ring Alarm has the added benefit of disarming the alarm system when I unlock the door.