Koenkk / Koenkk/zigbee2mqtt

Tuya mcuSyncTime timeout completely blocks Web Frontend initialization

Open
#32,766 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

problem
Dominant language
TypeScript
Stars
15.7k
Forks
2k
Avg merge
18h 55m
Merged PRs (30d)
35

Description

Similar to https://github.com/Koenkk/zigbee2mqtt/issues/25622 ?

What happened?

Zigbee2MQTT starts up normally, connects to the MQTT broker, and begins logging device states. However, the Web Frontend does not start at all and throws an ERR_CONNECTION_REFUSED when trying to access it.

Looking at the logs, there is a recurring timeout error related to a Tuya temperature/humidity sensor (ZTH05Z) during time synchronization:
Error: ZCL command 0x.../1 manuSpecificTuya.mcuSyncTime({"payloadSize":8,"payload":[...]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Timeout after 10000ms)

After manually removing this specific device from both database.db and configuration.yaml and restarting the service, the Web Frontend successfully starts up and is fully usable again. It appears that a single uncooperative device timing out during startup completely blocks the frontend initialization.

What did you expect to happen?

A timeout from a single failing or unreachable device during startup should not block the Web Frontend from initializing. The frontend should start independently so the user can use it to troubleshoot or remove the problematic device.

How to reproduce it (minimal and precise)

Have a Tuya ZTH05Z device in the network that becomes unresponsive and causes mcuSyncTime timeouts.

Start the Zigbee2MQTT service.

The logs will show the startup sequence and the timeout errors.

Try to access the Web Frontend (Port 8080) -> ERR_CONNECTION_REFUSED.

Stop Z2M, manually remove the device from database.db and configuration.yaml, and start Z2M again -> Frontend works.

Zigbee2MQTT version

2.13.0

Adapter firmware version

20250321 (ZStack3x0)

Adapter

Network attached adapter via TCP (CC2652/CC1352 based)

Setup

LXC container Proxmox

Device database.db entry

{"id":112,"type":"EndDevice","ieeeAddr":"0xa4c13840d62a0cfe","nwkAddr":16573,"manufId":4417,"manufName":"_TZE284_vvmbj46n","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0,60672],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65487":14400,"65503":"=w\u00072i>w\u00072i�y\u00072i�y\u00072i�y\u00072i�y\u00072i�y\u00072i�y\u00072i","65506":56,"65508":1,"65534":0,"appVersion":77,"modelId":"TS0601","manufacturerName":"_TZE284_vvmbj46n","powerSource":3,"zclVersion":3,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":77,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":"0.0.0"},"lastSeen":1786045812984}

Debug log

[2026-08-06 16:43:13] error: zhc:tuya: Failed to sync time with '0xa4c13840d62a0cfe' (Error: ZCL command 0xa4c13840d62a0cfe/1 manuSpecificTuya.mcuSyncTime({"payloadSize":8,"payload":[106,116,157,107,106,116,185,139]}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Timeout after 10000ms [address=3568 endpoint=1 clusterId=61184 cmdId=11 tsn=87]))

Notes

No response

Contributor guide

Open the contributing guide

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.

Research direction

Start by tracing service startup and the Web Frontend initialization path, then follow the Tuya mcuSyncTime timeout shown in the debug log. Use the ZTH05Z scenario with the device retained in database.db and configuration.yaml; done means the Web Frontend starts and remains usable even when that device times out.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.