zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Can not pair any device

Open wbsu2003 opened this issue 7 years ago • 29 comments

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

wbsu2003 avatar Jul 09 '19 04:07 wbsu2003

Please provide the complete log when trying to pair the device, with:

advanced:
  log_level: debug

in configuration.yaml.

Koenkk avatar Jul 10 '19 15:07 Koenkk

Thank you for your reply, I have added debugging information according to your requirements.

log.txt

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"}

wbsu2003 avatar Jul 11 '19 01:07 wbsu2003

Can you post the log when running with DEBUG=* npm start ?

Koenkk avatar Jul 11 '19 17:07 Koenkk

An error message was collected: 4{YRWZTC75ZJA8~B5ITZ6`0

3)@L}Z`HE~YD@LAEL@{5FY

log.txt

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.

wbsu2003 avatar Jul 12 '19 03:07 wbsu2003

我重新插拔了一下设备,看起来似乎正常了。 I plugged in the device again and it looks normal.

MDTBY 9D~0@0_BU07IZ}A

log.txt

wbsu2003 avatar Jul 12 '19 05:07 wbsu2003

7 NLZJ3{8OZU$(9Q3SY$7W5

wbsu2003 avatar Jul 12 '19 05:07 wbsu2003

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.db on http://www.pastebin.com

Koenkk avatar Jul 12 '19 14:07 Koenkk

[ ]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

wbsu2003 avatar Jul 15 '19 06:07 wbsu2003

I forgot to mention that the DEBUG=* is logged to the console, not to the log files, can you post that output?

Koenkk avatar Jul 15 '19 19:07 Koenkk

[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

wbsu2003 avatar Jul 16 '19 08:07 wbsu2003

DEBUG=* npm start 2>&1 | tee -a log.txt

log.txt

wbsu2003 avatar Jul 16 '19 09:07 wbsu2003

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?

Koenkk avatar Jul 18 '19 11:07 Koenkk

I am using zigbee2mqtt in Docker container, I modified /app/node_modules/zigbee-shepherd/lib/components/controller.js 9R XM`XA0@H8V9@P}TP_7 B

I recaptured the log file log.txt

wbsu2003 avatar Jul 19 '19 02:07 wbsu2003

It looks like the device does not answer nodeDescReq, can you try to keep the device awake after pairing by pressing buttons on it?

Koenkk avatar Jul 19 '19 06:07 Koenkk

I understand what you mean, so I release and start pressing the reset button every second to keep the device from going to sleep.

log.txt

wbsu2003 avatar Jul 19 '19 09:07 wbsu2003

The device still doesn't seem to respond, can you confirm via sniffing that it's indeed not responding?

Koenkk avatar Jul 20 '19 15:07 Koenkk

These two files are generated at the same time, I don't know if it helps you analyze the problem.

wbsu2003 avatar Jul 22 '19 05:07 wbsu2003

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?)

Koenkk avatar Jul 22 '19 16:07 Koenkk

我买了这家公司整套的产品,包括移动侦查、红外控制以及视频监控等等,当然还有其他公司的产品,比如小米,因为不同的公司需要安装不同的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!

wbsu2003 avatar Jul 23 '19 00:07 wbsu2003