Sony's Developer World forum

    • Home
    • Forum guidelines

    Weird API behaviour after cold boot.

    Audio Control API
    audio control api str-dn1080
    2
    3
    4255
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      grolschie last edited by grolschie

      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.

      1 Reply Last reply Reply Quote
      • D
        david DeveloperWorld last edited by

        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.

        1 Reply Last reply Reply Quote
        • G
          grolschie last edited by

          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.

          1 Reply Last reply Reply Quote
          • First post
            Last post
          Developer World
          Copyright © 2021 Sony Group Corporation. All rights reserved.
          • Contact us
          • Legal