#Delays with Z2M not sending the message straight away (sometimes 10s) + double messages.

1 messages · Page 1 of 1 (latest)

pastel lintel
#

Hello,

I'm trying to figure out issues I have with Z2M that lead to a subpar experience: sometimes my actions are really slow to register with the device.

First thing I noticed is double messages being sent. This is the logs after clicking ONCE on the switch (in a dashboard, no physical switch) to turn OFF the light:

info 2025-09-23 16:02:45z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Light Erika bedroom', payload '{"brightness":254,"color":{"h":40,"hue":40,"s":49,"saturation":49,"x":0.3804,"y":0.3767},"color_mode":"color_temp","color_options":{"execute_if_off":true},"color_temp":250,"color_temp_startup":250,"level_config":{"current_level_startup":254,"execute_if_off":true,"on_level":"previous","on_off_transition_time":5},"linkquality":88,"power_on_behavior":"previous","state":"OFF","update":{"installed_version":16777268,"latest_version":16777268,"state":"idle"},"update_available":null}'

info 2025-09-23 16:02:45z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Light Erika bedroom', payload '{"brightness":254,"color":{"h":40,"hue":40,"s":49,"saturation":49,"x":0.3804,"y":0.3767},"color_mode":"color_temp","color_options":{"execute_if_off":true},"color_temp":250,"color_temp_startup":250,"level_config":{"current_level_startup":254,"execute_if_off":true,"on_level":"previous","on_off_transition_time":5},"linkquality":96,"power_on_behavior":"previous","state":"OFF","update":{"installed_version":16777268,"latest_version":16777268,"state":"idle"},"update_available":null}'

The exact same message is sent twice. Same for turning ON the light or changing the brightness, everything is duplicated.

While odd I don't think this is the main issue.

#

The main issue is (not always, but often) delays between the action and the message being published.

As an example, I have an automation that, when the light turns on, set the brightness to 100% after 500ms, attached is the trace for the automation on the light.turn_on step. It was completed at September 23, 2025 at 16:06:27.

If we look in the z2m log (duplicated messages removed), we have:

info 2025-09-23 16:06:27z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Light Erika bedroom', payload '{"brightness":3,"color":{"h":40,"hue":40,"s":49,"saturation":49,"x":0.3804,"y":0.3767},"color_mode":"color_temp","color_options":{"execute_if_off":true},"color_temp":250,"color_temp_startup":250,"level_config":{"current_level_startup":254,"execute_if_off":true,"on_level":"previous","on_off_transition_time":5},"linkquality":80,"power_on_behavior":"previous","state":"ON","update":{"installed_version":16777268,"latest_version":16777268,"state":"idle"},"update_available":null}'

info 2025-09-23 16:06:38z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Light Erika bedroom', payload '{"brightness":254,"color":{"h":40,"hue":40,"s":49,"saturation":49,"x":0.3804,"y":0.3767},"color_mode":"color_temp","color_options":{"execute_if_off":true},"color_temp":250,"color_temp_startup":250,"level_config":{"current_level_startup":254,"execute_if_off":true,"on_level":"previous","on_off_transition_time":5},"linkquality":96,"power_on_behavior":"previous","state":"ON","update":{"installed_version":16777268,"latest_version":16777268,"state":"idle"},"update_available":null}'

First message at 16:06:27 matches when I pressed the switch on the dashboard, the automation fired and finished right away, as expected.

But the message for the full brightness is not sent until 16:06:38! That's a full 11 seconds later.

I've looked online a lot but can't find anything that helps.

Thanks !