I know that homey has a http request app and also in v2 it can make requests via logic make web request. So I made a flow with logic card like this:
Method: POST
URL: http://192.168.8.10/sony/IRCC
Headers: Content-Type:text/xml: charset=UTF-8 SOAPACTION:“urn:schemas-sony-com:service:IRCC:1#X_SendIRCC” X-Auth-PSK:sony
Body: <?xml version="1.0"?><s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:X_SendIRCC xmlns:u=“urn:schemas-sony-com:service:IRCC:1”> AAAAAQAAAAEAAAAVAw==</u:X_SendIRCC></s:Body></s:Envelope>
Everything just copied from shortcut.
But it returns 403, which means no pre-shared-key
I didn’t use a {}.
I think problem with headers.
Could anyone help, how should I list headers there?
Or may be how should use this request in http request app?
I’m using this Sony android tv app. Before they released the app, I had to try requests, but no luck. So the app helped me a lot. Request in homey are too dumb, they do not support authentication, good xml headers and etc.
It took some thinking and some try and error, but I got it working. The quotes surrounding the Soapaction need to be taken literally and need to be escaped upon encoding by using the \ symbol. This means the url and the body look like this when using the http request app, POST XML card to toggle the tv on and off: