POST request - ST and HE are different?


#1

I’m sure that I’m not the first person to stumble over this, but I’ve not seen any posting.

I have migrated (almost 100%) from SmartThings to Hubitat. I have an IR bridge, and was sending POST requests in webcore from SmartThings, and all worked well.

I’ve spent way too many hours trying to send the same command (IRSEND) in webcore connected to my hubitat hub. I cannot get it to work.

Below is the command that works just fine in webcore through the ST hub, and no response from webcore through the HE hub.

Help?!

http://192.168.#.###/cm?user=user&password=pw&cmnd=irsend{“Protocol”:“NEC”,“Bits”:32,“Data”:“0x00FFB04F”}


#2

Try fixing the quotes “” in the payload. Maybe ST is more forgiving when it comes to that. Not sure if the forum software is converting it or that is how it is on your side also.


#3

If the quotes suggestion doesn’t help, you should probably use a “encodeURI” function to ensure your x-www-form-urlencoded post is syntactically legal. Here is a web version for example.


#4

If you still have trouble full logs may help

You can private message them (pm) to me


#5

What do you mean by fixing the quotes?

Could you provide suggestions or examples?


#6

OK. Webcore works just fine when running through SmartThings hub, and still cannot work with Hubitat. I think it’s got something to do with hubitat and/or the webcore code for hubitat.

In webcore through SmartThings, the following works just fine:

http://192.168.x.xxx/cm?user=user&password=pw&cmnd=irsend {“Protocol”: “NEC”,“Bits”: 32, “Data”: 0x00FFB04F}

In webcore through Hubitat, neither of the two commands work:

http://192.168.x.xxx/cm?user=user&password=pw&cmnd=irsend {“Protocol”: “NEC”,“Bits”: 32, “Data”: 0x00FFB04F}

nor

http%3A%2F%2F192.168.x.xxx%2Fcm%3Fuser%3Duser%26password%3Dpw%26cmnd%3Dirsend%7B%22Protocol%22%3A%22NEC%22%2C%22Bits%22%3A32%2C%22Data%22%3A%220x00FFB04F%22%7D

So it cannot be quotes (") or any of the other special characters ( ? \ )

Any other ideas?


#7

Please post a snapshot of the working ST piston, even a simplified one that we can look at.


#8