The TPLink HS100 Smart Plug lets you remotely control your electric devices, and best of all, it’s compatible with Alexa, and other Open Source home automation software such as Home Assistant.
The TPLink HS100 is as simple as it gets, plug to the wall socket, connect your device, set it up with the app, and off you go. By default, support is limited through Kasa (TPLink Smart Home app), and Amazon Echo (Alexa). Other features include Remote Access (wherever you have internet), through the Kasa App, Scheduling – Schedule the Smart Plug to automatically power electronics on and off as needed, like setting lights to come on at dusk or turn off at sunrise, Amazon Echo Voice Control – Amazon Echo (sold separately) lets you control devices connected to the Smart Plugs just using your voice.
Amazon Echo is getting quite popular among the home automation crowd since it easily enables voice control. I don’t have an Echo though, and I tried, but I couldn’t get it detect and work with the poor man alternative, AlexaPi, or Roger (Android app).
Thanks to George Georgovassilis, he was able to reverse engineer the command codes over WiFi and you can download his bash script to control the TPLink HS100 plug remotely.
But that’s still not good enough.
I recently started to dabble with Home-Assistant, an open source home automation software based on Python. It shows good promise and you can check out the demo for a quick look at what it can do. It didn’t support the TPLink plug but as it allows for custom development, I have created an add-on component platform to work with the TPLink plug. It integrates nicely with the rest of the Home Assistant switches, and it doesn’t just issue dumb commands of on / off. It is also able to check if the TPLink plug current on/off status.
The Git Pull Request has been approved, and should make its way to the next version of Home-Assistant.
Anyhow, you can check out the source code.
I have also separated out the codes into a Python package, pyHS100, so if you want to control it via Python, you can download that instead. It will also work with the TPLink HS110, which comes with an Energy Meter.
You can try it out as follows:
from pyHS100.pyHS100 import SmartPlug switch = SmartPlug("192.168.1.105") #The TPLink HS100 / HS110 IP print(switch.state) #check plug status switch.state = "OFF" #turn plug off switch.state = "ON" #turn plug on