HTTP Get {} error

I have a code that I am trying to get to work. it is an http get command and i cannot seem to figure out how to get habitat to ignore the {}. i have tried adding the slashes and it still gives the following error. what am I missing?

I think someone would need more information to solve this problem. Are you writing a custom app? If so, could you post the relevant snippet of code? Are you using an existing driver/app? If so, which one? And I assume the { and } characters are required with whatever thing you're ultimately trying to control?

But because I can't resist attempting ESP, without knowing any of that, have you tried escaping the { and } characters with %7B and %7D respectively?

sorry, I am trying to send an http get to a tasmota ir blaster. once i get the code working i will either setup a webcore piston or an if statement in rule machine. right now i am using an HTTP Get driver just to send the code to get it to pass hubitat. that being said here is a copy of the code being sent. did i enter the %7B and %7D properly? it didnt seem to make a change

http://192.168.1.61/cm?cmnd=IRHVAC%20{{"Vendor":"Mitsubishi_AC",%20"Power":%20"1","Mode":%20"Cool",%20"FanSpeed":%20"Auto",%20"Celsius":%20"Off",%20"Temp":%20"69"}}

Which HTTP get driver? I have an idea, but I already used all my ESP powers for the day. :slight_smile:

It doesn't look like you used the characters correctly. The %7B sequence is an escape sequence you can use to replace the entire { character, for example (not something you place in front to escape the character itself) ... or at least that's how it looks from the first screenshot. I'm not sure what's going on in the second.

Yes I did have that wrong I just updated it and now I am getting a malformed error.

2020-08-14 05:04:45.919 pm warnCall to off failed: Malformed escape pair at index 37: http://192.168.1.61/cm?cmnd=IRHVAC%20%{"Vendor":"Mitsubishi_AC",%20"Power":%20"1","Mode":%20"Cool",%20"FanSpeed":%20"Auto",%20"Celsius":%20"Off",%20"Temp":%20"69"%%7D

It might be easier to see the text you're putting in directly instead of what Hubitat logs out, just in case there is additional formatting or escaping that is happening only there. It's hard to for me to tell but it does indeed look like there is something wrong, as there are two percent signs in a row towards the end (this symbol would signal the start of an escape sequence, and that's probably why it's complaining).

thank you for your help on this! yes i just saw that and updated the code but i am still getting an error
error


code

Since it is a GET, you can just enter the query in your web browser to get the same effect. I always start there when I have an 'interesting' URI or query string.

Does it work in your browser? If so, you know you're chasing a Hubitat oddity. If not, you can address the incorrect URI first in the browser where it's easier to tinker.

yes, when enter it in Chrome it runs without problem. the AC unit beeps and changes also the tasmota updates and shows below

You may need %22 for your double quotes.

1 Like

you are amazing that did it i replaced all the "" with %22 and it works now

1 Like