The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
[ UPDATED 0.0.8 ] TP-Link Smart Devices - central topic
TP-Link Smart Plug and Bulb (WIFI) app for Athom Homey
This app lets you control TP-Link Smart Plugs HS100 (plug with no energy monitoring) HS110 (plug with energy monitoring) and Smart Bulbs LB100, LB110, LB120 and LB130 from within flows and the (mobile) app. The HS200 Smart Switch is as of yet untested but should work as well (please let me know ;-) The same goes for the HS115 mini plug, this should work with the HS110 driver.
In its current state, the app can auto-detect the IP address of the device when adding a device, however it currently cannot detect when it is changed. It is advised to set it up to have a fixed IP address or a 'static lease' from the DHCP server until this feature is added.
This app is based on the following resources:
- The HS100 API: https://github.com/plasticrake/hs100-api
- https://github.com/ggeorgovassilis/linuxscripts/tree/master/tp-link-hs100-smartplug
- https://www.softscheck.com/en/reverse-engineering-tp-link-hs110
- https://github.com/DaveGut/TP-Link-Bulbs
Supported flow triggers:
- Power / total power changed (HS110/HS200)
- On / off state changed
Supported flow conditions:
- If on / off
Supported flow actions:
- Switch on / off
- Toggle on / off
- Switch LED on / off ('nightmode', HS100/HS110)
- reset power meter / undo reset power meter (HS110/HS200)
- Transition on / off ('wake-up light', LB100/LB110/LB120/LB130)
- Select mode (LB130)
Mobile capabilities:
- On/off
- Display power and energy usage (HS110/HS200)
- Dim (LB100/LB110/LB120/LB130
- Set light temperature (LB120/LB130)
- Set hue (LB130)
- Select mode (LB130)
Energy monitoring has currently not been implemented for the bulbs (LB110 and up) as I am not sure anyone would use it. The selection of pre-sets for the LB130 is currently not supported in the API.
Donate:
If you like the app you can show your appreciation by posting it in the forum, and if you really like it you can donate. Feature requests can also be placed on the forum.
Changelog
Version 0.0.8:
- Bugfixes for bulbs, added app to 'lights' category.
Comments
The update addresses several bugs in the driver for the smart bulbs. The app now correctly tracks the state of the bulb. I have also played a bit with the Homey built-in speech commands work, these now work as well. For instance for the LB130 color bulb you can use 'OK Homey, <lamp name> <color>') and Homey will set the specified lamp to the desired color.
One nice feature of the bulbs that is worth mentioning is the 'transition on/off', which turns the brightness of the bulb up or down over a set interval. If you set the interval to an hour, it can be used as a wake-up light (note that I don't know exactly what the maximum transition period is). Also, it is nice to slowly let the light fade when turning the light off when leaving the room for instance.
Finally I have included the app in the 'lights' category of the app store, making it easier to find for Homey users looking for smart lights.
[update] 0.0.7 has been published
I have a new TP Link smart plugt HS 110 and with its own Kasa app its working fine and with energy metering.
Now i installed your latest TP Link Homey app and it works for on/off but the energy metering/voltage metering is not working.
Tried reinstalling the app (0.08)and the HS110 device, restarting Homey etc. but nothing will make the energy metering show.
What could be wrong?
I'm on Homey 1.5.11
My own HS110 plug doesn’t have the problem, I can't easily reproduce it. My HS100 firmware/hardware is:
sw_ver: '1.0.8 Build 151101 Rel.24452', hw_ver: '1.0'
Could you perhaps check if yours has a different software/hardware version?
Note that I need to rewrite the app for SDK2, I'll have a look at it while (when...) I am at it.
Hardware : (2.0)
Firmware : (1.5.2)
I will check the hard-/software versions of my HS110 plug and report it as soon as i'm home again.
UPDATE 19.06.2018:
TP-Link has updated their firmware. If you install this firmware upgrade, tplink-smartplug.py does not work anymore.
The tool the URL above reverse to was since updated, restoring functionality. When I have time I'll check what's different and what needs to be updated to make it work again.
This is the hard-/firmware version of my TP link plug according to the Kasa app.
Model: HS110 (EU)
Hardware version: 2.0 (on the back of the plug a sticker with HS110 (EU) Ver:3.0)
Firmware version: 1.5.2
Hope you can make the power metering work again.
Have a nice weekend!
You can manually load v.0.0.9 of the app from https://github.com/abaretta/nu.baretta.tplink, or if you DM me your email address (the one that is coupled to your Athom account) I can make the update available to you through the alpha channel of the appstore (once I add the emailaddress you will be able to select the alpha version). Can you have a look and let me know if metering works? I can't test it on the newer firmware at the moment.
The other issue is related to a small change in the encryption function. I will not be able to work that out and test this before I leave on holiday, but it shouldn't take too long.
[update 2-9-2018]: This topic will continue on the new community site: https://community.athom.com/t/tp-link-smart-devices-central-topic/1045.
I have updated the app to support the new hard- and firmware versions, read all about it at the new forum ;-)