[Ember] INVALID_STATE multicast registration errors on scene recall and incorrect overlapping group states – SONOFF Dongle Max

Open
#33,910 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
backend, databases

Research direction

Start with the lastOptimisticState mechanism in lib/extension/groups.ts, which the report identifies as a possible cause of stale states for overlapping groups. Trace how native scene recall and standard group commands update and publish group state, then compare the affected subgroup states with their device states. Done means reproducing the reported mismatch and confirming that all affected groups report their members’ resulting state; the multicast INVALID_STATE error may need separate investigation.

Written by the indexing model from the issue text.

Description

problem
What happened?

When recalling native Zigbee2MQTT scenes, I consistently receive the following error, with the group ID varying depending on the group being controlled.

zh:ember: Failed to register group '19' in multicast table with status=INVALID_STATE.

I am also experiencing incorrect state reporting when recalling native Zigbee scenes involving overlapping Zigbee groups.

The physical lights respond correctly and individual device states update correctly, but groups containing those devices intermittently retain their previous state.

For example, I have a Kitchen group containing 26 lights, with several smaller groups containing subsets of those same lights.

After recalling a native scene which turns all 26 lights on, I recorded the following:

Group Individual devices ON Reported group state
Kitchen 26/26 ON
Kitchen Spots 11/11 OFF
Kitchen Island 3/3 OFF
Apex Ceiling 3/3 ON
Apex Party 5/5 OFF

This has been verified through Home Assistant state history.

I have also observed individual devices displaying the correct state within the Zigbee2MQTT group membership page, whilst the group's Exposes page displays an unknown state (?).

Refreshing the group state using the refresh button does not resolve this.

I originally experienced the multicast registration error on firmware 7.4.5. I have since upgraded to 8.2.2, but the error persists when recalling scenes.

What did you expect to happen?

I would expect native Zigbee scene recall to complete without multicast registration errors.

When a scene changes the state of devices belonging to multiple Zigbee groups, I would expect all affected groups to update their reported states consistently with their individual members.

For example, if all 11 lights belonging to the Kitchen Spots group are switched on by recalling a scene on the larger Kitchen group, the Kitchen Spots group should also report ON.

I would expect consistent group state behaviour regardless of whether the lights are controlled through individual device commands, standard group commands or native scene recall.

How to reproduce it (minimal and precise)
  1. Create a Zigbee group containing multiple lights (Group A).

  2. Create two additional Zigbee groups (Group B and Group C), each containing different subsets of the lights in Group A.

  3. Store a native Zigbee scene on Group A with all lights switched ON.

  4. Recall the scene to establish the initial ON state.

  5. Switch Group A OFF using a standard group command:

Topic: zigbee2mqtt/Kitchen/set
Payload: {"state":"OFF"}

  1. Switch Group B ON and then OFF directly, leaving Group C untouched.

  2. Recall the stored scene on Group A:

Topic: zigbee2mqtt/Kitchen/set
Payload: {"scene_recall":16}

  1. Compare the reported states of Group B and Group C against their individual member devices.

In my testing:

  • All individual lights reported ON.
  • Group B, which had been directly toggled, correctly reported ON.
  • Group C, which had not been directly toggled, incorrectly remained OFF.

I repeated this using a Kitchen group containing 26 lights and multiple overlapping subgroups. Every untouched subgroup remained OFF, whilst the directly toggled subgroup correctly updated to ON.

As a control test, replacing the scene recall command with a standard group ON command resulted in all groups reporting correctly.

The multicast registration error can also be observed in the Zigbee2MQTT logs when recalling native scenes.

Zigbee2MQTT version

2.14.4

Adapter firmware version

EmberZNet 8.2.2 [GA] (previously 7.4.5 [GA])

Adapter

SONOFF Dongle Max (Dongle-M) – EFR32MG24 – Ember adapter – 115200 baud

Setup

Zigbee2MQTT running as a Home Assistant add-on.

Hardware: Dell Wyse 5070
CPU: Intel Pentium Silver J5005
RAM: 8 GB

Coordinator: SONOFF Dongle Max (Dongle-M)
Chipset: Silicon Labs EFR32MG24
Adapter driver: ember
Firmware: 8.2.2 [GA]
Baudrate: 115200

The network contains multiple Zigbee lighting groups, including overlapping groups where individual devices belong to both a room-wide group and smaller lighting groups.

Native Zigbee scenes are recalled using MQTT scene_recall commands.

The issue is observable independently of Home Assistant dashboard rendering.

Device database.db entry

N/A – The issue affects multiple devices and overlapping Zigbee groups rather than a single device.

Debug log

Example log from testing a newly created group containing three IKEA lights, using firmware 7.4.5.

Non-essential MQTT payload attributes have been omitted for readability.

[03/12/2026, 12:23:42] frontend:api: Sending {"topic":"19/set","payload":{"state":"OFF"}}
[03/12/2026, 12:23:42] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Island 1', payload '{"state":"OFF"}'
[03/12/2026, 12:23:42] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Test Island', payload '{"state":"OFF"}'
[03/12/2026, 12:23:42] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Island 2', payload '{"state":"OFF"}'
[03/12/2026, 12:23:42] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Island 3', payload '{"state":"OFF"}'
[03/12/2026, 12:23:42] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Island', payload '{"brightness":254,"state":"OFF"}'
[03/12/2026, 12:23:43] zh:ember: Failed to register group '19' in multicast table with status=INVALID_STATE.

The same INVALID_STATE error has subsequently been observed during native scene recall on firmware 8.2.2.

Notes

Potentially related issues:

  • #32521
  • #29315
  • #28297

Additional troubleshooting undertaken:

  • Upgraded coordinator firmware from 7.4.5 to 8.2.2.
  • Created a completely new Zigbee group to eliminate potential corruption of an existing group.
  • Verified individual device states and group states using timestamped Home Assistant history.
  • Compared native scene recall against standard group ON/OFF commands.
  • Tested directly toggling individual subgroups before recalling a scene on the larger group.
  • Confirmed that replacing native scene recall with a standard group command restores correct group state reporting in testing.

One possible area worth investigating is the lastOptimisticState mechanism in lib/extension/groups.ts.

Directly controlling a group appears to invalidate its cached optimistic state. However, indirectly changing a group's state through another overlapping group may leave its cached optimistic state inconsistent with its published state.

This could potentially explain why directly toggling a subgroup before recalling a scene allows that subgroup to update correctly, whilst untouched subgroups remain stale.

The relevant groups.ts implementation appears identical in release 2.14.4 and the dev branch at the time of checking. I have not run the dev branch on my production network.

I appreciate that the multicast registration error and overlapping group state issue may be separate problems, but both are observable in the same environment.

Happy to provide additional logs or undertake further controlled testing if required.

Dominant language
TypeScript
Stars
15.9k
Forks
2.1k
Avg merge
12h 11m
Merged PRs (30d)
32

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Koenkk/zigbee2mqtt

All issues in Koenkk/zigbee2mqtt

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.