Skip to main content
Answered

GetZoneInfo - HTAudioIn codes

  • October 23, 2016
  • 4 replies
  • 661 views

inopinatus
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?

Best answer by inopinatus

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.
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.

4 replies

inopinatus
  • Author
  • Prominent Collaborator I
  • Answer
  • October 23, 2016
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.

inopinatus
  • Author
  • Prominent Collaborator I
  • October 23, 2016
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.

inopinatus
  • Author
  • Prominent Collaborator I
  • December 2, 2017
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.

controlav
Forum|alt.badge.img+24
  • Lead Maestro
  • December 3, 2017
1 means "Unsupported". I have not found any mapping of this to anything else, looks like they made them up.