core icon indicating copy to clipboard operation
core copied to clipboard

A persisted dynamic group is applied after a restart, but the Loxone app shows "No group available" and cannot ungroup it

Open timanders22 opened this issue 3 weeks ago • 4 comments

Version: 4.0.0-beta.22 (Docker, Raspberry Pi 4), two Google Cast zones, Loxone app (Windows).

What happens

  • A dynamic group (zone 1 leader, zone 2 member) was created from the Loxone app on 2026-10-30 16:12:48 UTC (grp-1-googleCast-mvv682ha; the time is decoded from the id).
  • It is stored in config.json under groups.audioGroups, and after the container restart on 2026-11-07 the log shows restored persisted audio groups count=1 and group created externalId=grp-1-googleCast-mvv682ha leader=1.
  • From then on zone 2 follows zone 1: on 2026-11-08 zone 2 logged activeInput=mixedgroup on 25 player starts, and it showed and played zone 1's track.
  • In the Loxone app, both zones' group dialog said "Keine Gruppe verfügbar" (no group available) on the "join group" tab. So the user had no way to see or dissolve the group, and believed the zones were independent.

Workaround that worked

In the app, "Gruppe bilden" (create group) with zone 1 + zone 2 sent audio/cfg/dgroup/update/new/1,2; sonn removed the old group, created grp-1-googleCast-mw8husd4 and logged broadcasted groups count=1. Dissolving it in the app then sent audio/cfg/dgroup/update/grp-1-googleCast-mw8husd4, and audioGroups in config.json became [].

Probable cause (from reading the code, not measured on the wire)

groupManager.broadcastGroupState() – the audio_sync_event with the group list – is only sent when a group changes and after a group or master volume change. Restored groups are applied at startup, before any app is connected, and the connect snapshot sends one audio_event per zone but no audio_sync_event. An app that connects after a restart therefore never receives the group list. This is a conclusion from the source (groupManager.ts, loxoneHttpService.ts on main); I have not captured the WebSocket traffic.

Suggestion

Send the current audio_sync_event group list as part of the connect snapshot (or after secure/authenticate), so the app always knows about groups sonn is applying.

Related: #426 (the buzzer report was made while this group existed, see the comment there).

timanders22 avatar Nov 09 '26 00:11 timanders22

Thanks for tracking this down. Fixed on dev, in the next beta: when the Loxone app connects, sonn now sends it the current group list (the same audio_sync_event it sends on changes), so a group restored after a restart shows up and can be dissolved.

rudyberends avatar Nov 11 '26 16:11 rudyberends

Thanks for the fix. I will check with beta.24 whether a group restored after a restart shows up in the Loxone app and can be dissolved there, and report back here.

timanders22 avatar Nov 22 '26 10:11 timanders22

This fix is in beta.24, so I'm closing this. If it still happens on beta.24 or later, just leave a comment here and I'll reopen it.

rudyberends avatar Nov 28 '26 18:11 rudyberends

Thanks for closing it. beta.24 is running here (image 7a99016f); if a group restored after a restart is missing from the Loxone app again, I'll comment here.

timanders22 avatar Nov 28 '26 21:11 timanders22