Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Weird API behaviour after cold boot.
-
Hi @david
I have Network Standby enabled. I have noticed that if I power off the STR-DN1080 at the wall (after powering off with the API first and waiting a short time - otherwise bad things happen to the configuration!), when the STR-DN1080 receives power again and starts responding to the API (but still on stand-by) the results of getPlayingContentInfo (1.2) are incorrect. I am detecting which input is active and it always returns the same wrong input, i.e.
{ "id": 132, "result": [ [ { "contentKind": "", "output": "extOutput:zone?zone=1", "parentUri": "", "source": "extInput:bd-dvd", "stateInfo": { "state": "STOPPED", "supplement": "" }, "uri": "extInput:bd-dvd" } ] ] }
If I power on the receiver with the API, and try the exact same command again it returns the correct input, i.e.
{ "id": 132, "result": [ [ { "contentKind": "", "output": "extOutput:zone?zone=1", "parentUri": "", "source": "extInput:sat-catv", "stateInfo": { "state": "STOPPED", "supplement": "" }, "uri": "extInput:sat-catv" } ] ] }
Every time, it's always the Blu-Ray input that the command returns. My Blu-Ray player hasn't been turned on for over a year.
Is this expected behaviour? Thanks.
-
I don't know if this is expected behavior or not but I can see why it behaves like this.
Then the device is up in network standby only a minimal set of hardware components will be running and there for the API component can't query any other hardware component for it's current status, the API just remember the last status and reports that if requested.
Then you power off the device completely the API looses the memory of the current hardware status, and since the device is still in standby mode, the API just takes the first value in the list (see https://developer.sony.com/develop/audio-control-api/api-references/device-uri) and that happens to be the DVD player.
Then you power on the device the API can query the hardware again and will report the correct output. -
Hi @david
Thank you for that. That indeed makes sense. The easy solution for me then is to only query the active input when the AVR is powered up.