Reputation: 68
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.
Upvotes: 1
Views: 983
Reputation: 171
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.
Upvotes: 2