ebaauw / homebridge-zp

Homebridge plugin for Sonos ZonePlayer
Apache License 2.0
241 stars 20 forks source link

The log entry for "set Active from x to x" and also for "set Configured Name to "xxx" has a hard-coded "TV" for the device name #171

Closed jsiegenthaler closed 3 years ago

jsiegenthaler commented 3 years ago

Issue

The log entry for "set Active from x to x" and also for "set Configured Name to "xxx" and also for Active Identifier has a hard-coded "TV" for the device name All other log entries use the device name

Using homebridge-zp v1.2.1

Log Messages

[02/04/2021, 13:33:54] [Sonos] Kitchen Sonos: set On to true
[02/04/2021, 13:33:54] [Sonos] Kitchen TV: set Active from 0 to 1
[02/04/2021, 13:33:54] [Sonos] Kitchen Sonos: On changed from true to true
[02/04/2021, 13:33:54] [Sonos] Kitchen Sonos: set Track to "Motorcade"
[02/04/2021, 13:33:54] [Sonos] Kitchen Sonos: set Repeat to 0
[02/04/2021, 13:33:54] [Sonos] Kitchen Sonos: set Shuffle to false

[02/04/2021, 13:33:53] [Sonos] Kitchen TV: set Active to 0
[02/04/2021, 13:33:53] [Sonos] Kitchen TV: set Configured Name to "Kitchen Sonos"
[02/04/2021, 13:40:17] [Sonos] Kitchen TV: set Active Identifier to "Energy 80s"
jsiegenthaler commented 3 years ago

Note also on these entries:

[02/04/2021, 13:55:51] [Sonos] Kitchen TV: input sources: ["Ambi Nature Radio (Sleep, Relaxation & Meditation)","BBC Radio 1","BBC World Service News","Energy 80s","Global Pulse","Holiday Concerto","More Minimal","Radio Swiss Pop","RNZ National","SRF 3","swiss melody","Sonos Chime"]
[02/04/2021, 13:55:51] [Sonos] Kitchen TV: set Active Identifier to "Energy 80s"
[02/04/2021, 13:55:51] [Sonos] Bedroom TV: input sources: ["Ambi Nature Radio (Sleep, Relaxation & Meditation)","BBC Radio 1","BBC World Service News","Energy 80s","Global Pulse","Holiday Concerto","More Minimal","Radio Swiss Pop","RNZ National","SRF 3","swiss melody","Sonos Chime"]
[02/04/2021, 13:55:51] [Sonos] Bedroom TV: set Active Identifier to "n/a"
ebaauw commented 3 years ago

All other log entries use the device name

No, they don't. They use the service name, as exposed by Homebridge ZP. This is derived from the zone name with a fixed suffix "Sonos", "Speaker", or "TV". You can change service (and accessory) names in HomeKit.

Note that the accessory category was changed to speaker, so Home shows a different icon. The external accessory didn't change, and still is a "TV", exposing a Television service.