ebaauw / homebridge-zp

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

Sonos Playbar not showing up as airplay speaker #191

Closed Jens2022 closed 2 years ago

Jens2022 commented 2 years ago

Hi ebaauw,

unfortunately the Discord link is not working any longer. This is why I leave a question here.

I checked the troubleshooting tips and the wiki. I also review the closed issues but couldn't find a hint to the problem that I'm facing.

Issue

I can install the Plug in and add it to home bridge. I also can see the Sonos playbay as switch. It shows the playbar as beeing switched on, which is correct. But I neither can switch it off nor can use it as a speaker for airplay.

Log Messages

31.12.2021, 17:18:45SonosZPhomebridge-zp v1.4.12, node v16.13.1, homebridge v1.3.8, homebridge-lib v5.1.22
31.12.2021, 17:18:45SonosZPhardware: Raspberry Pi 3B 1.2 (1GB)
31.12.2021, 17:18:45SonosZPos: Raspbian GNU/Linux 10 (buster)
31.12.2021, 17:18:45SonosZPlistening on http://0.0.0.0:36735/notify
31.12.2021, 17:18:45SonosZPfound 1 households
31.12.2021, 17:18:45SonosZPSonos_WdZtSK1wOJ0DwH3O91a9ihforh: RINCON_7828CA56C8F101400 [192.168.178.41]: associated S2 zoneplayer
31.12.2021, 17:18:46SonosZPSonos_WdZtSK1wOJ0DwH3O91a9ihforh: found 2 S2 zone players in 1 zones
31.12.2021, 17:18:46SonosZP└─ Wohnzimmer (+Sub)
31.12.2021, 17:18:46SonosZP   ├─ RINCON_7828CA56C8F101400 [Wohnzimmer]: Sonos Playbar (S9) (master, tvIn)
31.12.2021, 17:18:46SonosZP   └─ RINCON_949F3E90227C01400 [Wohnzimmer (Sub)]: Sonos Sub (Sub) (satellite)
31.12.2021, 17:18:46SonosZPWohnzimmer: set Serial Number to "RINCON_7828CA56C8F101400"
31.12.2021, 17:18:46SonosZPWohnzimmer: set Manufacturer to "Sonos"
31.12.2021, 17:18:46SonosZPWohnzimmer: set Model to "Playbar (S9)"
31.12.2021, 17:18:46SonosZPWohnzimmer: set Firmware Revision to "13.4.1"
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Volume Change to 0
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Track Change to 0
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Sonos Group to ""
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Sonos Coordinator to false
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Log Level to 2
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Status Fault to 1
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Sonos Group from "" to "Wohnzimmer"
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Status Fault from 1 to 0
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set On to true
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Track to "TV"
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set TV to true
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Repeat to 0
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Shuffle to false
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Crossfade to false
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Volume to 10%
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Mute to false
31.12.2021, 17:18:46SonosZPWohnzimmer Sonos: set Remaining Duration to 0s
31.12.2021, 17:19:21SonosZPclosed http://0.0.0.0:36735/notify
31.12.2021, 17:19:23SonosZPgoodbye
31.12.2021, 17:19:31SonosSonoshomebridge-zp v1.4.12, node v16.13.1, homebridge v1.3.8, homebridge-lib v5.1.22
31.12.2021, 17:19:32SonosSonoslistening on http://0.0.0.0:40593/notify
31.12.2021, 17:19:32SonosSonoshardware: Raspberry Pi 3B 1.2 (1GB)
31.12.2021, 17:19:32SonosSonosos: Raspbian GNU/Linux 10 (buster)
31.12.2021, 17:19:32SonosSonosrestored 1 accessories from cache
31.12.2021, 17:19:32SonosSonosclosed http://0.0.0.0:40593/notify
31.12.2021, 17:19:32SonosSonoslistening on http://0.0.0.0:40593/notify
31.12.2021, 17:19:32SonosSonosclosed http://0.0.0.0:40593/notify
31.12.2021, 17:19:32SonosSonoslistening on http://0.0.0.0:40593/notify
31.12.2021, 17:19:32SonosSonosfound 1 households
31.12.2021, 17:19:32SonosSonosSonos_WdZtSK1wOJ0DwH3O91a9ihforh: RINCON_7828CA56C8F101400 [192.168.178.41]: associated S2 zoneplayer
31.12.2021, 17:19:32SonosSonosSonos_WdZtSK1wOJ0DwH3O91a9ihforh: found 2 S2 zone players in 1 zones
31.12.2021, 17:19:32SonosSonos└─ Wohnzimmer (+Sub)
31.12.2021, 17:19:32SonosSonos   ├─ RINCON_7828CA56C8F101400 [Wohnzimmer]: Sonos Playbar (S9) (master, tvIn)
31.12.2021, 17:19:32SonosSonos   └─ RINCON_949F3E90227C01400 [Wohnzimmer (Sub)]: Sonos Sub (Sub) (satellite)
31.12.2021, 17:19:32SonosSonosWohnzimmer Wohnzimmer: set Status Fault from 0 to 1
31.12.2021, 17:19:33SonosSonosWohnzimmer Wohnzimmer: set Status Fault from 1 to 0
31.12.2021, 17:19:36SonosSonosclosed http://0.0.0.0:40593/notify
31.12.2021, 17:19:38SonosSonosgoodbye
31.12.2021, 17:19:46SonosSonoshomebridge-zp v1.4.12, node v16.13.1, homebridge v1.3.8, homebridge-lib v5.1.22
31.12.2021, 17:19:47SonosSonoslistening on http://0.0.0.0:34209/notify
31.12.2021, 17:19:47SonosSonoshardware: Raspberry Pi 3B 1.2 (1GB)
31.12.2021, 17:19:47SonosSonosos: Raspbian GNU/Linux 10 (buster)
31.12.2021, 17:19:47SonosSonosrestored 1 accessories from cache
31.12.2021, 17:19:47SonosSonosclosed http://0.0.0.0:34209/notify
31.12.2021, 17:19:47SonosSonoslistening on http://0.0.0.0:34209/notify
31.12.2021, 17:19:47SonosSonosfound 1 households
31.12.2021, 17:19:47SonosSonosSonos_WdZtSK1wOJ0DwH3O91a9ihforh: RINCON_7828CA56C8F101400 [192.168.178.41]: associated S2 zoneplayer
31.12.2021, 17:19:47SonosSonosSonos_WdZtSK1wOJ0DwH3O91a9ihforh: found 2 S2 zone players in 1 zones
31.12.2021, 17:19:47SonosSonos└─ Wohnzimmer (+Sub)
31.12.2021, 17:19:47SonosSonos   ├─ RINCON_7828CA56C8F101400 [Wohnzimmer]: Sonos Playbar (S9) (master, tvIn)
31.12.2021, 17:19:47SonosSonos   └─ RINCON_949F3E90227C01400 [Wohnzimmer (Sub)]: Sonos Sub (Sub) (satellite)
31.12.2021, 17:19:47SonosSonosWohnzimmer Wohnzimmer: set Status Fault from 0 to 1
31.12.2021, 17:19:48SonosSonosWohnzimmer Wohnzimmer: set Status Fault from 1 to 0
31.12.2021, 17:20:52SonosSonosWARNUNGwarning: heartbeat 63, drift 1001
31.12.2021, 17:20:55SonosSonosWohnzimmer Wohnzimmer: get Remaining Duration: return 0s
31.12.2021, 17:21:06SonosSonosWohnzimmer Wohnzimmer: get Remaining Duration: return 0s
31.12.2021, 17:21:31SonosSonosWohnzimmer Wohnzimmer: On changed from true to false
31.12.2021, 17:21:32SonosSonosWohnzimmer Wohnzimmer: set On from false to true
31.12.2021, 17:21:55SonosSonosWohnzimmer Wohnzimmer: get Remaining Duration: return 0s
31.12.2021, 17:23:18SonosSonosWohnzimmer Wohnzimmer: get Remaining Duration: return 0s

Debug Files

Thank you so much for your help and our support.

Best regards

Jens

ebaauw commented 2 years ago

You cannot stop nor pause the PlayBar when it’s on TV input (cf the Sonos app), so Homebridge ZP shows it as on.

Airplay has nothing to do with HomeKit, despite Apple’s marketing efforts to obfuscate this. It’s a completely different protocol than HAP. Homebridge ZP exposes the zone players to HomeKit, so you can control them from HomeKit automations, apps, and Siri, but it doesn’t provide Airplay features.

I tried to provide Airplay back in the days by integrating AirSonos (somewhere in the closed issues), but it was a lousy experience (bad sound quality, wouldn’t play variable bitrate) so I dropped that. The issue is that Airplay expects to push a stream to a speaker, where Sonos connects from the speaker to a stream. So you need a proxy in between that accepts the incoming stream from the device with the music and an incoming connection from the zone player. That proxy needs more resources than your typical NodeJS environment can provide.

ebaauw commented 2 years ago

unfortunately the Discord link is not working any longer

What error do you get? It seems to work for me, but I’m already a member.

Jens2022 commented 2 years ago

Hi Erik,

thanks a lot for your swift reply. Totally makes sense, thanks for the details. I remember vaguely that in an earlier version I could see the speaker when I used AirPlay from my iPad but I have to admit that I didn't do a proper check if the quality is sufficient. One way could be integrating an AirPlay2 ready Sonos speaker in the my home setting this should allow to use even the old speakers with AirPlay. This should allow to circumvent the limitations of my current proxy (the HOOBS).

I guess the discord link is not working for me because I'm not a member yet.

Thanks for your help and the details.

Best Regards

Jens

ebaauw commented 2 years ago

If you have a zone player that natively supports Airplay2 you can stream to that player and use Homebridge ZP to group the other players with that one. I actually have a Port in my wiring closet as group coordinator and use automations to group/ungroup my other players to that when entering or leaving rooms. By far the cheapest option would be an IKEA SYMFONISK bookshelf speaker, and just keep it on mute.