TP-LINK HS110 Smart Plug w/ Energy Monitoring, Wi-Fi Enabled

SmartThings recently added support for the IHome wifi pocket socket, and Mentioned in that discussion that the TP links are in the pipeline for future integration. But no timeline given.


There’s no integration with IFTTT, so no ability to automate anything with ST. Sure, voice control is nice (although the longer I’ve had my Echo, the less I use it) but I wanted to be able to turn the TP Link plugs on and off in ST smartapps and routines. The DTH that @dbej wrote is working well, I’ve been able to integrate the TP Link plugs into my ST automations.

1 Like

Thank you for sharing this work. For me the controller starts on the gateway fine but then as soon as I try to turn on or the outlet via the smarthings app I get the following error. Any idea what I am doing wrong?

he HS-100 controller has started
var hs100 = new hs100api({host:deviceIP});

TypeError: hs100api is not a constructor
at Server.onRequest (/root/hs-100/hs100.js:32:15)
at emitTwo (events.js:106:13)
at Server.emit (events.js:191:7)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:543:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)

Are you using Docker or node? If node, did you do this part?

Thank you for the quick reply. It wasn’t making sense to me why this was working for others but not me. It looks like there is a new API v .0.3.0. I downgraded to 0.2.0 and got it to work. Is this a bug in the API?

Interesting. I just checked and I’m on 0.2.0 also. Haven’t tried 0.3.0.

Ok, well downgrading to .0.2.0 solved it for me… This is great work thank you for putting this out there!

1 Like

Still working great for me after a month. Only thing I had to do was disable automatic updates on my Windows 10 machine, it was rebooting on it’s own and killing my node window. Thanks to @dbej!!!

I will take a look at updating hs100api to 0.3.0 as soon as I have some time. I will post any updates to the DTH and the nodejs server.

1 Like

Thanks for taking the time to do all of what you have for the community. I am new to smartthings and would like to ask if you could do a step by step tutorial on how to get this to work, this can be a step by step worded process or a youth be video.

I know it may be asking a lot, but it would help not just me but many others as well.

I’m very tech savvy but have no clue how exactly to get this to work. Thanks in advance if you can and thank regardless if you can’t (this request also goes out to anyone who has gotten this to work)

1 Like

How-to moved into it’s own thread as of 12/29/16


Thanks a million!!

I have a raspberry pi 3 running osmc in my living room. It’s always on so I decided to use that instead of another device and with the help of your instructions it’s up and running perfectly.

I followed the instructions here starting at the “Install Node.js” paragraph which involves running 2 lines of code. After getting it installed I simply followed your instructions and profited as you said I would lol. I did it all from my android phone via ssh. For those going this route I also added code to /etc/rc.local to start the node for me at boot.

Thanks again for your instructions and a big thanks to @dbej for his work in putting this together for the community!

1 Like

I second that, thank you very much @destructure00 !!!

1 Like

I’d like to setup one Smart Plug to turn ON and turn OFF every time my computer (Windows 10) goes to sleep. Do you think this is possible? (I’m using multiple users in this PC, so a potencial service should be working in /system for all the users).

  • PC (power supply) and LCD Monitor would be connected to a regular plug (since they both consume less than 3W in SLEEP mode).
  • Studio Monitors ( PC speakers) would be connected to the Smart Plug, and this is the thing I’d like to turn off / on every time the PC wake up and sleep. They use always the same energy, no matter they are in stand by or working.

Thanks in advance!

thank you @destructure00 I set this up last night on an original raspberry pi and it is working great.

I’ve got this and the myq node implemented on the same pi and both are working great.

1 Like

Great stuff… Thanks for the instructions and step by step guide.

Does this stop working for anyone else randomly as well? For me, it works fine for a day or so and then I have to restart the hs100 node server.

1 Like

Been running for a couple months now with no issues. I was having problems early on with the gateway laptop restarting but disabling automatic updates took care of that. I manually check for updates every couple of weeks, node session always stays up besides that.

I got in on one of these hs-100 for black friday and figured i would integrate it with smartthings. This technique works great! I had to change the node dependency to 0.2.0 version of the hs-100 api to get it to work.

For convenience I uploaded my image to docker hub, in case someone wants to use it.

If you have a QNAP NAS device at home, its easy to search and add this using the container store. You could probably do something similar with Synology NAS or others as well.


destructure00, I just want to say excellent work I’ve had no problems. But I was wondering if you’ve had in experience with the TP-Link Smart Bulbs? I’ve tried the same instructions here with no luck. Just wondering.

Thanks again!

Thanks, don’t forget that @dbej created the js app and ST DTH, all I did was write up the install instructions :wink:

I don’t have any TP-Link devices other than the HS-100 outlets, so can’t offer any input on those.

1 Like