sonos-controller icon indicating copy to clipboard operation
sonos-controller copied to clipboard

SonosDevice::getZoneName is actually SonosDevice::getRoomName

Open mguntli opened this issue 7 years ago • 5 comments

As far as I understood the Sonos system, every speaker can have a name. Example with three speakers:

  • Living Room (Living Room L + Living Room R joined as stereo pair)
  • Bedroom

A) GetZoneGroupAttributes / CurrentZoneGroupName If all three speakers are joined together, the "CurrentZoneGroupName" returns "Living Room + 1".

B) http://sonosip:1400/status/zp

  • Living Room L
  • Living Room R
  • Bedroom

C) http://sonosip:1400/device_description.xml

  • Living Room
  • Living Room
  • Bedroom

Proposal: Rename "getZoneName" to "getRoomName", get the room name from device_description.xml

mguntli avatar Nov 13 '17 19:11 mguntli

I'm ok with the idea to rename getZoneName to getRoomName but it seems strange to loose the position information no ? Perhaps a third method ?

In the configuration :

  • Living Room (Living Room L + Living Room R joined as stereo pair)
  • Bedroom

where Living Room and Bedroom are joined.

  • getZoneName() returns "Kitchen + 1"
  • getRoomName() returns "Kitchen"
  • getDeviceName() returns "Kitchen (L)"

It's better no ?

vmichalak avatar Nov 13 '17 20:11 vmichalak

This night i gonna implement it on another branch to test it.

vmichalak avatar Nov 13 '17 20:11 vmichalak

Correct, I think your solution is the best one (Zone / Room / Device). The Sonos App basically just lists the Rooms to choose from, which is I think the easiest to understand for the users.

mguntli avatar Nov 13 '17 21:11 mguntli

Also, I gonna rename setZoneName() to setRoomName().

vmichalak avatar Nov 13 '17 22:11 vmichalak

@mguntli can you check on feature/24-get-room-name branch ?

vmichalak avatar Nov 13 '17 23:11 vmichalak