Honestly, I don’t care about the response. I am sending GET requests to HAM Bridge to execute commands from it, but I have other devices that require POST and PUT. I suppose I can have HAM Bridge do those, and trigger them with a GET; I was just hoping to eliminate the extra hop.
how does the code written in my smartthings account will work with my smartthings sensors and hub???which is the triggering point???please reply me as early as possible???
If you still have questions, these docs should help you write them up in a way that helps the community to help you. Failing that, you can always contact support@smartthings.com
Still struggling with this and would really appreciate some guidance. Is there something borked with sending a POST from sendHubCommand? Or just something odd about it I should know?
I get the following in the log, but nothing happens on the thermostat.
8:31:34 AM: debug Executing POST /control HTTP/1.1
HOST: 10.0.0.31
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
mode=1&fan=0&heattemp=50&cooltemp=85
on Home Hub via sendHubCommand
Now if I send the above curl command to another terminal on my LAN I get:
And if I direct the sendHubCommand to that terminal I get:
POST /control HTTP/1.1
HOST: 10.0.0.12
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
mode=1&fan=0&heattemp=50&cooltemp=85
I have even gone so far as to include the Accept and User-Agent header fields in the call to sendHubCommand, but nothing has worked when attempting to POST to the thermostat.
. . . . means you tried but couldn’t get a Service Manager SmartApp to work or didn’t bother to try?
Also, according to the ST docs, it seems like ST intends, in addition to discovery, that a Service Manger SmartApp handle the communication and the Device Handler does the parsing and such. However, it looks like your Device Handler is taking care of the POSTs and GETs (communication). So, I think, that leaves discovery that would be handled by the Service Manager, if there was one.
So, if you don’t mind, and you did try, what problems did you encounter trying to create a Service Manager? Did you find the Venstar API adequate?
Looked at it. Documentation sucked (still does), and no one was willing to help. It works well as it is, and that was all I needed.
BTW, the Venstar API is great, but completely local. Frankly, I use it more (called from HAM Bridge) than the SmartThings integration as I still can’t count on SmartThings to reliably execute critical tasks (in this case preventing pipes from freezing).
@scottinpollock, yea, the docs in this area seem to leave a lot to be desired. Also, unless I’m missing something, there are no ST-published handlers for LAN-connected devices to use as examples.
. . . and, if I haven’t used up my allotment of stupid questions. . . . the Venstar API uses JASON formatting for GETs but the POSTs are URL-encoded. Do you know why that is?