Anyone know if this is compatible with a Smartthings 2nd Gen Hub?
I don’t believe it has either Z-Wave or zigbee protocols, so one would have to develop a custom SmartApp to control over http (if that is available to the device).
This sells for just $22.95 on Amazon, cheaper than most Zigbee and Z-Wave smart plugs and in compatible with Echo. Have anyone tried to integrate it with ST?
It is now even 19.99… would be great if integrated with ST.
I have 3 of these at home that I’m replacing with z-wave outlets since I can’t control them from ST. I’d love to be able to integrate them. They are wifi-connected and run exclusively off the Kasa app, there’s no web interface available. There is remote capability though, I can control them when I’m not at home. Not sure if it’s possible to write a smartapp to control these, but it would be pretty awesome.
TP Link has the GPL source code for the HS100 here, I’m not a developer so I’m not sure if this is helpful but maybe there’s a possibility?
any one cracked this yet?
Anyone? These things are so cheap and consistently on sale for under $20 it would be great if someone could get them working with ST.
A couple of caveats to start.
- First, it is not native integration. Smartthings doesn’t allow you talk sockets so we have to go with a middleware gateway.
- You will need to be able to run the gateway on something that runs NodeJS. You will need to install it using npm because it uses the hs-100-api library created by plasticrake (www.npmjs.com/package/hs100-api)
- I run it in Docker so if you have something capable of running it there, it would be worth it. If you want to get started in something can run Docker on the cheap, I would suggest picking up a Raspberry Pi 3. It will do the job. I have included a docker file and some instructions that will stand up quickly.
Once you have the gateway up and running, you simply install the device handler and create a new device for each outlet you have. The networkDeviceID shouldn’t matter as long as it is unique. You have to supply the ip address of the outlet and the ip address and port of the gateway in the preferences. Once done it should look like a normal outlet. You will have to do an initial on/off to get the switches reflecting the correct state.
I have five of these outlets myself and they all seem to work as expected. The is probably the minimal work needed to make the outlets available to Smartthings so don’t expect miracles or for it be bug free. I will update and help as time permits. You can download the files here:
Sweet! I’ll get this set up when I get home later, already have a node.js gateway running on an old windows laptop for a separate Alexa/Harmony integration. Thanks for sharing
A few updates. The status of the outlet should be reflected correctly now when you on/off/refresh the outlet. It will poll the outlet and update the status at the standard polling interval. I also had to add a callback from hubAction to a custom response handler. Calls in to Parse do not seem to be reliable.
Question for you…I installed node.js on a Windows 10 machine to run as a web server for a different smartapp. Do I still need Docker or can I run directly through node?
You should be able to run it directly on your node machine. When you start the app it will spin up web server on you machine using port 8083, which is what you will reference as the gateway ip and gateway port in ST device. You can change that port in the hs100.js file if you need it to be something else. You will still need to install the hs-100-api dependency using npm. After that just “node hs100.js”
Cool. I got hs100.js running, it says “The HS-100 controller has started”. I think I’m good there. Copied the groovy file into My Device Handlers in IDE, now unsure what to do next to actually add my 3 outlets to ST. I’m not seeing anything that resembles HS-100 in the list of Things in the marketplace, maybe I’m looking in the wrong place? Been awhile since I added a custom device.
Nevermind I got it, found the section in IDE where I add a new device. First one is working as expected…two to go Badass, thank you!
Can the console log be modified to give either the device name or IP address along with a timestamp for on/off commands? Right now it just does a simple on or off, no differentiation between devices or times.
I modified the hs100.js file on my OneDrive online account from work, won’t be home to test it till later this evening. Think this will work? My changes are in bold.
Looks like that would work. You should also see the events in the ‘Recently’ tab on the device itself in the ST app.
Tested tonight, works fine. Thanks.
I would think that since the HS110 can be controlled via Echo 'alexa; that between the two you could get it working or a recipe via ifttt