What I want to figure out next is how to ping the ST hub to get the status of various devices. That is, using Tasker, I’d like to hit a URL and have it return the status of a given switch, for example.
From what I understand, the ST hub is rather dumb - I could be wrong, but I suspect it is used almost solely as a Zigbee/Z-wave to network interface for devices. Port scanning it, it appears that it’s got a telnet port open:
brian@gibson:~$ nmap -Pn 192.168.1.108
Starting Nmap 6.00 ( http://nmap.org ) at 2013-10-06 00:29 PDT
Nmap scan report for SmartThings (192.168.1.108)
Host is up (0.00019s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE
23/tcp open telnet
That seems pretty interesting, but I’m assuming it has a globally set password - anyone happen to know what that might be? Or what good telnet’ing in might do us?
Back on track - you may have better luck writing an app that simply grabs states from each device and make a REST request with the parts you deem important and create the interface on your own server. I believe they’re working on a prettier web interface, but if you just wanted to know the state of a switch and don’t mind the delay associated with polling, I’d just cron it and host it off-site.
Are API endpoints something you have to define yourself within an app? or are there standard endpoints that I can call directly? I don’t mean to hijack your thread, but it sounds like you’re familiar with what I’m looking for. The documentation is kind of all over the place still…
@ImBrian, have you messed around with the Endpoints API much? I really think there’s a way to make a call to an Endpoint URL and have it return status, but I’m just not sure how to make it happen.
So @ImBrian, I feel a little stupid for not knowing this, but if I take the Endpoint URL for toggling one of my switches, and I remove the “/toggle” portion of the URL, it returns the device’s status in this form:
Now I’m assuming I could have Tasker (or whatever app) periodically hit this URL, read the “value” state and trigger actions based off of that? Maybe that’s what you meant above when you said “create the interface on your own server”…sorry if I missed that before.