Skip to main content
inopinatus
Prominent Collaborator I
Oct 23, 2016 4:08 AM UTC
Answered

GetZoneInfo - HTAudioIn codes

I've been talking to my Playbar with UPnP. The GetZoneInfo command appears to be the command used by "About My Sonos System" and returns some familiar data, e.g.

code:

<u:GetZoneInfoResponse
xmlns:u="urn:schemas-upnp-org:service:DeviceProperties:1">
<SerialNumber>5C-AA-FD-xx-xx-xx:F</SerialNumber>
<SoftwareVersion>33.15-32291</SoftwareVersion>
<DisplaySoftwareVersion>6.4</DisplaySoftwareVersion>
<HardwareVersion>1.9.1.10-2</HardwareVersion>
<IPAddress>10.0.x.x</IPAddress>
<MACAddress>5C:AA:FD:xx:xx:xx</MACAddress>
<CopyrightInfo>.. 2004-2015 Sonos, Inc. All Rights Reserved.</CopyrightInfo>
<ExtraInfo>OTP: </ExtraInfo>
<HTAudioIn>2</HTAudioIn>
</u:GetZoneInfoResponse>


I'm curious about the values for HTAudioIn. It seems to represent the SPDIF port state. So far I've got:

2: Stereo
18: Dolby 5.1
21: not listening (- playing another stream?), comes up for TuneIn and Airplay via my Connect.
22: Silence

Anyone got a better reference or more data?
    This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.
    inopinatus
    Prominent Collaborator I
    Oct 23, 2016 8:32 PM UTC
    update, found some more:
    0: no spdif input connected
    2: Stereo
    7: Dolby 2.0
    18: Dolby 5.1
    21: (not listening) playing another stream?
    22: Silence

    I'm sort of hoping these constants will turn out to map to some well-known digital audio standard, and aren't just arbitrary enumerations in a Sonos header file.

    Also, http://<sonos_ip>:1400/status/toslink seems to decode them.
    uncooked meat prior to state vector collapse

    4 replies

    inopinatus
    inopinatusAuthorAnswer
    Prominent Collaborator I
    Oct 23, 2016 8:32 PM UTC
    update, found some more:
    0: no spdif input connected
    2: Stereo
    7: Dolby 2.0
    18: Dolby 5.1
    21: (not listening) playing another stream?
    22: Silence

    I'm sort of hoping these constants will turn out to map to some well-known digital audio standard, and aren't just arbitrary enumerations in a Sonos header file.

    Also, http://<sonos_ip>:1400/status/toslink seems to decode them.
    Translate
    uncooked meat prior to state vector collapse
    inopinatus
    Prominent Collaborator I
    Oct 23, 2016 11:33 PM UTC
    Well this paid off. I can now reverse the Playbar's automatic ungroup-on-autoplay. This PR for the 'sonos' Ruby gem makes it possible to regroup on system idle: https://github.com/gotwalt/sonos/pull/56

    So I execute this in a short ruby script on my home server every minute:
    code:
    system.party_mode if system.groups.count > 1 && system.inactive?


    As a result the "Include grouped rooms" autoplay on the CONNECT does what we want: music in every room, if the house was quiet, music everywhere but the lounge if the TV is on.
    Translate
    uncooked meat prior to state vector collapse
    inopinatus
    Prominent Collaborator I
    Dec 2, 2017 10:27 PM UTC
    http://<sonos_ip>:1400/status/toslink seems to decode them.

    Sadly some toxic, user-hostile product manager at Sonos has crippled this kind of community dev effort by removing half the useful diagnostics, including this one.
    Translate
    uncooked meat prior to state vector collapse
    controlav
    Lead Maestro
    Dec 3, 2017 1:09 AM UTC
    1 means "Unsupported". I have not found any mapping of this to anything else, looks like they made them up.
    Translate
    Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.