[Improvement] Sonoff SNZB-09P: Group alarm configuration attributes into a single ZCL write to reduce latency

Open
#33,908 1 comment 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
49/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Find the Sonoff SNZB-09P converter and inspect how it handles the alarm configuration keys and sends their ZCL writes. Check whether the Zigbee library and device support writing those attributes together, then compare the write behavior for a payload containing several alarm settings. Done means the settings are sent in one multi-attribute write when supported and the siren uses the new configuration when triggered immediately afterward.

Written by the indexing model from the issue text.

Description

problem
What happened?
Device information
  • Model: Sonoff SNZB-09P (Indoor Zigbee Siren)
  • Firmware version: 1.2.0 (4608 / SN-TLSR8656-09P-01-v1.2.0.ota)
  • Power supply mode: Tested on both Battery and USB-C DC power — identical latency observed.
Describe the issue / improvement

When sending a single MQTT JSON payload containing multiple alarm configuration attributes (e.g., sound enable, light enable, volume level, sound type, and duration) right before triggering the siren (siren_on), there is a ~1.5 to 2 seconds latency before the siren actually starts ringing.

Because Zigbee2MQTT sends each attribute sequentially in separate ZCL write frames (requiring 5 consecutive radio round-trips and internal flash writes), it creates a noticeable bottleneck—even when the device is powered via USB-C (DC). If siren_on: ON is sent without an artificial delay (~2000 ms), the siren triggers using the previous configuration before all new parameters have finished writing.

Request

Could the Zigbee converter for the SNZB-09P group these alarm configuration attributes into a single multi-attribute ZCL write command when multiple keys are present in the same MQTT /set payload ?

Steps to reproduce

Publish a single MQTT payload to zigbee2mqtt/Entrance Siren/set:

{
  "alarm_sound_enable": "ON",
  "alarm_light_enable": "OFF",
  "alarm_volume_level": "low",
  "alarm_sound_type": "chime_doorbell",
  "alarm_duration": 2
}

Followed immediately by:

{
  "siren_on": "ON"
}
Zigbee2MQTT Logs

As shown by the last_seen timestamps below, it takes 1.55 seconds just to acknowledge the sequential configuration writes before siren_on (alarm_type: manual) is processed at 13:17:38.912:

[03/12/2026 14:17:36] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Entrance Siren', payload '{"alarm_duration":2,"alarm_light_enable":"OFF","alarm_sound_enable":"ON","alarm_sound_type":"chime_doorbell","alarm_type":"none","alarm_volume_level":"low","battery":90,"last_seen":"2026-12-03T13:17:36.818Z","linkquality":140,"power_supply_mode":"battery","siren_on":"OFF","tamper":false,"update":{"installed_version":4608,"latest_version":4608,"state":"idle"}}'
[03/12/2026 14:17:37] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Entrance Siren', payload '{"alarm_duration":2,"alarm_light_enable":"OFF","alarm_sound_enable":"ON","alarm_sound_type":"chime_doorbell","alarm_type":"none","alarm_volume_level":"low","battery":90,"last_seen":"2026-12-03T13:17:37.546Z","linkquality":140,"power_supply_mode":"battery","siren_on":"OFF","tamper":false,"update":{"installed_version":4608,"latest_version":4608,"state":"idle"}}'
[03/12/2026 14:17:37] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Entrance Siren', payload '{"alarm_duration":2,"alarm_light_enable":"OFF","alarm_sound_enable":"ON","alarm_sound_type":"chime_doorbell","alarm_type":"none","alarm_volume_level":"low","battery":90,"last_seen":"2026-12-03T13:17:37.824Z","linkquality":140,"power_supply_mode":"battery","siren_on":"OFF","tamper":false,"update":{"installed_version":4608,"latest_version":4608,"state":"idle"}}'
[03/12/2026 14:17:38] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Entrance Siren', payload '{"alarm_duration":2,"alarm_light_enable":"OFF","alarm_sound_enable":"ON","alarm_sound_type":"chime_doorbell","alarm_type":"none","alarm_volume_level":"low","battery":90,"last_seen":"2026-12-03T13:17:38.367Z","linkquality":140,"power_supply_mode":"battery","siren_on":"OFF","tamper":false,"update":{"installed_version":4608,"latest_version":4608,"state":"idle"}}'
[03/12/2026 14:17:38] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Entrance Siren', payload '{"alarm_duration":2,"alarm_light_enable":"OFF","alarm_sound_enable":"ON","alarm_sound_type":"chime_doorbell","alarm_type":"none","alarm_volume_level":"low","battery":90,"last_seen":"2026-12-03T13:17:38.367Z","linkquality":140,"power_supply_mode":"battery","siren_on":"ON","tamper":false,"update":{"installed_version":4608,"latest_version":4608,"state":"idle"}}'
[03/12/2026 14:17:38] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Entrance Siren', payload '{"alarm_duration":2,"alarm_light_enable":"OFF","alarm_sound_enable":"ON","alarm_sound_type":"chime_doorbell","alarm_type":"manual","alarm_volume_level":"low","battery":90,"last_seen":"2026-12-03T13:17:38.912Z","linkquality":140,"power_supply_mode":"battery","siren_on":"ON","tamper":false,"update":{"installed_version":4608,"latest_version":4608,"state":"idle"}}'

Thank you for your help!

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.14.4-1

Adapter firmware version

7.4.4

Adapter

SkyConnect

Setup

Add-on on Home Assistant OS

Device database.db entry

No response

Debug log

No response

Notes

No response

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.