Things Gateway, Part 6 - TP-Link

Today I'm going to play around with some switches from TP-Link with the experimental Things Gateway from Mozilla. Previously in this series I covered other home automation technologies (Zigbee, Z-Wave, Philips Hue) from the perspective of the Things Gateway.

While TP-Link makes a varieties of devices: plugs, switches and bulbs, I only had access to a pair of the Smart Plugs.

Because the TP-Link devices use the local WiFi for all their communication, they are among the scariest devices on my local area network.  They are black boxes and I must implicitly trust the manufacturer that they are secure: forever.  Yeah, I've expressed trepidation over smart hubs (Samsung Smart Things, Philips Hue Bridge, etc) for the same reason, but these are even scarier.  Why? Because there's potentially an army of these devices in a smart home.  They may last for years and years, but how long will they receive firmware security updates?  Updating the firmware requires action on the part of the owner. Electrical outlets should just work, I don't want to have to track them all.  Missing just one in a security update may be all it takes to compromise the local area network.

Goal: Pair the Things Gateway with a pair of TP-Link Smart Plugs

Item What's it for? Where I got it
The Raspberry Pi and associated hardware from Part 2 of this series minus the DIGI X-stick this is the base platform that we'll be adding onto from Part 2 of this series
TP-Link Smart Plug HS-110 a smart plug to pair with the Things Gateway Amazon
An iOS or Android phone or tablet The set up of the Smart Plugs requires a controller app on a mobile device I used my Android phone

The first word that came to mind when I opened the package for a TP-Link HS-110 Smart Plug was "humongous".  In a standard wall outlet, they block both receptacles no matter which one is used.  On the power strip that I used for testing, two smart plugs used four receptacles and they could not be placed next to each other.  This a poor design that makes me think they were not tested in real world applications.  While physical design problems do not automatically imply software design problems, I am wary.  

Step 1: The devices need to access the local WiFi network for communication.  This involves downloading the TP-Link Kasa for Mobile app on a mobile device. I chose my Android Phone for this process.

On starting Kasa for Mobile, the first thing I encountered was a login page.  Because I don't want these devices communicating outside my local area network, I declined by pressing the tiny little "Skip" button in the lower right corner.

It then asked me to create an Amazon Alexa account. Again, I don't want to do this and skipped it by touching the tiny little "Not Now" button on the bottom of the screen

Now I'm ready to add my devices to the app.  I pressed the "+" button in the upper right corner and then selected the matching Smart Plug on the next screen.  As specified, I plugged in the Smart Plug and the lighted indicator turned solid orange.  After pressing "Next" the light began alternating between orange and green.  I pressed "Next" again. 

This got me to a privacy buster.  I was asked to allow Kasa to access my phone's location.  I said no.  That left me at the same orange/green flashing with a "Next" button.   After pressing "Next" again, I got a more detailed dialog box begging for location access for my phone.  Again, I said no.  That left me at exactly the same place: a "Next" button that results in asking me for location access.  I must agree or the setup will not continue.  Perhaps poor physical design does imply poor software design.  I begrudgingly allowed location access to continue the setup.

The next screen asked me to name my device.  I chose "One" and continued.  I selected an icon and then selected "Save Device".

That got me to the meat of the set up: access to the local area WiFi network.  I chose my network and added the network password.  It took about two minutes to complete the setup.  Adding the second plug was a similar procedure, though without the asking for location permission nor the WiFi password again.  I named the second Smart Plug as "Two".

Step 2: I'm assuming that the Things Gateway has already been set up.  See Step 1 of Part 2 of this series and proceed through Step 6, if you've not done that yet.

The next step is to add the "TP-Link" add-on to the Things Gateway. I pressed the "Menu" button, selected "Setup" and then selected "Add-ons".

From there, I pressed the "+" button to enable a new add-on and then selected "TP-Link" from the scrollable list. From there, I used the left arrow button in the upper left to go all the way back to the "Things" page.  

Step 3: Now I've got to add the two smart plugs to the known devices:



I pressed the "+", Things Gateway immediately detected the two new devices, I pressed "Save" on each of them and then "Done".

Step 4: I now have control of the two TP-Link Smart Plugs from the Things Gateway.   I can see the additional information about power usage by pressing the "splat" on the icons:





What's next? In the next installment, I'm hoping to introduce the Ikea TRÅDFRI devices.  However, that means I must acquire the hardware, so there may be a little bit of a delay.