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.
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.