Sonos zone reports `mode=stop` to Loxone while Spotify (soloist) is audibly playing → app shows "could not be played"
Version: sonn core v4.0.0-beta.24 (Docker), Loxone Miniserver Gen2, zone output = Sonos speaker
What happens
A Loxone favorite (Spotify playlist) is started on zone 16 "WC", whose output is a Sonos speaker. Audio plays correctly on the speaker and the soloist process advances through the track and on to the next one. However, sonn reports the zone to Loxone as mode=stop the whole time. The Loxone app then shows:
Nothing is playing in WC — "Meeresrauschen Meditationsmusik" could not be played. The service may be unreachable, or it may not offer this for playback here.
Expected
mode=play (plus title/duration updates on track change) while the soloist is playing to the Sonos zone.
Log excerpt (DEBUG/SPAM, timestamps UTC, zone 16):
10:52:03.627 [DEBUG][Audio|SoloistProcess] playing spotify:track:5qlfsiq1kUHRhZcgGznbeS "Meeresrauschen Meditationsmusik" by "Hanna Hofmanen" [3:00 / 3:45] zoneId=16
10:52:04.291 [SPAM][LoxoneHttp|Notifier] audio_event payload mode=stop time=181 duration=226 title="Meeresrauschen Meditationsmusik" zoneId=16
10:52:05.292 [SPAM][LoxoneHttp|Notifier] audio_event payload mode=stop time=182 ...
... (every second, time keeps counting up, mode stays stop) ...
10:52:43.627 [DEBUG][Audio|SoloistProcess] playing spotify:track:5qlfsiq1kUHRhZcgGznbeS ... [3:40 / 3:45]
10:52:48.484 [DEBUG][Audio|SoloistProcess] playing spotify:track:6C6F6RtSM9pP06crKoZN5x "Relax mit Meeresrauschen" by "Hanna Hofmanen" [0:00 / 3:32] zoneId=16
10:52:49.309 [SPAM][LoxoneHttp|Notifier] audio_event payload mode=stop time=0 duration=0 title="Meeresrauschen Meditationsmusik" zoneId=16
10:52:49.309 [DEBUG][Zones|Manager] zone power manager state update desiredSignal=0 mode=stop offDelayMs=300000 zoneId=16
10:52:51.325 [DEBUG][Zones|StateController:Sonos] sonos state update mode=stop sourceName="Meeresrauschen Meditationsmusik" title="Meeresrauschen Meditationsmusik" audiotype=0 hasCover=false zoneId=16
10:53:39.031 [SPAM][LoxoneHttp|Notifier] audio_event payload mode=stop time=0 ...
Observations
timeadvances in thestoppayloads, so the position is being tracked while the mode is wrong.- On track change the new title is not propagated (old title kept,
duration=0). - The power manager computes
desiredSignal=0with the 5 min off-delay although audio is playing. SonosStateController.checkTransportState()only cross-checks viaGetTransportInfowhen sonn believes the zone is playing; the inverse case (sonn says stop, speaker plays our own stream) is never corrected.
Happy to provide full logs or test a build.
Possibly related to #462 (position / item-transition handling in Sonos zones). The difference here: the zone's mode stays stop the whole time while the soloist stream is audibly playing, and on a track change the new item is not propagated to Loxone at all.
All speakers involved are S2 (Play:5 Gen2, One, Playbase, Move; firmware 27.3), so this is not the S1 misdetection from #444.
Thanks, your analysis was right on. Two fixes are on dev. First, while the speaker plays our stream and its events say stopped, sonn now asks the speaker itself, and after two answers of PLAYING it believes that and rebuilds the connection. Second, the speaker only knows the title it was given when the stream started, so on our own stream sonn no longer takes title and metadata from it. That's why the first track's title stuck. Could you try the dev build?
Tested with the dev build (4.0.0-beta.25+dev-20261128174634): the zone now reports mode=play while our stream plays. Fixed from my side, thanks!
The "could not be played" toast in the Loxone app still appeared once, but it has a different cause: a second soloist for the zone fails with store_busy and is reported as a skipped playback. I opened #466 for that.
Thanks for testing. I will close this with the beta.25 release.