Zigbee max_message_limit_reached

Hi All,

I have a home assistent yellow however rebooting home assistent often gets the ZHA in an error state, rebooting a few times helps. But the network is slow (1 to 5 seconds to turn a light on)…

Home Assistant Yellow
Core
2024.11.2
Supervisor
2024.11.4
Operating System
13.2
Frontend
20241106.2

However, i wanted to add some more lights but they od not show up when in pairing mode.

So I started investigating a bit more, in the logs i see the following:


2024-11-27 10:16:10.566 DEBUG (MainThread) [homeassistant.components.zha] Failed to set up ZHA
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 151, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/local/lib/python3.12/site-packages/zha/application/gateway.py", line 275, in async_initialize
    await self._async_initialize()
  File "/usr/local/lib/python3.12/site-packages/zha/application/gateway.py", line 258, in _async_initialize
    await self.application_controller.startup(auto_form=True)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 220, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 182, in initialize
    await self.permit(0)
  File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 831, in permit
    await super().permit(time_s, node)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 1243, in permit
    await zigpy.zdo.broadcast(
  File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 741, in broadcast
    return await app.broadcast(
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 917, in broadcast
    await self.send_packet(
  File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 805, in send_packet
    raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to enqueue message after 3 attempts: <sl_Status.ZIGBEE_MAX_MESSAGE_LIMIT_REACHED: 3075>

I looked into the channels:


    "energy_scan": {
      "11": 62.257682586134884,
      "12": 68.14622793558128,
      "13": 68.14622793558128,
      "14": 65.26028270288712,
      "15": 95.12234809209261,
      "16": 97.04162534718327,
      "17": 97.97769123383605,
      "18": 68.14622793558128,
      "19": 80.38447947821754,
      "20": 59.15797905332195,
      "21": 33.860880820104335,
      "22": 39.90320178295578,
      "23": 62.257682586134884,
      "24": 7.659755505061292,
      "25": 6.011489450827149,
      "26": 95.12234809209261
    },

So i was on channel 15, quite bad indeed. So i changed to channel 20.
Initially I thought things where better. However I still get the same error above. Almost every time I reboot the device. 1 out of 5 times it works and the network is up.

However adding a zigbee lightbulb does not work.
I wanted to attach the startup logs but there does not seem to be a file upload here.

Just before the error i saw a lot of these messages:

2024-11-27 10:31:05.179 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=0, re_tx=False, ack_num=2, ezsp_frame=b'G\x00\x01c\x00\x03') + FLAG
2024-11-27 10:31:05.180 DEBUG (bellows.thread_0) [bellows.ash] Sending data  020521a9372a16b2277e
2024-11-27 10:31:05.186 DEBUG (bellows.thread_0) [bellows.ash] Received data 2105a1a9372a15b2599406f47e
2024-11-27 10:31:05.186 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=2, re_tx=0, ack_num=1, ezsp_frame=b'G\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.186 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=3) + FLAG
2024-11-27 10:31:05.187 DEBUG (bellows.thread_0) [bellows.ash] Sending data  83401b7e
2024-11-27 10:31:05.187 DEBUG (Thread-8) [aiosqlite] executing functools.partial(<built-in method executemany of sqlite3.Connection object at 0x7f74cf9120>, 'INSERT INTO unsupported_attributes_v13 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster_type, cluster_id, attr_id)\n                    DO NOTHING', [])
2024-11-27 10:31:05.187 DEBUG (Thread-8) [aiosqlite] operation functools.partial(<built-in method executemany of sqlite3.Connection object at 0x7f74cf9120>, 'INSERT INTO unsupported_attributes_v13 VALUES (?, ?, ?, ?, ?)\n                    ON CONFLICT (ieee, endpoint_id, cluster_type, cluster_id, attr_id)\n                    DO NOTHING', []) completed
2024-11-27 10:31:05.190 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.193 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[3] = EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)
2024-11-27 10:31:05.193 DEBUG (MainThread) [bellows.ezsp.protocol] Sending command  getMulticastTableEntry: (4,) {}
2024-11-27 10:31:05.194 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=1, re_tx=False, ack_num=3, ezsp_frame=b'H\x00\x01c\x00\x04') + FLAG
2024-11-27 10:31:05.194 DEBUG (bellows.thread_0) [bellows.ash] Sending data  7d330a21a9372a7d3188d97e
2024-11-27 10:31:05.196 DEBUG (Thread-8) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f74cf9120>)
2024-11-27 10:31:05.203 DEBUG (Thread-8) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f74cf9120>) completed
2024-11-27 10:31:05.203 DEBUG (bellows.thread_0) [bellows.ash] Received data 320aa1a9372a15b25994bbf97e
2024-11-27 10:31:05.204 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=3, re_tx=0, ack_num=2, ezsp_frame=b'H\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.204 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=4) + FLAG
2024-11-27 10:31:05.204 DEBUG (bellows.thread_0) [bellows.ash] Sending data  8430fc7e
2024-11-27 10:31:05.206 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.207 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[4] = EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)
2024-11-27 10:31:05.208 DEBUG (MainThread) [bellows.ezsp.protocol] Sending command  getMulticastTableEntry: (5,) {}
2024-11-27 10:31:05.210 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=2, re_tx=False, ack_num=4, ezsp_frame=b'I\x00\x01c\x00\x05') + FLAG
2024-11-27 10:31:05.210 DEBUG (bellows.thread_0) [bellows.ash] Sending data  240b21a9372a109d917e
2024-11-27 10:31:05.217 DEBUG (bellows.thread_0) [bellows.ash] Received data 430ba1a9372a15b25994e01e7e
2024-11-27 10:31:05.217 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=4, re_tx=0, ack_num=3, ezsp_frame=b'I\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.218 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=5) + FLAG
2024-11-27 10:31:05.218 DEBUG (bellows.thread_0) [bellows.ash] Sending data  8520dd7e
2024-11-27 10:31:05.222 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.224 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[5] = EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)
2024-11-27 10:31:05.224 DEBUG (MainThread) [bellows.ezsp.protocol] Sending command  getMulticastTableEntry: (6,) {}
2024-11-27 10:31:05.228 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=3, re_tx=False, ack_num=5, ezsp_frame=b'J\x00\x01c\x00\x06') + FLAG
2024-11-27 10:31:05.228 DEBUG (bellows.thread_0) [bellows.ash] Sending data  350821a9372a7d33ec087e
2024-11-27 10:31:05.236 DEBUG (bellows.thread_0) [bellows.ash] Received data 5408a1a9372a15b2599445367e
2024-11-27 10:31:05.236 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=5, re_tx=0, ack_num=4, ezsp_frame=b'J\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.236 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=6) + FLAG
2024-11-27 10:31:05.236 DEBUG (bellows.thread_0) [bellows.ash] Sending data  8610be7e
2024-11-27 10:31:05.238 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.241 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[6] = EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)
2024-11-27 10:31:05.241 DEBUG (MainThread) [bellows.ezsp.protocol] Sending command  getMulticastTableEntry: (7,) {}
2024-11-27 10:31:05.242 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=4, re_tx=False, ack_num=6, ezsp_frame=b'K\x00\x01c\x00\x07') + FLAG
2024-11-27 10:31:05.242 DEBUG (bellows.thread_0) [bellows.ash] Sending data  460921a9372a12e56a7e
2024-11-27 10:31:05.245 DEBUG (bellows.thread_0) [bellows.ash] Received data 6408b1a96b2a7d334fa6944a25aa559249984e27e012ce67c6017e
2024-11-27 10:31:05.245 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=6, re_tx=0, ack_num=4, ezsp_frame=b'J\x90\x01?\x00\x06\xfd\xff\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00K\xff\x00\x00')
2024-11-27 10:31:05.246 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=7) + FLAG
2024-11-27 10:31:05.246 DEBUG (bellows.thread_0) [bellows.ash] Sending data  87009f7e
2024-11-27 10:31:05.249 DEBUG (MainThread) [bellows.ezsp.protocol] Received command messageSentHandler: {'type': <EmberOutgoingMessageType.OUTGOING_BROADCAST: 6>, 'indexOrDestination': 65533, 'apsFrame': EmberApsFrame(profileId=0, clusterId=0, sourceEndpoint=0, destinationEndpoint=0, options=<EmberApsOption.APS_OPTION_SOURCE_EUI64: 1024>, groupId=0, sequence=75), 'messageTag': 255, 'status': <EmberStatus.SUCCESS: 0>, 'messageContents': b''}
2024-11-27 10:31:05.249 DEBUG (MainThread) [bellows.zigbee.application] Received messageSentHandler frame with [<EmberOutgoingMessageType.OUTGOING_BROADCAST: 6>, 65533, EmberApsFrame(profileId=0, clusterId=0, sourceEndpoint=0, destinationEndpoint=0, options=<EmberApsOption.APS_OPTION_SOURCE_EUI64: 1024>, groupId=0, sequence=75), 255, <EmberStatus.SUCCESS: 0>, b'']
2024-11-27 10:31:05.249 DEBUG (MainThread) [bellows.zigbee.application] Unexpected message send notification tag: (65533, 255)
2024-11-27 10:31:05.254 DEBUG (bellows.thread_0) [bellows.ash] Received data 7509a1a9372a15b25994f85d7e
2024-11-27 10:31:05.254 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=7, re_tx=0, ack_num=5, ezsp_frame=b'K\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.254 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=0) + FLAG
2024-11-27 10:31:05.254 DEBUG (bellows.thread_0) [bellows.ash] Sending data  8070787e
2024-11-27 10:31:05.258 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.260 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[7] = EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)
2024-11-27 10:31:05.260 DEBUG (MainThread) [bellows.ezsp.protocol] Sending command  getMulticastTableEntry: (8,) {}
2024-11-27 10:31:05.263 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=5, re_tx=False, ack_num=0, ezsp_frame=b'L\x00\x01c\x00\x08') + FLAG
2024-11-27 10:31:05.263 DEBUG (bellows.thread_0) [bellows.ash] Sending data  500e21a9372a1d4a9a7e
2024-11-27 10:31:05.270 DEBUG (bellows.thread_0) [bellows.ash] Received data 060ea1a9372a15b2599427b87e
2024-11-27 10:31:05.270 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=0, re_tx=0, ack_num=6, ezsp_frame=b'L\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.270 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=1) + FLAG
2024-11-27 10:31:05.270 DEBUG (bellows.thread_0) [bellows.ash] Sending data  8160597e
2024-11-27 10:31:05.272 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.277 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[8] = EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)
2024-11-27 10:31:05.277 DEBUG (MainThread) [bellows.ezsp.protocol] Sending command  getMulticastTableEntry: (9,) {}
2024-11-27 10:31:05.279 DEBUG (bellows.thread_0) [bellows.ash] Sending frame DataFrame(frm_num=6, re_tx=False, ack_num=1, ezsp_frame=b'M\x00\x01c\x00\t') + FLAG
2024-11-27 10:31:05.280 DEBUG (bellows.thread_0) [bellows.ash] Sending data  610f21a9372a1cfef77e
2024-11-27 10:31:05.286 DEBUG (bellows.thread_0) [bellows.ash] Received data 170fa1a9372a15b2599437487e
2024-11-27 10:31:05.287 DEBUG (bellows.thread_0) [bellows.ash] Received frame DataFrame(frm_num=1, re_tx=0, ack_num=7, ezsp_frame=b'M\x80\x01c\x00\x00\x00\x00\x00')
2024-11-27 10:31:05.287 DEBUG (bellows.thread_0) [bellows.ash] Sending frame AckFrame(res=0, ncp_ready=0, ack_num=2) + FLAG
2024-11-27 10:31:05.287 DEBUG (bellows.thread_0) [bellows.ash] Sending data  82503a7e
2024-11-27 10:31:05.288 DEBUG (MainThread) [bellows.ezsp.protocol] Received command getMulticastTableEntry: {'status': <EmberStatus.SUCCESS: 0>, 'value': EmberMulticastTableEntry(multicastId=0x0000, endpoint=0, networkIndex=None)}
2024-11-27 10:31:05.290 DEBUG (MainThread) [bellows.multicast] MulticastTableEntry[9] = EmberMulticastTableEntry(multica
1 Like

This problem has been plaguing ZHA from the early days. It is a shame that such issues do not receive more attention from the people that maintain the integration.

2 Likes