You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I realize that this isn't yet a feature of the API as submitted, but...)
Has anyone been able to make changes to their system (e.g. changes to set points in /config) using either PUT or POST requests to the endpoints used in this API?
I tried PUT with read-modify-write JSON, but I got a 404 Not Found response.
Following the example of the requests sent by the myinfinitytouch.carrier.com web app, I tried sending POST requests with XML instead, but then I get a 401 Unauthorized response with the message, "signature doesn't match". I get this response even when sending to the /system_preference endpoint, which the web app does successfully use for mutations. I wonder which signature isn't matching - the OAUTH signature?
I'm still experimenting, but I'm wondering if anyone else has had success in making remote changes to their hardware.
The text was updated successfully, but these errors were encountered:
Some progress: I have now successfully modified the /system_preference endpoint using POST with a single data=[xml] parameter. It turns out I just wasn't using aiohttp.FormData properly.
However, I'm still having trouble modifying /config. It turns out that if the XML has any space chars in it (elements with attributes, spaces in text, etc.), then I get the "signature doesn't match" error. (/system_preference doesn't have any spaces in it.)
Why are the spaces a problem? Well, from what I can tell, aiohttp.FormData insists on encoding spaces using the plus char (+), rather than %20; and my guess is that--somewhere in the stack--oauth1 (which expects it to be %20) is having trouble resolving the difference.
So, now I'm trying to figure out how to force the data param value to have %20 strings instead of + chars. Anyone know the easiest and/or most pythonic way?
I gave up on aiohttp.FormData. If I just manually pass data='data=' + urllib.parse.quote(xml), then it works fine. So programmatic control of set points is indeed possible. At least via POST and XML - I haven't been able to get it to work with JSON.
(I realize that this isn't yet a feature of the API as submitted, but...)
Has anyone been able to make changes to their system (e.g. changes to set points in /config) using either
PUT
orPOST
requests to the endpoints used in this API?I tried
PUT
with read-modify-write JSON, but I got a404 Not Found
response.Following the example of the requests sent by the myinfinitytouch.carrier.com web app, I tried sending
POST
requests with XML instead, but then I get a401 Unauthorized
response with the message, "signature doesn't match". I get this response even when sending to the /system_preference endpoint, which the web app does successfully use for mutations. I wonder which signature isn't matching - the OAUTH signature?I'm still experimenting, but I'm wondering if anyone else has had success in making remote changes to their hardware.
The text was updated successfully, but these errors were encountered: