Koenkk / zigbee2mqtt

Zigbee ๐Ÿ to MQTT bridge ๐ŸŒ‰, get rid of your proprietary Zigbee bridges ๐Ÿ”จ
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.77k stars 1.64k forks source link

Devices leaving network shortly after pairing #14568

Closed mateuszkozakiewicz closed 1 year ago

mateuszkozakiewicz commented 1 year ago

What happened?

My IKEA devices are leaving the network shortly after pairing, the devices are supported: https://www.zigbee2mqtt.io/devices/E2001_E2002.html - have 2 buttons, one has the problem, the other works https://www.zigbee2mqtt.io/devices/LED1545G12.html - have 4 bulbs, 2 have the problem, others work

What did you expect to happen?

After pairing device stays paired.

How to reproduce it (minimal and precise)

Tested on Zigbee2MQTT 1.27.2, 1.28.0, latest-dev

Pairing is enabled on nearest router Device enters pairing mode Pairing is successful, device is fully functional After 10 seconds device leaves the network with message "Device xxx left the network"

Zigbee2MQTT version

1.28.0

Adapter firmware version

6.7.10.0 build 423

Adapter

Xiaomi Gateway 3

Debug log

Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:41: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:41: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:41: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:41: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:41: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:41: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x84ba20fffed6f94e' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:40: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:40: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:39: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:39: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:39: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:39: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:39: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:39: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:39: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"left_network","meta":{"friendly_name":"0x003c84fffe0f0d4a"},"type":"device_removed"}'
Zigbee2MQTT:info  2022-10-20 19:27:39: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a"},"type":"device_leave"}'
Zigbee2MQTT:warn  2022-10-20 19:27:39: Device '0x003c84fffe0f0d4a' left the network
Zigbee2MQTT:info  2022-10-20 19:27:28: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Update available for '0x84ba20fffed6f94e'","meta":{"device":"0x84ba20fffed6f94e","status":"available"},"type":"ota_update"}'
Zigbee2MQTT:info  2022-10-20 19:27:28: Update available for '0x84ba20fffed6f94e'
Zigbee2MQTT:info  2022-10-20 19:27:28: MQTT publish: topic 'zigbee2mqtt/0x84ba20fffed6f94e', payload '{"color_mode":"xy","linkquality":152,"power_on_behavior":null,"state":null,"update":{"state":"available"},"update_available":true}'
Zigbee2MQTT:debug 2022-10-20 19:27:28: Update available for '0x84ba20fffed6f94e': YES
Zigbee2MQTT:debug 2022-10-20 19:27:28: Is new image available for '0x84ba20fffed6f94e', current '{"fieldControl":1,"manufacturerCode":4476,"imageType":8708,"fileVersion":65586}', latest meta '{"fileVersion":69635,"url":"http://fw.ota.homesmart.ikea.net/global/GW1.0/01.19.032/bin/10080506-zingo_kt_bulb_hwpwmcs_ws-1.1.003.ota.ota.signed"}'
Zigbee2MQTT:debug 2022-10-20 19:27:27: Check if update available for '0x84ba20fffed6f94e' (TRADFRIbulbE14WScandleopal470lm)
Zigbee2MQTT:debug 2022-10-20 19:27:27: Device '0x84ba20fffed6f94e' requested OTA
Zigbee2MQTT:debug 2022-10-20 19:27:27: Received Zigbee message from '0x84ba20fffed6f94e', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":1,"fileVersion":65586,"imageType":8708,"manufacturerCode":4476}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:25: MQTT publish: topic 'zigbee2mqtt/0x84ba20fffed6f94e', payload '{"color_mode":"xy","linkquality":152,"power_on_behavior":null,"state":null,"update":{"state":null},"update_available":null}'
Zigbee2MQTT:debug 2022-10-20 19:27:25: Received Zigbee message from '0x84ba20fffed6f94e', type 'readResponse', cluster 'lightingColorCtrl', data '{"colorCapabilities":16}' from endpoint 1 with groupID 0
Zigbee2MQTT:warn  2022-10-20 19:27:25: Please see: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
Zigbee2MQTT:warn  2022-10-20 19:27:25: Received message from unsupported device with Zigbee model 'undefined' and manufacturer name 'undefined'
Zigbee2MQTT:debug 2022-10-20 19:27:25: Received Zigbee message from '0x003c84fffe0f0d4a', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"1.0.032"}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:24: MQTT publish: topic 'zigbee2mqtt/0x84ba20fffed6f94e', payload '{"color_mode":"xy","linkquality":152,"power_on_behavior":null,"state":null,"update":{"state":null},"update_available":null}'
Zigbee2MQTT:debug 2022-10-20 19:27:24: Received Zigbee message from '0x84ba20fffed6f94e', type 'readResponse', cluster 'lightingColorCtrl', data '{"colorCapabilities":16}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:24: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"friendly_name":"0x003c84fffe0f0d4a","supported":false},"type":"pairing"}'
Zigbee2MQTT:info  2022-10-20 19:27:24: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":null,"friendly_name":"0x003c84fffe0f0d4a","ieee_address":"0x003c84fffe0f0d4a","status":"successful","supported":false},"type":"device_interview"}'
Zigbee2MQTT:warn  2022-10-20 19:27:24: Device '0x003c84fffe0f0d4a' with Zigbee model 'undefined' and manufacturer name 'undefined' is NOT supported, please follow https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html
Zigbee2MQTT:info  2022-10-20 19:27:24: Successfully interviewed '0x003c84fffe0f0d4a', device has successfully been paired
Zigbee2MQTT:debug 2022-10-20 19:27:23: Skipping message, definition is undefined and still interviewing
Zigbee2MQTT:debug 2022-10-20 19:27:23: Received Zigbee message from '0x003c84fffe0f0d4a', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"1.0.032"}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:22: Successfully configured '0x84ba20fffed6f94e'
Zigbee2MQTT:info  2022-10-20 19:27:22: MQTT publish: topic 'zigbee2mqtt/0x84ba20fffed6f94e', payload '{"color_mode":"xy","linkquality":152,"power_on_behavior":null,"state":null,"update":{"state":null},"update_available":null}'
Zigbee2MQTT:debug 2022-10-20 19:27:22: Received Zigbee message from '0x84ba20fffed6f94e', type 'readResponse', cluster 'lightingColorCtrl', data '{"colorTempPhysicalMax":454,"colorTempPhysicalMin":250}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:22: MQTT publish: topic 'zigbee2mqtt/0x84ba20fffed6f94e', payload '{"color_mode":"xy","linkquality":152,"power_on_behavior":null,"state":null,"update":{"state":null},"update_available":null}'
Zigbee2MQTT:debug 2022-10-20 19:27:22: Missing colorTempPhysicalMin and/or colorTempPhysicalMax for endpoint 0x84ba20fffed6f94e!
Zigbee2MQTT:debug 2022-10-20 19:27:22: Received Zigbee message from '0x84ba20fffed6f94e', type 'readResponse', cluster 'lightingColorCtrl', data '{"colorCapabilities":16}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:22: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"TRADFRI LED bulb E12/E14 450/470 lumen, wireless dimmable white spectrum/chandelier opal white","friendly_name":"0x84ba20fffed6f94e","model":"LED1949C5","supported":true,"vendor":"IKEA"},"type":"pairing"}'
Zigbee2MQTT:info  2022-10-20 19:27:22: Configuring '0x84ba20fffed6f94e'
Zigbee2MQTT:info  2022-10-20 19:27:22: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"TRADFRI LED bulb E12/E14 450/470 lumen, wireless dimmable white spectrum/chandelier opal white","exposes":[{"features":[{"access":7,"description":"On/off state of this light","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0},{"access":7,"description":"Color temperature of this light","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":250},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454}],"property":"color_temp","type":"numeric","unit":"mired","value_max":454,"value_min":250},{"access":7,"description":"Color temperature after cold power on of this light","name":"color_temp_startup","presets":[{"description":"Coolest temperature supported","name":"coolest","value":250},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454},{"description":"Restore previous color_temp on cold power on","name":"previous","value":65535}],"property":"color_temp_startup","type":"numeric","unit":"mired","value_max":454,"value_min":250}],"type":"light"},{"access":2,"description":"Triggers an effect on the light (e.g. make light blink for a few seconds)","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","finish_effect","stop_effect"]},{"access":7,"description":"Controls the behavior when the device is powered on","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","previous","on"]},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"LED1949C5","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"IKEA"},"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e","status":"successful","supported":true},"type":"device_interview"}'
Zigbee2MQTT:info  2022-10-20 19:27:22: Device '0x84ba20fffed6f94e' is supported, identified as: IKEA TRADFRI LED bulb E12/E14 450/470 lumen, wireless dimmable white spectrum/chandelier opal white (LED1949C5)
Zigbee2MQTT:info  2022-10-20 19:27:22: Successfully interviewed '0x84ba20fffed6f94e', device has successfully been paired
Zigbee2MQTT:debug 2022-10-20 19:27:22: Skipping message, definition is undefined and still interviewing
Zigbee2MQTT:debug 2022-10-20 19:27:22: Received Zigbee message from '0x003c84fffe0f0d4a', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"1.0.032"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2022-10-20 19:27:22: Skipping message, definition is undefined and still interviewing
Zigbee2MQTT:debug 2022-10-20 19:27:22: Received Zigbee message from '0x003c84fffe0f0d4a', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20201009"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2022-10-20 19:27:21: Skipping message, definition is undefined and still interviewing
Zigbee2MQTT:debug 2022-10-20 19:27:21: Received Zigbee message from '0x003c84fffe0f0d4a', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2022-10-20 19:27:21: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0x84ba20fffed6f94e"},"type":"pairing"}'
Zigbee2MQTT:info  2022-10-20 19:27:21: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e","status":"started"},"type":"device_interview"}'
Zigbee2MQTT:info  2022-10-20 19:27:21: Starting interview of '0x84ba20fffed6f94e'
Zigbee2MQTT:info  2022-10-20 19:27:21: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0x84ba20fffed6f94e"},"type":"device_connected"}'
Zigbee2MQTT:info  2022-10-20 19:27:21: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x84ba20fffed6f94e","ieee_address":"0x84ba20fffed6f94e"},"type":"device_joined"}'
Zigbee2MQTT:info  2022-10-20 19:27:21: Device '0x84ba20fffed6f94e' joined
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

horni2 commented 1 year ago

Hi, was there any solution? I have the same issue, but not (only) for IKEA products. Tried already to pair TUYA and HUE...

mateuszkozakiewicz commented 1 year ago

Hi, was there any solution? I have the same issue, but not (only) for IKEA products. Tried already to pair TUYA and HUE...

Mostly restarting zigbee2mqtt helps, but it is very random, sometimes I will try to pair a device couple days later and it suddenly works. In general there seems to be no pattern to this issue. Out of curiosity what is your coordinator?

horni2 commented 1 year ago

Iยดm using a Sonoff plugged in a nuc

Greenshot 2023-01-27 10 39 58

(the new version). Tried already to restart Z2M and (in my case) Homeassistant. I also turned off the HUE bridge and our guest wifi. But nothing is an advantage.

Greenshot 2023-01-27 10 40 30

What I recognized is that it doesn't matter to which rout I'm trying to pair. But when trying to pair with automatic detection the devices aren't found at all... I also wonder because all the rest of the network is stable...

horni2 commented 1 year ago

Sorry for the layout above there went something wrong...

mateuszkozakiewicz commented 1 year ago

There doesn't seem to be any indication in the logs as to the root cause so my general approach to this error is to try a few image tags behind, and latest-dev. In general I found 1.27.2 to be the most stable however it lacks support for some of my devices. I also tried rebooting/reflashing my coordinator, turning off wifi in my house, pairing with different router device, pairing directly to the coordinator but the most reliable solution is to simply restart z2m and hope it works this time. It might be my coordinator but the whole zigbee network is generally very unstable for me, I have to restart z2m container almost on a daily basis because it stops receiving messages even though the mqtt broker on the coordinator is working fine.

horni2 commented 1 year ago

OK, thanks. Then I continue to search :)

zuzannaruzylo commented 1 year ago

Sorry, I don't know how to help you. BR

Kaptensanders commented 1 year ago

Same problem for all my Aqara Motion P1's --> Sonoff Dongle-E Router --> Sonoff Dongle-E Coordinator --> Z2M

-->device_joined -->Configuring --> Successfully configured 10s pass -->device_leave

I'm playing with the idea that messages are processed or reaches the the coordinator or Z2M in the wrong order. For other Aqara devices, when re-pairing (eg long-press reset), there is an initial device_leave instruction followed by device_joined, and the interview...

This started happening after adding the Sonoff Dongle-E Routers. Before, when pairing directly with the coordinator (also Sonoff Dongle-E), there was no issues.

kirovilya commented 1 year ago

@mateuszkozakiewicz @Kaptensanders please check on the latest dev/edge version of z2m, I made some changes for ezsp adapter

mateuszkozakiewicz commented 1 year ago

@kirovilya 1.30.1-dev seems to have helped, however there is small regression compared to 1.30.1, I am unable to put some of my devices into pairing mode with this error:

error 2023-02-13 18:20:29Request 'zigbee2mqtt/bridge/request/permit_join' failed with error: 'ZdoRequest error'
debug 2023-02-13 18:20:29Error: ZdoRequest error at Driver.zdoRequest (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:572:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.func (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:240:32) at Queue.executeNext (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:32:32)
info 2023-02-13 18:20:29MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{},"error":"ZdoRequest error","status":"error","transaction":"xrl3q-2"}'
kirovilya commented 1 year ago

@mateuszkozakiewicz can you record herdsman log of your error?

mateuszkozakiewicz commented 1 year ago

@kirovilya

2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (7) success
2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x5: {"_id_":5,"_cls_":"nop","_isRequest_":false}
2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 5680010500
2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:uart --> [8520dd7e]
2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:uart --> ACK  (5)
2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (4,7,0): 4714a1a9512a26747e
2023-02-13T17:30:43.785Z zigbee-herdsman:adapter:ezsp:uart <-- [7e]
2023-02-13T17:30:43.784Z zigbee-herdsman:adapter:ezsp:uart <-- [4714a1a9512a2674]
2023-02-13T17:30:43.773Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (7)
2023-02-13T17:30:43.772Z zigbee-herdsman:adapter:ezsp:uart --> [641421a9512a00a47e]
2023-02-13T17:30:43.772Z zigbee-herdsman:adapter:ezsp:uart --> DATA (6,4,0): 5600010500
2023-02-13T17:30:43.772Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"_cls_":"nop","_id_":5,"_isRequest_":true}
2023-02-13T17:30:43.772Z zigbee-herdsman:adapter:ezsp:ezsp ==> nop: null
2023-02-13T17:30:43.772Z zigbee-herdsman:adapter:ezsp:ezsp Time to watchdog ... 0
2023-02-13T17:30:42.885Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (6) success
2023-02-13T17:30:42.885Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x55: {"_id_":85,"_cls_":"setPolicy","_isRequest_":false,"status":0}
2023-02-13T17:30:42.885Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 558001550000
2023-02-13T17:30:42.885Z zigbee-herdsman:adapter:ezsp:uart --> [8430fc7e]
2023-02-13T17:30:42.885Z zigbee-herdsman:adapter:ezsp:uart --> ACK  (4)
2023-02-13T17:30:42.885Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (3,6,0): 3617a1a9012a15de1e7e
2023-02-13T17:30:42.884Z zigbee-herdsman:adapter:ezsp:uart <-- [1e7e]
2023-02-13T17:30:42.877Z zigbee-herdsman:adapter:ezsp:uart <-- [3617a1a9012a15de]
Zigbee2MQTT:info  2023-02-13 18:30:42: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{},"error":"ZdoRequest error","status":"error","transaction":"hzc8e-5"}'
    at Queue.executeNext (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:32:32)
    at Object.func (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:240:32)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Driver.zdoRequest (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:572:19)
Zigbee2MQTT:debug 2023-02-13 18:30:42: Error: ZdoRequest error
Zigbee2MQTT:error 2023-02-13 18:30:42: Request 'zigbee2mqtt/bridge/request/permit_join' failed with error: 'ZdoRequest error'
2023-02-13T17:30:42.858Z zigbee-herdsman:adapter:ezsp:erro zdoRequest error
    at Queue.executeNext (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:32:32)
    at Object.func (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:240:32)
    at Driver.zdoRequest (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:568:21)
    at Driver.request (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:465:25)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Driver.networkIdToEUI64 (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:602:19)
2023-02-13T17:30:42.858Z zigbee-herdsman:adapter:ezsp:erro Request error Error: Unrecognized nodeId:52627: Error: Unrecognized nodeId:52627
2023-02-13T17:30:42.855Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (6)
2023-02-13T17:30:42.855Z zigbee-herdsman:adapter:ezsp:uart --> [531721a9012a15b15907277e]
2023-02-13T17:30:42.855Z zigbee-herdsman:adapter:ezsp:uart --> DATA (5,3,0): 5500015500000300
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"_cls_":"setPolicy","_id_":85,"_isRequest_":true,"policyId":0,"decisionId":3}
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (5) success
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x61: {"_id_":97,"_cls_":"lookupEui64ByNodeId","_isRequest_":false,"status":1,"eui64":{"type":"Buffer","data":[0,3,1,35,1,1,0,0]}}
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 5480016100010000010123010300
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:uart --> [83401b7e]
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:uart --> ACK  (3)
2023-02-13T17:30:42.854Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (2,5,0): 2516a1a9352a14b259954b06ab5692d66e7e
2023-02-13T17:30:42.853Z zigbee-herdsman:adapter:ezsp:uart <-- [59954b06ab5692d66e7e]
2023-02-13T17:30:42.849Z zigbee-herdsman:adapter:ezsp:uart <-- [2516a1a9352a14b2]
2023-02-13T17:30:42.829Z zigbee-herdsman:adapter:ezsp:ezsp ==> setPolicy: {"policyId":0,"decisionId":3}
2023-02-13T17:30:42.829Z zigbee-herdsman:adapter:ezsp:ezsp Set EzspPolicyId.TRUST_CENTER_POLICY = 3
2023-02-13T17:30:42.829Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (5)
2023-02-13T17:30:42.828Z zigbee-herdsman:adapter:ezsp:uart --> [421621a9352a867fc34b7e]
2023-02-13T17:30:42.828Z zigbee-herdsman:adapter:ezsp:uart --> DATA (4,2,0): 540001610093cd
2023-02-13T17:30:42.828Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"_cls_":"lookupEui64ByNodeId","_id_":97,"_isRequest_":true,"nodeId":52627}
2023-02-13T17:30:42.828Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (4) success
2023-02-13T17:30:42.828Z zigbee-herdsman:adapter:ezsp:ezsp <== 0xaf: {"_id_":175,"_cls_":"addTransientLinkKey","_isRequest_":false,"status":0}
2023-02-13T17:30:42.828Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 538001af0000
2023-02-13T17:30:42.827Z zigbee-herdsman:adapter:ezsp:uart --> [82503a7e]
2023-02-13T17:30:42.827Z zigbee-herdsman:adapter:ezsp:uart --> ACK  (2)
2023-02-13T17:30:42.827Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (1,4,0): 1411a1a9fb2a1579797e
2023-02-13T17:30:42.827Z zigbee-herdsman:adapter:ezsp:uart <-- [79797e]
2023-02-13T17:30:42.825Z zigbee-herdsman:adapter:ezsp:uart <-- [147d31a1a9fb2a15]
2023-02-13T17:30:42.811Z zigbee-herdsman:adapter:ezsp:ezsp ==> lookupEui64ByNodeId: {"nodeId":52627}
2023-02-13T17:30:42.810Z zigbee-herdsman:adapter:ezsp:driv ZDO Mgmt_Permit_Joining_req params: {"duration":254,"tcSignificant":false}
2023-02-13T17:30:42.809Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (4)
2023-02-13T17:30:42.809Z zigbee-herdsman:adapter:ezsp:uart --> [317d3121a9fb2aea4da66bb5da55aac820fb0c42ceaca20be29ca800eccc47550b7e]
2023-02-13T17:30:42.809Z zigbee-herdsman:adapter:ezsp:uart --> DATA (3,1,0): 530001af00ffffffffffffffff5a6967426565416c6c69616e63653039
2023-02-13T17:30:42.808Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"_cls_":"addTransientLinkKey","_id_":175,"_isRequest_":true,"partner":{"_value":{"type":"Buffer","data":[255,255,255,255,255,255,255,255]}},"transientKey":{"contents":{"type":"Buffer","data":[xxx]}}}
2023-02-13T17:30:42.808Z zigbee-herdsman:adapter:ezsp:ezsp ==> addTransientLinkKey: {"partner":{"_value":{"type":"Buffer","data":[255,255,255,255,255,255,255,255]}},"transientKey":{"contents":{"type":"Buffer","data":[xxx]}}}
Zigbee2MQTT:info  2023-02-13 18:30:42: Zigbee: allowing new devices to join via Light Bulb IKEA Study 1.
Zigbee2MQTT:debug 2023-02-13 18:30:42: Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":"Light Bulb IKEA Study 1","time":254,"transaction":"hzc8e-5","value":true}'

The issue seems to be quite random because I have 4 of these bulbs and 2 have this problem 2 do not. On 1.30.1 all of them work.

kirovilya commented 1 year ago

@mateuszkozakiewicz Thanks, I'll see how I can fix it

kirovilya commented 1 year ago

@mateuszkozakiewicz Are you trying to start pairing mode on a specific router device? In your case, the following happens: when trying to send a command to the device, the full address of the device is requested from stack (networkIdToEUI64), but the stack reports that it cannot determine the address. check that there is a connection on the map with a device with this address.

mateuszkozakiewicz commented 1 year ago

Indeed there is connection, the device reacts to all commands/queries except permit_join and behavior depends on the build version. It is also visible on the map image

primeroz commented 1 year ago

I am having the same issue , joining some BTICINO K4003C

they just join then immediately leave the network

./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:57: Device '0x000474000119ec9e' joined
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:58: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000474000119ec9e","ieee_address":"0x000474000119ec9e"},"type":"device_joined"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:58: MQTT publish: topic 'zigbee2mqtt/0x000474000119ec9e/availability', payload '{"state":"online"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:58: Starting interview of '0x000474000119ec9e'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:58: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000474000119ec9e","ieee_address":"0x000474000119ec9e","status":"started"},"type":"device_interview"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:59: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000474000119ec9e","ieee_address":"0x000474000119ec9e"},"type":"device_announce"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:59: Successfully interviewed '0x000474000119ec9e', device has successfully been paired
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:04:59: Device '0x000474000119ec9e' is supported, identified as: BTicino Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Light switch with neutral","exposes":[{"features":[{"access":7,"description":"On/off state of the switch","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":1,"description":"Triggered action (e.g. a button click)","name":"action","property":"action","type":"enum","values":["identify","on","off"]},{"access":7,"description":"Enables the LED when the light is turned off, allowing to see the switch in the dark","name":"led_in_dark","property":"led_in_dark","type":"binary","value_off":"OFF","value_on":"ON"},{"access":7,"description":"Enables the LED when the light is turned on","name":"led_if_on","property":"led_if_on","type":"binary","value_off":"OFF","value_on":"ON"},{"access":2,"description":"Blinks the built-in LED to make it easier to find the device","name":"identify","property":"identify","type":"enum","values":["blink"]},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"K4003C/L4003C/N4003C/NT4003C","options":[{"access":2,"description":"State actions will also be published as 'action' when true (default false).","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":false,"vendor":"BTicino"},"friendly_name":"0x000474000119ec9e","ieee_address":"0x000474000119ec9e","status":"successful","supported":true},"type":"device_interview"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: Configuring '0x000474000119ec9e'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'homeassistant/switch/0x000474000119ec9e/switch/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x000474000119ec9e/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/0x000474000119ec9e/set","device":{"identifiers":["zigbee2mqtt_0x000474000119ec9e"],"manufacturer":"BTicino","model":"Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)","name":"0x000474000119ec9e","sw_version":"001c"},"name":"0x000474000119ec9e","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/0x000474000119ec9e","unique_id":"0x000474000119ec9e_switch_zigbee2mqtt","value_template":"{{ value_json.state }}"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'homeassistant/sensor/0x000474000119ec9e/action/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x000474000119ec9e/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x000474000119ec9e"],"manufacturer":"BTicino","model":"Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)","name":"0x000474000119ec9e","sw_version":"001c"},"enabled_by_default":true,"icon":"mdi:gesture-double-tap","name":"0x000474000119ec9e action","state_topic":"zigbee2mqtt/0x000474000119ec9e","unique_id":"0x000474000119ec9e_action_zigbee2mqtt","value_template":"{{ value_json.action }}"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'homeassistant/switch/0x000474000119ec9e/switch_led_in_dark/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x000474000119ec9e/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/0x000474000119ec9e/set/led_in_dark","device":{"identifiers":["zigbee2mqtt_0x000474000119ec9e"],"manufacturer":"BTicino","model":"Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)","name":"0x000474000119ec9e","sw_version":"001c"},"name":"0x000474000119ec9e led_in_dark","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/0x000474000119ec9e","unique_id":"0x000474000119ec9e_switch_led_in_dark_zigbee2mqtt","value_template":"{{ value_json.led_in_dark }}"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'homeassistant/switch/0x000474000119ec9e/switch_led_if_on/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x000474000119ec9e/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/0x000474000119ec9e/set/led_if_on","device":{"identifiers":["zigbee2mqtt_0x000474000119ec9e"],"manufacturer":"BTicino","model":"Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)","name":"0x000474000119ec9e","sw_version":"001c"},"name":"0x000474000119ec9e led_if_on","payload_off":"OFF","payload_on":"ON","state_topic":"zigbee2mqtt/0x000474000119ec9e","unique_id":"0x000474000119ec9e_switch_led_if_on_zigbee2mqtt","value_template":"{{ value_json.led_if_on }}"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'homeassistant/select/0x000474000119ec9e/identify/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x000474000119ec9e/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","command_topic":"zigbee2mqtt/0x000474000119ec9e/set/identify","device":{"identifiers":["zigbee2mqtt_0x000474000119ec9e"],"manufacturer":"BTicino","model":"Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)","name":"0x000474000119ec9e","sw_version":"001c"},"name":"0x000474000119ec9e identify","options":["blink"],"unique_id":"0x000474000119ec9e_identify_zigbee2mqtt"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'homeassistant/sensor/0x000474000119ec9e/linkquality/config', payload '{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"},{"topic":"zigbee2mqtt/0x000474000119ec9e/availability","value_template":"{{ value_json.state }}"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0x000474000119ec9e"],"manufacturer":"BTicino","model":"Light switch with neutral (K4003C/L4003C/N4003C/NT4003C)","name":"0x000474000119ec9e","sw_version":"001c"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","name":"0x000474000119ec9e linkquality","state_class":"measurement","state_topic":"zigbee2mqtt/0x000474000119ec9e","unique_id":"0x000474000119ec9e_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'zigbee2mqtt/0x000474000119ec9e', payload '{"action":null,"led_if_on":null,"led_in_dark":null,"led_when_off":"OFF","linkquality":57,"state":null}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: MQTT publish: topic 'zigbee2mqtt/0x000474000119ec9e', payload '{"action":null,"led_if_on":null,"led_in_dark":null,"led_when_off":"OFF","led_when_on":"OFF","linkquality":54,"state":null}'
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:00: Successfully configured '0x000474000119ec9e'
./2023-03-02.05-22-30/log.txt:warn  2023-03-03 12:05:05: Device '0x000474000119ec9e' left the network
./2023-03-02.05-22-30/log.txt:info  2023-03-03 12:05:06: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x000474000119ec9e","ieee_address":"0x000474000119ec9e"},"type":"device_leave"}'
primeroz commented 1 year ago

@Koenkk do you reckon this issue should be reopened ? it was just closed as stale ... thanks :pray:

mateuszkozakiewicz commented 1 year ago

please check on the latest dev/edge version of z2m, I made some changes for ezsp adapter

In my case this helped on all problematic devices I had, I don't have new devices to confirm though, because of the random nature of the issue I was hesitant to call it fixed

Also regarding this Request error Error: Unrecognized nodeId:52627: Error: Unrecognized nodeId:52627 I fixed it by adding a cronjob in HASS to change settings in my 'strategically' places routers around my house to 'keep them awake' because they used to start 'lagging' after a period of inactivity and needed a nudge to start relaying messages again. Another thing that greatly improved stability of my network is a cronjob to restart zigbee2mqtt pod once a day.

kirovilya commented 1 year ago

@mateuszkozakiewicz @primeroz what version of z2m? 1.30.2 ?

mateuszkozakiewicz commented 1 year ago

latest-dev from 3 weeks ago was working fine, this tag was since overwritten I suppose.

primeroz commented 1 year ago

@kirovilya running 1.30.2-1 on Home Assistant

I tried pairing other devices and they work so i am really only having issues with this device BTICINO K4003C , but only some ... since i paired others fine this morning.

Is strange that in the logs i see All good, paired and configured and right after that they leave the network

Screenshot from 2023-03-03 12-42-53

kirovilya commented 1 year ago

@primeroz :( don't know what else to do. I need traffic sniff and herdsman-logs when the device leaves...

primeroz commented 1 year ago

@kirovilya herdsman-logs i guess are not the same as the zigbee2mqtt logs i posted before ? i do i collect them ?

Also, if you can point me how to do the sniff i will :pray:

kirovilya commented 1 year ago

@primeroz no. it looks like https://github.com/Koenkk/zigbee2mqtt/issues/14568#issuecomment-1428369814

https://www.zigbee2mqtt.io/guide/usage/debug.html#zigbee-herdsman-debug-logging

https://www.zigbee2mqtt.io/advanced/zigbee/04_sniff_zigbee_traffic.html

primeroz commented 1 year ago

thanks, will get on it after lunch :+1:

primeroz commented 1 year ago

@kirovilya i hope these are the logs you were looking for, i can't find them in any file just in the ui and they scroll very fast

the device is 0x000474000119ecb6

2023-03-03T14:28:32.116Z zigbee-herdsman:adapter:zStack:znp:SREQ --> ZDO - bindReq - {"dstaddr":25007,"srcaddr":"0x000474000119ecb6","srcendpoint":1,"clusterid":3,"dstaddrmode":3,"dstaddress":"0x00124b00237e065b","dstendpoint":1}
2023-03-03T14:28:32.116Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,23,37,33,175,97,182,236,25,1,0,116,4,0,1,3,0,3,91,6,126,35,0,75,18,0,1,182]
2023-03-03T14:28:32.135Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,101,33,0,69]
2023-03-03T14:28:32.135Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,101,33,0,69]
2023-03-03T14:28:32.135Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 5 - 33 - [0] - 69
2023-03-03T14:28:32.135Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- ZDO - bindReq - {"status":0}
2023-03-03T14:28:32.135Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:32.194Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.194Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.194Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 5 - 161 - [175,97,0] - 41
2023-03-03T14:28:32.194Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - bindRsp - {"srcaddr":25007,"status":0}
2023-03-03T14:28:32.195Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:32.196Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-03-03T14:28:32.217Z zigbee-herdsman:controller:endpoint Bind 0x000474000119ecb6/1 genOnOff from '0x00124b00237e065b/1'
2023-03-03T14:28:32.217Z zigbee-herdsman:adapter:zStack:znp:SREQ --> ZDO - bindReq - {"dstaddr":25007,"srcaddr":"0x000474000119ecb6","srcendpoint":1,"clusterid":6,"dstaddrmode":3,"dstaddress":"0x00124b00237e065b","dstendpoint":1}
2023-03-03T14:28:32.217Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,23,37,33,175,97,182,236,25,1,0,116,4,0,1,6,0,3,91,6,126,35,0,75,18,0,1,179]
2023-03-03T14:28:32.242Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,101,33,0,69]
2023-03-03T14:28:32.242Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,101,33,0,69]
2023-03-03T14:28:32.243Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 5 - 33 - [0] - 69
2023-03-03T14:28:32.243Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- ZDO - bindReq - {"status":0}
2023-03-03T14:28:32.243Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:32.311Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,28,68,129,0,0,6,0,175,97,1,1,0,147,0,98,87,23,0,0,8,24,1,6,1,0,0,88,2,137,198,18]
2023-03-03T14:28:32.311Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,28,68,129,0,0,6,0,175,97,1,1,0,147,0,98,87,23,0,0,8,24,1,6,1,0,0,88,2,137,198,18]
2023-03-03T14:28:32.314Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [177,254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.314Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,28,68,129,0,0,6,0,175,97,1,1,0,147,0,98,87,23,0,0,8,24,1,6,1,0,0,88,2,137,198,18,177,254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.315Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 28 - 2 - 4 - 129 - [0,0,6,0,175,97,1,1,0,147,0,98,87,23,0,0,8,24,1,6,1,0,0,88,2,137,198,18] - 177
2023-03-03T14:28:32.315Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":25007,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":147,"securityuse":0,"timestamp":1529698,"transseqnumber":0,"len":8,"data":{"type":"Buffer","data":[24,1,6,1,0,0,88,2]}}
2023-03-03T14:28:32.320Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":1,"manufacturerCode":null,"commandIdentifier":6},"Payload":[{"direction":1,"attrId":0,"timeout":600}],"Command":{"ID":6,"name":"configReport","parameters":[{"name":"direction","type":32},{"name":"attrId","type":33},{"name":"dataType","type":32,"conditions":[{"type":"directionEquals","value":0}]},{"name":"minRepIntval","type":33,"conditions":[{"type":"directionEquals","value":0}]},{"name":"maxRepIntval","type":33,"conditions":[{"type":"directionEquals","value":0}]},{"name":"repChange","type":1000,"conditions":[{"type":"directionEquals","value":0},{"type":"dataTypeValueTypeEquals","value":"ANALOG"}]},{"name":"timeout","type":33,"conditions":[{"type":"directionEquals","value":1}]}],"response":7}},"address":25007,"endpoint":1,"linkquality":147,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
2023-03-03T14:28:32.322Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.322Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 5 - 161 - [175,97,0] - 41
2023-03-03T14:28:32.322Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - bindRsp - {"srcaddr":25007,"status":0}
2023-03-03T14:28:32.323Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:32.324Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-03-03T14:28:32.340Z zigbee-herdsman:controller:endpoint Bind 0x000474000119ecb6/1 genBinaryInput from '0x00124b00237e065b/1'
2023-03-03T14:28:32.340Z zigbee-herdsman:adapter:zStack:znp:SREQ --> ZDO - bindReq - {"dstaddr":25007,"srcaddr":"0x000474000119ecb6","srcendpoint":1,"clusterid":15,"dstaddrmode":3,"dstaddress":"0x00124b00237e065b","dstendpoint":1}
2023-03-03T14:28:32.341Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,23,37,33,175,97,182,236,25,1,0,116,4,0,1,15,0,3,91,6,126,35,0,75,18,0,1,186]
2023-03-03T14:28:32.348Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,101,33,0,69]
2023-03-03T14:28:32.348Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,101,33,0,69]
2023-03-03T14:28:32.348Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 5 - 33 - [0] - 69
2023-03-03T14:28:32.349Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- ZDO - bindReq - {"status":0}
2023-03-03T14:28:32.349Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:32.443Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,28,68,129,0,0,4,11,249,49,1,1,0,120,0,116,109,23,0,0,8,24,163,10,11,5,41,132,0,249,49,29]
2023-03-03T14:28:32.443Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,28,68,129,0,0,4,11,249,49,1,1,0,120,0,116,109,23,0,0,8,24,163,10,11,5,41,132,0,249,49,29]
2023-03-03T14:28:32.445Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [167]
2023-03-03T14:28:32.445Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,28,68,129,0,0,4,11,249,49,1,1,0,120,0,116,109,23,0,0,8,24,163,10,11,5,41,132,0,249,49,29,167]
2023-03-03T14:28:32.446Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 28 - 2 - 4 - 129 - [0,0,4,11,249,49,1,1,0,120,0,116,109,23,0,0,8,24,163,10,11,5,41,132,0,249,49,29] - 167
2023-03-03T14:28:32.447Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":2820,"srcaddr":12793,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":120,"securityuse":0,"timestamp":1535348,"transseqnumber":0,"len":8,"data":{"type":"Buffer","data":[24,163,10,11,5,41,132,0]}}
2023-03-03T14:28:32.453Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":163,"manufacturerCode":null,"commandIdentifier":10},"Payload":[{"attrId":1291,"dataType":41,"attrData":132}],"Command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}},"address":12793,"endpoint":1,"linkquality":120,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
2023-03-03T14:28:32.462Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:info  2023-03-03 15:28:32: MQTT publish: topic 'zigbee2mqtt/Presa Computer Studio', payload '{"child_lock":"UNLOCK","current":0.76,"energy":351.67,"indicator_mode":"off/on","linkquality":120,"power":132,"power_outage_memory":"restore","state":"ON","update":{"installed_version":192,"latest_version":192,"state":"idle"},"update_available":null,"voltage":234}'
2023-03-03T14:28:32.532Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.532Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,69,161,175,97,0,41]
2023-03-03T14:28:32.532Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 5 - 161 - [175,97,0] - 41
2023-03-03T14:28:32.532Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - bindRsp - {"srcaddr":25007,"status":0}
2023-03-03T14:28:32.533Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:32.535Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
Zigbee2MQTT:info  2023-03-03 15:28:32: Successfully configured '0x000474000119ecb6'
2023-03-03T14:28:32.561Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-03-03T14:28:38.252Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,27,68,129,0,0,0,0,175,97,1,1,0,132,0,91,1,29,0,0,7,20,33,16,5,0,0,240,175,97,19,217]
2023-03-03T14:28:38.253Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,27,68,129,0,0,0,0,175,97,1,1,0,132,0,91,1,29,0,0,7,20,33,16,5,0,0,240,175,97,19,217]
2023-03-03T14:28:38.253Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 27 - 2 - 4 - 129 - [0,0,0,0,175,97,1,1,0,132,0,91,1,29,0,0,7,20,33,16,5,0,0,240,175,97,19] - 217
2023-03-03T14:28:38.253Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - incomingMsg - {"groupid":0,"clusterid":0,"srcaddr":25007,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":132,"securityuse":0,"timestamp":1900891,"transseqnumber":0,"len":7,"data":{"type":"Buffer","data":[20,33,16,5,0,0,240]}}
2023-03-03T14:28:38.254Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":0,"manufacturerSpecific":true,"direction":0,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":5,"manufacturerCode":4129,"commandIdentifier":0},"Payload":[{"attrId":61440}],"Command":{"ID":0,"name":"read","parameters":[{"name":"attrId","type":33}],"response":1}},"address":25007,"endpoint":1,"linkquality":132,"groupID":0,"wasBroadcast":false,"destinationEndpoint":1}'
2023-03-03T14:28:38.256Z zigbee-herdsman:controller:endpoint ReadResponse 0x000474000119ecb6/1 genBasic({"3840":{"value":23,"type":35}}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":1,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4129,"transactionSequenceNumber":null,"writeUndiv":false})
2023-03-03T14:28:38.257Z zigbee-herdsman:adapter:zStack:adapter sendZclFrameToEndpointInternal 0x000474000119ecb6:25007/1 (0,0,1)
2023-03-03T14:28:38.257Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequest - {"dstaddr":25007,"destendpoint":1,"srcendpoint":1,"clusterid":0,"transid":61,"options":0,"radius":30,"len":13,"data":{"type":"Buffer","data":[28,33,16,5,1,0,15,0,35,23,0,0,0]}}
2023-03-03T14:28:38.258Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,23,36,1,175,97,1,1,0,0,61,0,30,13,28,33,16,5,1,0,15,0,35,23,0,0,0,192]
2023-03-03T14:28:38.259Z zigbee-herdsman:controller:endpoint ReadResponse 0x000474000119ecb6/1 genBasic({}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":1,"srcEndpoint":1,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false})
2023-03-03T14:28:38.260Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:38.275Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,1,0,100]
2023-03-03T14:28:38.276Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,1,0,100]
2023-03-03T14:28:38.276Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 1 - [0] - 100
2023-03-03T14:28:38.276Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequest - {"status":0}
2023-03-03T14:28:38.276Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:38.280Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,61,251]
2023-03-03T14:28:38.280Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,61,251]
2023-03-03T14:28:38.280Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,61] - 251
2023-03-03T14:28:38.281Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":61}
2023-03-03T14:28:38.281Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:38.281Z zigbee-herdsman:adapter:zStack:adapter sendZclFrameToEndpointInternal 0x000474000119ecb6:25007/1 (0,0,1)
2023-03-03T14:28:38.282Z zigbee-herdsman:adapter:zStack:znp:SREQ --> AF - dataRequest - {"dstaddr":25007,"destendpoint":1,"srcendpoint":1,"clusterid":0,"transid":62,"options":0,"radius":30,"len":3,"data":{"type":"Buffer","data":[24,5,1]}}
2023-03-03T14:28:38.282Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,13,36,1,175,97,1,1,0,0,62,0,30,3,24,5,1,217]
2023-03-03T14:28:38.300Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,100,1,0,100]
2023-03-03T14:28:38.301Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,100,1,0,100]
2023-03-03T14:28:38.301Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 4 - 1 - [0] - 100
2023-03-03T14:28:38.301Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- AF - dataRequest - {"status":0}
2023-03-03T14:28:38.302Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:38.305Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,0,1,62,248]
2023-03-03T14:28:38.305Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,0,1,62,248]
2023-03-03T14:28:38.306Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [0,1,62] - 248
2023-03-03T14:28:38.306Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":0,"endpoint":1,"transid":62}
2023-03-03T14:28:38.307Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-03-03T14:28:39.279Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,13,69,201,175,97,182,236,25,1,0,116,4,0,0,0,0,125,254,3,69,196,53,175,0,24,254,5,69,196,160,231]
2023-03-03T14:28:39.279Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,13,69,201,175,97,182,236,25,1,0,116,4,0,0,0,0,125,254,3,69,196,53,175,0,24,254,5,69,196,160,231]
2023-03-03T14:28:39.280Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 13 - 2 - 5 - 201 - [175,97,182,236,25,1,0,116,4,0,0,0,0] - 125
2023-03-03T14:28:39.280Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- ZDO - leaveInd - {"srcaddr":25007,"extaddr":"0x000474000119ecb6","request":0,"removechildren":0,"rejoin":0}
2023-03-03T14:28:39.281Z zigbee-herdsman:controller:log Device leave '0x000474000119ecb6'
2023-03-03T14:28:39.281Z zigbee-herdsman:controller:log Removing device from database '0x000474000119ecb6'
2023-03-03T14:28:39.282Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
Zigbee2MQTT:warn  2023-03-03 15:28:39: Device '0x000474000119ecb6' left the network

I don't think i can do the sniffing since i don't have a spare zigbee device

kirovilya commented 1 year ago

@primeroz Ok. Now I see that the device itself has decided to leave the network... <-- ZDO - leaveInd Hmm. why did it decide to leave...

primeroz commented 1 year ago

Yeah :)

I do have one of this that joined and worked just fine ... i have been wondering if maybe is a firmware difference but i can't see what firmware this one that decide to leave has

primeroz commented 1 year ago

@kirovilya

not sure if it helps but this is my configuration

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: true
mqtt: {}
serial:
  port: /dev/ttyUSB0
zigbee_shepherd_devices: false
zigbee_herdsman_debug: false

my coordinator is a ZigStar Stick v4 Zigbee Coordinator on CC2652P https://www.zigbee2mqtt.io/guide/adapters/#recommended

primeroz commented 1 year ago

@kirovilya would a limit of devices connected to the coordinator show up like this ? I don't think so ( since the device joins and then leave the network and also since i only have 19 devices connected to the coordintator between routers and end devices ) but just thought i would ask.

this is driving me crazy :(

primeroz commented 1 year ago

Should i create a new issue since this one is actually closed ?

Let me know if there is any troubleshotting i can do that might help you identify the issue ( other than the sniffing part which i can't really unless i buy a new device )

primeroz commented 1 year ago

@kirovilya Just answering myself ... in my case i had to repress the reset button ( the same one used to retrigger pairing ) as soon as the device showed up in the Z2M UI before it left ( a window of a few second ) . this way it stayed paired and joined

I also tried with a Conbee 2 and the exact same behaviour was observed so nothing to do with Z2M

Should i add this to the docs for the device ?

kirovilya commented 1 year ago

@primeroz I think yes, you can add a note on the device page. I do not know the obvious reasons why it leaves the network, perhaps it did not receive any response from the coordinator during the interview, or "asleep" (and therefore did not receive it).

mateuszkozakiewicz commented 1 year ago

I came to a similar conclusion, the device is not aware that the pairing process has completed from coordinator side and tried again which results in coordinator kicking it out. For me however pressing the pair button again/pulling the battery/disallowing joining did not help.

primeroz commented 1 year ago

For me it worked on about 6 devices. I Just press it a few times when the led turn red a d the devices shows up in th Z2m ui

cklam2 commented 1 year ago

I had the same issue with the Aqara Roller blinds driver when using the new Sonoff Zigbee 3.0 Plus-E ('ezsp' adapter in configuration.yaml). I tried both regular and edge version of Zigbee2Mqtt but no luck. When I switched back to my old CC2531 stick, adding the same device was no issue at all. So guess it's either the Sonoff or the adapter.

bartzz commented 1 year ago

I'm having the same issue with one device. I tried removing it completely from Z2M, checking "retain" to true, but the device still leaves the network in 1-24h (mostly within 1-2 hours)

Zigbee2MQTT:info  2023-04-06 09:35:23: MQTT publish: topic 'zigbee2mqtt/korytarz', payload '{"battery":63,"humidity":59.77,"last_seen":"2023-04-06T07:35:23.343Z","linkquality":108,"power_outage_count":2078,"pressure":1010.6,"temperature":19.81,"voltage":2945}'

Zigbee2MQTT:warn  2023-04-06 09:39:38: Device 'korytarz' left the network

Zigbee2MQTT:info  2023-04-06 09:39:38: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"korytarz","ieee_address":"0x00158d0008025b89"},"type":"device_leave"}'
adams-family commented 1 year ago

I'm having the same issue with an IKEA Tradrfri switch, somewhere between 1-24 hours it decides to leave the network:

warn  2023-04-09 22:12:08: Device 'IkeaSwitchKitchen' left the network

I'm using a Sonoff Zigbee coordinator connected to a RaspberryPi directly via USB. Zigbee2Mqtt runs in a docker container, version: 1.30.1 (commit #eb878d3).

Before this setup, I was using Tube's ZB bridge over ethernet and a much order version of Zigbee2Mqtt (like 1-2 years old) and I had no issues with the same devices.

Would appreciate someone's help on this. I have 'wife acceptance issues' with my setup ๐Ÿ˜‚

Foristkirito commented 1 year ago

same issue with aqara fp1

jmaragon commented 1 year ago

I was having the same issues with some Netatmo cover switches... the solution from @primeroz about repressing the reset button once the device joined indeed worked for me.

primeroz commented 1 year ago

:+1: i did not have problems since then , I have about 15 switches working great

eligao commented 7 months ago

Had a same issue with STYRBAR E2002. Pulling the battery when it was about to leave the network did the trick.

patpac9 commented 6 months ago

Had a same issue with STYRBAR E2002. Pulling the battery when it was about to leave the network did the trick.

Can confirm did the same thing with my Tint Bulb. I just cut the power right after it joined the network. Since then it stayed in my network. ๐Ÿ‘๐Ÿป Took me 2h filled with pure anger and hate to figure this out.

eligao commented 6 months ago

Seems fixed in the latest release? Not sure which commit though.

mateuszkozakiewicz commented 6 months ago

For me migrating to a different coordinator (SMLIGHT SLZB-06) fixed all issues. It's been months since I had to do check or debug anything.

Satalicious commented 4 months ago

not fixed yet, experiencing this on the latest firmware.

AkshayRao27 commented 2 months ago

I just "upgraded" to ember and now one single Aqara H1 Switch (double rocker, with neutral, EU) is having this issue. I even tried force-removing it before it could leave by itself and then pairing it again, but that did not help. The rest of my Aqara H1 Switches work fine, it's just this one single switch that's problematic.

Zigbee2MQTT version
    [1.39.0](https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.39.0) commit: [unknown](https://github.com/Koenkk/zigbee2mqtt/commit/unknown)

Coordinator type
    EmberZNet

Coordinator revision
    7.4.2 [GA]
CodeForLove83 commented 1 week ago

Hi,

I'm wondering if the issue is related to missing response for:

The following pictures shows a successful pairing with deconz: Switch device sends:

image

It receives the response:

image

I haven't investigated how to fix z2m to handle this request. I'm wondering if @Koenkk can help us on this.

CodeForLove83 commented 1 week ago

@Koenkk, am I wrong or z2m is supposed to handle the attribute 0xf000? I found this piece of code but I'm not sure it's correct, a 0 is missing?

const payload = {0xf00: {value: 23, type: 35}};

Shouldn't it be?: const payload = {0xf000: {value: 23, type: 35}};