**Update 12/29/17: Updated to use @kuestess device handler replacing mine.
I know there’s a handful of people out there still utilizing some older Insteon devices.
A few things to note in this device type:
You MUST port forward your hub’s IP (Port 25105) to the internet. You can open 25105 externally or port forward it to whatever port you want, example Source 1234 => Destination 25105
Steps to get setup:
Locate your Insteon’s Hub IP
Login to your router and port forward the Hub IP with port 25105 to whatever port you want, you can use 25105 if you want.
Login to your Insteon App and locate your hub username and password.
When pulling Insteon device statistics, you have to make a call out to the Hub via /sx.xml?DEVICE=1900 . This will spit back an XML output that may look like this:
<Xs>
<X D=“DEVICE250070”/>
</Xs>
SmartThings does not like this output. It does not parse it as traditional XML. The server will take that output and transform it into JSON for ST to read. The output looks like this:
I’ll upload the PHP script that does this if anyone wants to host it themselves and utilize it. They can just replace the st.idealerror.com with their own URL.
Insteon 6 or 8 button switches is not necessarily possible to duplicate because it sends a call directly to Insteon. That call is not parseable as far as I know. If you’ve ever logged into http://connect.insteon.com . Anything that can be done through that portal can be duplicated into ST.
So you need apache running on your server, then this script is called when this url is requested of the server.
So @idealerror, for those of use that know enough to get in trouble…what’s the html page you have calling this script and returning the data? And can we access it locally so we don’t have to poke a hole in our firewall?
ST calls the PHP script with a specific URL… the PHP script calls the hub directly using that URL. That URL will query the hub and pull an xml file. The PHP will parse the XML and turn it into a JSON file. ST reads the json file and updates the switch status.
You technically could remove this part and use ST exclusively to perform the on/off/dim. You just can’t see if someone turns the switch off manually.
Had to put the php script in var/www/html as index.php, changed apache’s file pref to php before html. (Didn’t know I could do this, was my “missing step”)
Forwarded the Insteon Hub port 25105 to my Insteon Hub.
Configured a new device in IDE, set options and it worked. Dimming is very quick!
So my only concern is not having SSL for the actual on/off commands. Since Insteon’s URL builder doesn’t list it as an option I assume they do not support this?
Thank you @idealerror for this code, I’m hoping it will be more reliable than the API key code I’ve been using from @hypermoose. Not his codes issue, but the way the API is used with Insteon, I’d have to occasionally “Update” the SA in the IDE to get it linked back up.
I’m going to move all my lights to this and see how it goes. I like having local control (sorta) back.
One thing I noticed. Setting the light to say 20% at the wall, hitting refresh doesn’t update the ST device. Should it?
Hey good job getting everything up and working :). Sorry I wasn’t more descriptive, I was writing most of my replies from mobile. Thanks for the explanation for the masses!
Unfortunately, the hub does not support SSL.
Setting the light to 20% at the wall and hitting refresh should update ST. If you setup your own PHP script on your own web server to poll the status of the device, you may want to make sure that piece is working. It sounds like you got the device type working, but I think you may have an issue with your device status piece with the PHP.