sonos-controller
sonos-controller copied to clipboard
SonosDevice::getZoneName is actually SonosDevice::getRoomName
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
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 ?
This night i gonna implement it on another branch to test it.
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.
Also, I gonna rename setZoneName() to setRoomName().
@mguntli can you check on feature/24-get-room-name branch ?