Sony Audio Control API - Can't Change Input on AV Receiver

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Sony Audio Control API - Can't Change Input on AV Receiver



I've been playing around with Sony's Audio Control API recently, with the aim of setting up 'scenes' at home, where I can switch devices on/off, set lighting, etc with one command.



I can list available inputs with getCurrentExternalTerminalsStatus, but can't actually change inputs via setActiveTerminal.



Request



"method": "setActiveTerminal",
"id": 13,
"params": [

"active": "active",
"uri": "extInput:sat-catv"
],
"version": "1.0"



Response



"error": [
15,
"unsupported operation"
],
"id": 13



Judging by the response given, I'm guessing that my AV receiver (STR-DN860) doesn't support this for some reason, but I'm posting this here since Sony's support pages suggest to do so.




2 Answers
2



I think you want to use "setPlayContent" and not "setActiveTerminal".



"setActiveTerminal" powers "off" or "on" the output zone.



To change the output to "sat-catv" try



"method":"setPlayContent",
"id":47,
"params":[

"output":"extOutput:zone?zone=1",
"uri":"extInput:sat-catv"
],
"version":"1.2"



using curl


curl -i -d '"method":"setPlayContent","id":47,"params":["output":"extOutput:zone?zone=1","uri":"extInput:sat-catv"],"version":"1.2"' http://xxx.xxx.xxx.xxx:10000



"setActiveTerminal" can be used to power on/off the device similar to "setPowerStatus" with:


curl -i -d '"method":"setActiveTerminal","id":13,"params":["active":"inactive","uri":"extOutput:zone?zone=1"],"version":"1.0"' http://xxx.xxx.xxx.xxx:10000/sony/avContent



But can also power on/off each zone individually by using ?zone=2, ?zone=3... dependent on how many zones your device support.



Don't have a STR-DN860 to test on but I think this should work.





Yep, that did the trick! Knew it'd be something simple... Thanks!
– Nickedynick
Aug 10 at 14:21



The example code, doesn't seem to work on the STR-DN1080. I get this result:



"error": [
14,
"1.2"
],
"id": 47



I have also tried to switch input to the TV:



"method":"setPlayContent",
"id":47,
"params":[

"output":"extOutput:zone?zone=1",
"uri":"extInput:tv"
],
"version":"1.2"



Both are supported on the STR-DN1080:
https://developer.sony.com/develop/audio-control-api/api-references/device-uri





Hi, Then I'm testing your example it works for me, calling my STR-DN1080. Can you provide how you are trying to run this? And can you provide the version the "getSystemInformation" returns?
– David - Sony
Sep 3 at 12:55






Hello. Thanks for your reply. The version is: "M41.R.0377". My AVR is an NZ model which has support for wake from network, etc. I am testing via "Insomnia" on Windows 10, and also via an Android app I'm developing. Both use the same JSON string via an HTTP POST to ipaddress:10000/sony/audio
– grolschie
Sep 3 at 23:03






@grolshie the address should be ipaddress:10000/sony/avContent or is that just a typo here?
– David - Sony
Sep 4 at 7:40






Thank you, David. Sorry, I just realised this and was about to post.
– grolschie
Sep 4 at 7:43





Follow-up question. Do you have a list of Sony audio devices that support the API please? The hardware list on the website doesn't seem to list them all (presumably). Thanks.
– grolschie
20 hours ago






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard