zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Sonoff Dongle-PP10 (CC2674P10, Z-Stack): TCLK_TABLE has only 41 entries, new/re-joining devices beyond that are removed ~20 s after joining (leaveInd)

Open bembissss opened this issue 2 weeks ago • 5 comments

What happened?

Environment

  • Zigbee2MQTT 2.14.3 (Docker), zigbee-herdsman 11.2.0
  • Adapter: Sonoff Dongle Plus CC2674P10 (Dongle-PP10), Z-Stack coordinator firmware 20250321, adapter: zstack, baudrate 115200
  • 46 devices in Z2M (Tuya, Aqara, frient/Develco, bulbs, mains plugs)

Problem When the coordinator holds about 41 device entries, every further device that tries to join (or re-join) is accepted, starts or fails the interview, and is then removed by the coordinator ~20 s later:

zh:zstack:znp: <-- AREQ: ZDO - leaveInd
zh:controller: Removing device from database '0x...'
... device_leave

The device then re-joins and the cycle repeats. Other attempts end with Interview failed ... simpleDescRsp after 10000ms. Signal is fine (linkquality 247 on one of the failing devices).

What I tried and found

  1. Re-created the network (new channel, PAN ID, ext PAN ID, network key) and re-paired everything. About 41 devices were fine, the rest kept failing.
  2. Six devices whose IEEE addresses the dongle had never seen before joined without problems, so it is not tied to specific devices or brands.
  3. Comparing coordinator_backup.json with Z2M's database showed 5 stale entries (devices no longer in Z2M). I removed them from the backup, wiped NVRAM with python -m zigpy_znp.tools.nvram_reset /dev/ttyUSB0, and let Z2M restore the network from the edited backup. A previously failing smoke detector (frient SMSZB-120) then joined and stayed.
  4. I removed 4 mains plug entries from the backup and repeated the same steps. Two more previously failing battery devices (a button and a temperature sensor) then joined and stayed, until the table was about full again, after which the next two devices failed again.
  5. The 4 mains plugs whose entries I removed from the backup keep working normally (they can be switched on/off and report power) even though they have no entry after the restore. So the limit is on TCLK table entries, not on the total number of devices in Z2M's database.
  6. The nvram_reset output shows the table sizes of this firmware:
    • TCLK_TABLE[0x0000] ... [0x0028] = 41 entries
    • ADDRMGR[0x0000] ... [0x0046] = 71
    • DEVICE_LIST[0x0000] ... [0x0015] = 22
    • APS_KEY_DATA_TABLE = 4, NWK_SEC_MATERIAL_TABLE = 6

The number of devices that can stay stops at about the number of TCLK_TABLE slots. I cannot prove from the outside that this table is the cause, but the 41-entry table, the timing, and the fact that freeing entries immediately lets new devices stay all point to it.

Related

  • #33560 (same symptom, leave ~21 s after join, on an Ember adapter)
  • TI E2E threads on CC2652/CC2674 mention a default Trust Center device table of about 40 devices, and that stale entries are not freed.

Questions

  1. Is a 41-entry TCLK_TABLE intended for the CC2674P10 coordinator firmware? As far as I can tell, the Z-Stack firmware README mentions up to 200 devices for the CC2652 builds, and the Sonoff product page advertises "increased device capacity" for the PP10.
  2. Can the table sizes (e.g. ZDSECMGR_TC_DEVICE_MAX and the related NV settings) be raised in the PP10 build?
  3. Could herdsman log a clear message when the TCLK table is full, instead of the device silently being removed after ~20 s? It took me days to find the cause.

I can provide full debug logs of the join/leave cycles if useful.

What did you expect to happen?

Expected behavior: devices stay joined beyond 41 entries, or at least the coordinator/Z2M logs a clear error when the TCLK table is full, instead of the device being removed ~20 s after joining.

To reproduce: with a Z-Stack coordinator whose TCLK table is full (about 41 entries on the PP10), pair another device. It joins, starts the interview, and ~20 s later leaveInd removes it; it then re-joins and the cycle repeats.

Log timestamps in the attached file are local time (UTC+2).

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.14.3 (zigbee-herdsman 11.2.0)

Adapter firmware version

20250321

Adapter

Sonoff Dongle Plus CC2674P10 (Dongle-PP10), Z-Stack (adapter: zstack, baudrate 115200)

Setup

Zigbee2MQTT in Docker (docker compose), on a Linux VM (hypervisor: ), USB dongle passed through to the VM as /dev/ttyUSB0. Home Assistant is a separate integration over MQTT. Linux z2m-test 6.12.116+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.116-1 (2026-11-07) x86_64 GNU/Linux Debian GNU/Linux 13

Device database.db entry

Not device-specific. The problem affects several different devices (Tuya, Aqara, frient) once the coordinator holds ~41 device entries, so no single device entry is relevant. The relevant data (join/leave logs and the nvram_reset table sizes) is in the description.

Debug log

z2m_pp10_join_leave_log.txt

Notes

Workaround that confirms the cause: edit coordinator_backup.json to remove entries, run python -m zigpy_znp.tools.nvram_reset /dev/ttyUSB0, start Z2M so it restores the network from the edited backup. Devices that previously failed (leaveInd ~20 s after join) then join and stay, until the coordinator holds about 41 device entries again. Four mains plugs whose entries I removed from the backup keep working normally, so the limit is on TCLK_TABLE entries (41 slots, listed by nvram_reset), not on the total number of devices in Z2M's database (46 here).

Logs of the failing joins are attached (Rubines temp sensor 0xa4c1380af87bffff, joins at 16:42:28 and 16:43:08, leaveInd at 16:42:49 and 16:43:30). A smoke detector that joined after the NVRAM reset stays connected, so the problem is not specific to a device model or brand.

Related: #33560. I also plan to contact Sonoff, since the product page advertises "increased device capacity".

bembissss avatar Nov 21 '26 15:11 bembissss

Please use the flashing tool to update your PP10 firmware again. The PP10 firmware available on the Web Flasher has been updated.

HiconKong avatar Nov 23 '26 09:11 HiconKong

Please use the flashing tool to update your PP10 firmware again. The PP10 firmware available on the Web Flasher has been updated.

The Web Flasher for PP10 still shows only Zigbee NCP 20250321, which I already have. Which exact version is the new one, or can you send the firmware file / direct link?

bembissss avatar Nov 23 '26 09:11 bembissss

You can simply replace the existing firmware. The version number has not changed.

HiconKong avatar Nov 23 '26 09:11 HiconKong

Thanks, i will try it and update.

bembissss avatar Nov 23 '26 09:11 bembissss

Update: this seems to be resolved by re-flashing the dongle.

After re-flashing the same version (Zigbee NCP 20250321, 115200) with the updated file, the devices that previously joined and were removed after ~20 seconds (including a temperature/humidity sensor that kept failing) now join and stay in the network. I'm now running ~47 devices without devices being dropped.

So it looks like the problem was in the firmware file and not in Z2M or my setup. If anyone has the same symptoms with a Sonoff Dongle-PP10, try re-flashing the NCP firmware from the Web Flasher again.

I will keep monitoring for a few days and report back if the problem returns. Thanks to everyone who helped, and to Sonoff support.

bembissss avatar Nov 23 '26 12:11 bembissss