Sleepy zigbee device disconnects after 10-12 hours randomly

Hello,

I was just wondering if someone could take a look at logs of my Home Assistant device. I have two door window ZigBee sensor and both are disconnecting randomly without any logs/errors.

From the logs, It seems like it’s trying to re-join but no response from host and it’s simply saying "[zigpy.application] Skip initialization for existing device 00:0d:6f:00:0b:d1:4a:cc"

Here is details :slight_smile:

Device info ( CEL EM357 )

MCT-340 SMA

by Visonic

Zigbee Coordinator

Firmware: 0x00000720

Below logs keep reapeating when i open/close door window sensors :slight_smile:

2021-06-11 21:18:53 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame 241 (readCounters) received: b'0500340009000b0003000000040002000b0006000a0005000300000000000000050000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000'
2021-06-11 21:18:53 DEBUG (MainThread) [bellows.zigbee.application] EZSP Counters: COUNTER_MAC_RX_BROADCAST: 5,COUNTER_MAC_TX_BROADCAST: 52,COUNTER_MAC_RX_UNICAST: 9,COUNTER_MAC_TX_UNICAST_SUCCESS: 11,COUNTER_MAC_TX_UNICAST_RETRY: 3,COUNTER_MAC_TX_UNICAST_FAILED: 0,COUNTER_APS_DATA_RX_BROADCAST: 4,COUNTER_APS_DATA_TX_BROADCAST: 2,COUNTER_APS_DATA_RX_UNICAST: 11,COUNTER_APS_DATA_TX_UNICAST_SUCCESS: 6,COUNTER_APS_DATA_TX_UNICAST_RETRY: 10,COUNTER_APS_DATA_TX_UNICAST_FAILED: 5,COUNTER_ROUTE_DISCOVERY_INITIATED: 3,COUNTER_NEIGHBOR_ADDED: 0,COUNTER_NEIGHBOR_REMOVED: 0,COUNTER_NEIGHBOR_STALE: 0,COUNTER_JOIN_INDICATION: 5,COUNTER_CHILD_REMOVED: 0,COUNTER_ASH_OVERFLOW_ERROR: 0,COUNTER_ASH_FRAMING_ERROR: 0,COUNTER_ASH_OVERRUN_ERROR: 0,COUNTER_NWK_FRAME_COUNTER_FAILURE: 0,COUNTER_APS_FRAME_COUNTER_FAILURE: 0,COUNTER_UTILITY: 0,COUNTER_APS_LINK_KEY_NOT_AUTHORIZED: 0,COUNTER_NWK_DECRYPTION_FAILURE: 0,COUNTER_APS_DECRYPTION_FAILURE: 0,COUNTER_ALLOCATE_PACKET_BUFFER_FAILURE: 0,COUNTER_RELAYED_UNICAST: 0,COUNTER_PHY_TO_MAC_QUEUE_LIMIT_REACHED: 0,COUNTER_PACKET_VALIDATE_LIBRARY_DROPPED_COUNT: 0,COUNTER_TYPE_NWK_RETRY_OVERFLOW: 0,COUNTER_PHY_CCA_FAIL_COUNT: 2,COUNTER_BROADCAST_TABLE_FULL: 0,COUNTER_PTA_LO_PRI_REQUESTED: 0,COUNTER_PTA_HI_PRI_REQUESTED: 0,COUNTER_PTA_LO_PRI_DENIED: 0,COUNTER_PTA_HI_PRI_DENIED: 0,COUNTER_PTA_LO_PRI_TX_ABORTED: 0,COUNTER_PTA_HI_PRI_TX_ABORTED: 0
2021-06-11 21:19:03 DEBUG (MainThread) [bellows.ezsp.protocol] Send command readCounters: ()
2021-06-11 21:19:03 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame 241 (readCounters) received: b'0500350009000b0003000000040002000b0006000a0005000300000000000000050000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000'
2021-06-11 21:19:03 DEBUG (MainThread) [bellows.zigbee.application] EZSP Counters: COUNTER_MAC_RX_BROADCAST: 5,COUNTER_MAC_TX_BROADCAST: 53,COUNTER_MAC_RX_UNICAST: 9,COUNTER_MAC_TX_UNICAST_SUCCESS: 11,COUNTER_MAC_TX_UNICAST_RETRY: 3,COUNTER_MAC_TX_UNICAST_FAILED: 0,COUNTER_APS_DATA_RX_BROADCAST: 4,COUNTER_APS_DATA_TX_BROADCAST: 2,COUNTER_APS_DATA_RX_UNICAST: 11,COUNTER_APS_DATA_TX_UNICAST_SUCCESS: 6,COUNTER_APS_DATA_TX_UNICAST_RETRY: 10,COUNTER_APS_DATA_TX_UNICAST_FAILED: 5,COUNTER_ROUTE_DISCOVERY_INITIATED: 3,COUNTER_NEIGHBOR_ADDED: 0,COUNTER_NEIGHBOR_REMOVED: 0,COUNTER_NEIGHBOR_STALE: 0,COUNTER_JOIN_INDICATION: 5,COUNTER_CHILD_REMOVED: 0,COUNTER_ASH_OVERFLOW_ERROR: 0,COUNTER_ASH_FRAMING_ERROR: 0,COUNTER_ASH_OVERRUN_ERROR: 0,COUNTER_NWK_FRAME_COUNTER_FAILURE: 0,COUNTER_APS_FRAME_COUNTER_FAILURE: 0,COUNTER_UTILITY: 0,COUNTER_APS_LINK_KEY_NOT_AUTHORIZED: 0,COUNTER_NWK_DECRYPTION_FAILURE: 0,COUNTER_APS_DECRYPTION_FAILURE: 0,COUNTER_ALLOCATE_PACKET_BUFFER_FAILURE: 0,COUNTER_RELAYED_UNICAST: 0,COUNTER_PHY_TO_MAC_QUEUE_LIMIT_REACHED: 0,COUNTER_PACKET_VALIDATE_LIBRARY_DROPPED_COUNT: 0,COUNTER_TYPE_NWK_RETRY_OVERFLOW: 0,COUNTER_PHY_CCA_FAIL_COUNT: 2,COUNTER_BROADCAST_TABLE_FULL: 0,COUNTER_PTA_LO_PRI_REQUESTED: 0,COUNTER_PTA_HI_PRI_REQUESTED: 0,COUNTER_PTA_LO_PRI_DENIED: 0,COUNTER_PTA_HI_PRI_DENIED: 0,COUNTER_PTA_LO_PRI_TX_ABORTED: 0,COUNTER_PTA_HI_PRI_TX_ABORTED: 0
2021-06-11 21:19:11 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame 35 (childJoinHandler) received: b'0101786bcc4ad10b006f0d0004'
2021-06-11 21:19:11 DEBUG (MainThread) [bellows.zigbee.application] Received childJoinHandler frame with [1, <Bool.true: 1>, 0x6b78, 00:0d:6f:00:0b:d1:4a:cc, <EmberNodeType.SLEEPY_END_DEVICE: 4>]
2021-06-11 21:19:11 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame 196 (changeSourceRouteHandler) received: b'786b000001'
2021-06-11 21:19:11 DEBUG (MainThread) [bellows.zigbee.application] Received changeSourceRouteHandler frame with [0x6b78, 0x0000, <Bool.true: 1>]
2021-06-11 21:19:11 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame 36 (trustCenterJoinHandler) received: b'786bcc4ad10b006f0d0003000000'
2021-06-11 21:19:11 DEBUG (MainThread) [bellows.zigbee.application] Received trustCenterJoinHandler frame with [0x6b78, 00:0d:6f:00:0b:d1:4a:cc, <EmberDeviceUpdate.STANDARD_SECURITY_UNSECURED_REJOIN: 3>, <EmberJoinDecision.USE_PRECONFIGURED_KEY: 0>, 0x0000]
2021-06-11 21:19:11 INFO (MainThread) [zigpy.application] Device 0x6b78 (00:0d:6f:00:0b:d1:4a:cc) joined the network
2021-06-11 21:19:11 DEBUG (MainThread) [zigpy.application] Skip initialization for existing device 00:0d:6f:00:0b:d1:4a:cc
2021-06-11 21:19:13 DEBUG (MainThread) [bellows.ezsp.protocol] Send command readCounters: ()

Here is full logs : Ubuntu Pastebin

Welcome!
I don’t have experience with Visonic end devices, however I have seen ‘wake up’ issues with some other end devices. A number of times this was due to the intermediate router device not doing a good job of handling the interactions between the coordinator and the battery powered end device. That said I tried some Aqara battery end devices directly connected to my coordinator and they disappeared randomly, I totally gave up on Aqara devices. As an example of a router device that would cause a battery powered end device to disappear, I have a LEDVANCE wall plug that would drop a Ikea battery powered on/off switch randomly. When I removed this end devices from ZHA and readded it ‘via’ a CentraLite wall switch, it works with any drop offs for many months now. To complicate, I have a Ikea battery powered motion sensor end device that was ‘added’ via the LEDVANCE wall plug and it operates without issues being routed back to the coordinator via the LEDVANCE plug, go figure! Good hunting!