Control a TP Link HS100 smartplug with Tasker

2,374 views
Skip to first unread message

Alexandre Dumont

unread,
Mar 1, 2017, 2:01:08 AM3/1/17
to Tasker
Just wanted to share a tutorial I made about controlling a TP Link HS100 smartplug with Tasker:

http://itnerd.space/2017/02/26/control-your-tp-link-hs100-smartplug-with-tasker/

hollywoodfrodo

unread,
Mar 1, 2017, 10:58:15 AM3/1/17
to Tasker
Cool - thanks for sharing this!


Hugson

unread,
Jul 25, 2020, 3:01:07 AM7/25/20
to Tasker
On Wednesday, 1 March 2017 18:01:08 UTC+11, Alexandre Dumont wrote:
Just wanted to share a tutorial I made about controlling  a TP Link HS100 smartplug with Tasker:

http://itnerd.space/2017/02/26/control-your-tp-link-hs100-smartplug-with-tasker/


I bought 2 HS100 smartplugs yesterday. I then used Google to find out how to control these devices using Tasker. My initial attempts involved finding the Token Id and using that to control the devices. Unfortunately this didn't work well because, nowadays, it seems the token changes all the time.
Then I came across your approach using Send/Expect (which I was totally unfamiliar with). My 1st attempt using your approach failed - it did nothing. Then I corrected the IP address I had put in (I mis-remembered the last digit as a 5 instead of a 3 <g>!). And lo and behold, everything worked perfectly. Then I learnt how to assign a fixed IP address to the smartplug, and I'm very happy indeed.
I thank you for your generosity - people like you make the Internet so much better a place. I wonder how long it took you to work out your solution?

Alexandre Dumont

unread,
Jul 25, 2020, 6:06:34 AM7/25/20
to Tasker
Thanks for your kind words. I like to share what I find, it's not always very poslished, but I like to think it can help other start new stuff, and create new ways of doing stuff.

I really can't remember how much time I spent figuring how to do that. 

I have just created a gist with the xml for 4 Tasker tasks I believe I have never published (or maybe I did and I forgot I did), it's the 4 tasks I use to control my HS100. One is for login, two will power on/off the hs100, and the 4rth will retrieve the state of the switch.

I uses some variables: 
You'll also have to replace YOUR_HS100_DEVICEID_HERE with your own deviceId. (it's in two places).

Paul Thornett

unread,
Jul 25, 2020, 9:14:38 AM7/25/20
to tas...@googlegroups.com
Thanks for your email and for the Tasker file you sent me.

I'm wondering how you created the file named TPLink-HS100-Taskers.xml, as I cannot import it into the current version of Tasker. I suspect the format of exported tasks may have changed.

-------------
Regards,
   Paul Thornett

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/VV_6HkwiHzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/eb2d1f41-1cdb-486d-aad3-be08e819e692o%40googlegroups.com.

Alexandre Dumont

unread,
Jul 25, 2020, 10:48:17 AM7/25/20
to tasker
Try with this one that I have attached. Put the 4 xlm (that are in teh zip)  on your phone in /Tasker/tasks/ :

How to Import Profiles, Tasks, Scenes & Vars (e.g: import a friend's profile/task or one you have found on the internet)
  • Open Tasker
  • If you want to import a profile, go in the Profiles page
  • Tap on the Profiles tab
  • Select Import
  • select your <profile_name>.xml file
  • Done
Tasks, Scenes and Vars are imported the same way  

Hope that works for you.
--
Alex


attachments.zip

Paul Thornett

unread,
Jul 25, 2020, 11:33:08 AM7/25/20
to tas...@googlegroups.com
Your latest file has worked. It's late now (I'm in Australia) and I cannot remember how to obtain the device id for my HS100 - I'll resume tomorrow.

Many thanks for your help - it's very much appreciated.

-------------
Regards,
   Paul Thornett

Endre Baginyi-Korcsák

unread,
Jul 25, 2020, 3:38:02 PM7/25/20
to Tasker
Hi Alex,
A bit off-topic. Just checked TP Link product page and saw the HS110 has watt meter capabilities.
Do you have any info what data is available for query?

Duckredbeard

unread,
Jul 26, 2020, 9:10:17 AM7/26/20
to Tasker
Can this be adapted to control Sonoff Basic or 4 Channel Pro switches?
Reply all
Reply to author
Forward
0 new messages