Can not pair any device
Bug Report
What happened
Sorry my native language is Chinese, I use Google Translate.
I followed this article How to support new devices, permit_join: true is set in configuration.yaml, but never appeared "2018-5-1 18:06:41 INFO New device with address 0x00158d0001b79111 connected!"
What did you expect to happen
I hope to recognize the new device in zigbee2mqtt, as described in the documentation How to support new devices.
How to reproduce it (minimal and precise)
I am using this deviceWulian红外入侵探测器,
I sniff Zigbee traffic with Wireshark. and saved the .pcapng file
Can anyone tell me what to do next?
Debug Info
zigbee2mqtt version:1.4.0 coordinator:20190425 CC2531 firmware version: latest router firmware
Please provide the complete log when trying to pair the device, with:
advanced:
log_level: debug
in configuration.yaml.
Thank you for your reply, I have added debugging information according to your requirements.
state.json is empty; database.db :
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018df4653","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,11],"status":"online","joinTime":1562634015,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[],"outClusterList":[1280],"clusters":{"ssIasZone":{"dir":{"value":2},"cmdRsps":{"enrollReq":{"exec":"_exec_"},"statusChangeNotification":{"exec":"_exec_"}}}}}},"_id":"ZZpXX4a16175GKcP"}
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018df4653","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6],"status":"online","joinTime":1562806578,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}}},"_id":"ZZpXX4a16175GKcP"}
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018df4653","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,11],"status":"online","joinTime":1562806578,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[],"outClusterList":[1280],"clusters":{"ssIasZone":{"dir":{"value":2},"cmdRsps":{"enrollReq":{"exec":"_exec_"},"statusChangeNotification":{"exec":"_exec_"}}}}}},"_id":"ZZpXX4a16175GKcP"}
Can you post the log when running with DEBUG=* npm start ?
An error message was collected:


A log file is also generated under /root/.npm/_logs/
2019-07-12T03_15_11_377Z-debug.log
BTW: I used xiaomi WXKG01LM in the same environment, I can recognize the device, and I can subscribe to the message in mqtt.

https://github.com/Koenkk/zigbee2mqtt/issues/1708#issuecomment-510747716 indicates there is atleast some connection.
Can you follow:
- Reflash CC2531 stick
- Remove
data/database.db - Start zigbee2mqtt with
DEBUG=* npm start - Try to pair the device
- Wait 5 minutes
- Provide the logs on http://www.pastebin.com
- Provide
data/database.dbon http://www.pastebin.com
[ ]Reflash CC2531 stick -->I have purchased CC-Debugger but have not received it yet.
[x]Remove data/database.db -->Yes
[x]Start zigbee2mqtt with DEBUG=* npm start -->Yes
[x]Try to pair the device -->Yes
[x]Wait 5 minutes -->Yes
[x]Provide the logs on http://www.pastebin.com -->https://pastebin.com/vM6pi6aQ
[x]Provide data/database.db on http://www.pastebin.com -->https://pastebin.com/ZzdwATfk
I forgot to mention that the DEBUG=* is logged to the console, not to the log files, can you post that output?
[x]Reflash CC2531 stick -->Yes
From the point of view, it is the same as before.
I used various methods, but only captured info、warn、and error, other information on the console can not be captured.
I want to use the screenshot, but the scrolling is too fast.So I decided to use the screen recording method.
MP4 Video File:20190716_162552.mp4
The reason why your does not join is because the parentaddr is 0 ({ nwkaddr: 52956, extaddr: '0x00124b00041f8947', parentaddr: 0 },, see https://github.com/Koenkk/zigbee-herdsman/blob/master/src/lib/components/controller.ts#L125.
However I don't know why this check is added. Can you try removing it locally and check if it works?
I am using zigbee2mqtt in Docker container, I modified /app/node_modules/zigbee-shepherd/lib/components/controller.js

I recaptured the log file log.txt
It looks like the device does not answer nodeDescReq, can you try to keep the device awake after pairing by pressing buttons on it?
I understand what you mean, so I release and start pressing the reset button every second to keep the device from going to sleep.
The device still doesn't seem to respond, can you confirm via sniffing that it's indeed not responding?
These two files are generated at the same time, I don't know if it helps you analyze the problem.
In the logs you see that the device does not answer the node descriptor request which is needed in order to join. I don't know why the device doesn't answer (maybe bad zigbee implementation on the device?)
我买了这家公司整套的产品,包括移动侦查、红外控制以及视频监控等等,当然还有其他公司的产品,比如小米,因为不同的公司需要安装不同的APP,所以我希望能将这些智能产品整合到HomeAssistant中,如果你方便提供一个收件地址,我可以邮寄设备给您分析,不胜感激,谢谢! I bought the company's complete set of products, including mobile reconnaissance, infrared control and video surveillance, and of course other companies' products, such as Xiaomi, because different companies need to install different apps, so I hope to put these smart The product is integrated into HomeAssistant. If you are convenient to provide a receiving address, I can mail it to you for analysis. Thank you!





