Zigbee2mqtt: Aqara: crash on pairing

Created on 1 Sep 2019  路  11Comments  路  Source: Koenkk/zigbee2mqtt

Bug Report

On trying to pair an Aqara Sensor, Zigbee2Mqtt crashes

zigbee2mqtt:debug 9/1/2019, 4:59:51 PM Received zigbee message of type 'readRsp' with data '{"cid":"genBasic","data":{"manufacturerName":"LUMI","modelId":"lumi.sensor_magnet.aq2","powerSource":3}}' of device 'lumi.sensor_magnet.aq2' (0x00158d00########) of endpoint 1
zigbee2mqtt:info 9/1/2019, 4:59:51 PM New device 'lumi.sensor_magnet.aq2' with address 0x00158d00######## connected!
/app/node_modules/js-yaml/lib/js-yaml/dumper.js:756
throw new YAMLException('unacceptable kind of an object to dump ' + type);
^
YAMLException: unacceptable kind of an object to dump [object Undefined]
at writeNode (/app/node_modules/js-yaml/lib/js-yaml/dumper.js:756:13)
at dump (/app/node_modules/js-yaml/lib/js-yaml/dumper.js:817:7)
at Object.safeDump (/app/node_modules/js-yaml/lib/js-yaml/dumper.js:823:10)
at Object.writeYaml (/app/lib/util/fs.js:13:33)
at write (/app/lib/util/settings.js:149:12)
at writeRead (/app/lib/util/settings.js:132:5)
at addDevice (/app/lib/util/settings.js:216:5)
at Object.addDevice (/app/lib/util/settings.js:400:30)
at DeviceReceive.onZigbeeMessage (/app/lib/extension/deviceReceive.js:68:22)
at extensions.filter.forEach (/app/lib/controller.js:143:31)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: 'node index.js'
npm ERR! Exit status 1
npm ERR! Failed at the [email protected] start script.

How to reproduce it (minimal and precise)

pair again ;-). Do not really know, why. My Zigbee Network is build from 51 Devices (1 Coordinator, 19 Router, Sensors). I did not manage to pair an Aqara Sensor since before migrating to 1.5.1. Most of the time I get the "Cannot get node descriptor for..."-Error, but sometimes z2m crashes like this.

Debug Info

zigbee2mqtt version: Starting zigbee2mqtt version 1.5.1 (commit #4f7e3a1) latest dev
CC253X firmware version: Coordinator firmware version: '20190619'

Most helpful comment

@dirstel yes probably, I will investigate it after #1888

All 11 comments

Same here:

Log

zigbee2mqtt:info 9/2/2019, 4:07:44 AM New device 'lumi.remote.b186acn01' with address 0xXXXXXXXXXXXXXXXX connected!
/zigbee2mqtt-1.5.1/node_modules/js-yaml/lib/js-yaml/dumper.js:756
throw new YAMLException('unacceptable kind of an object to dump ' + type);
^
YAMLException: unacceptable kind of an object to dump [object Undefined]
at writeNode (/zigbee2mqtt-1.5.1/node_modules/js-yaml/lib/js-yaml/dumper.js:756:13)
at dump (/zigbee2mqtt-1.5.1/node_modules/js-yaml/lib/js-yaml/dumper.js:817:7)
at Object.safeDump (/zigbee2mqtt-1.5.1/node_modules/js-yaml/lib/js-yaml/dumper.js:823:10)
at Object.writeYaml (/zigbee2mqtt-1.5.1/lib/util/fs.js:13:33)
at write (/zigbee2mqtt-1.5.1/lib/util/settings.js:139:12)
at writeRead (/zigbee2mqtt-1.5.1/lib/util/settings.js:122:5)
at addDevice (/zigbee2mqtt-1.5.1/lib/util/settings.js:206:5)
at Object.addDevice (/zigbee2mqtt-1.5.1/lib/util/settings.js:390:30)
at DeviceReceive.onZigbeeMessage (/zigbee2mqtt-1.5.1/lib/extension/deviceReceive.js:68:22)
at extensions.filter.forEach (/zigbee2mqtt-1.5.1/lib/controller.js:143:31)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-02T01_07_46_775Z-debug.log

Hardware:

  • Raspberry PI v1 512Mb
  • CC2531. Coordinator firmware version: '20190608'

Software:

  • Host system HassOS 2.12
  • Hass.io supervisor version 184
  • zigbee2mqtt version 1.5.1 (commit #unknown) (installed as add-on from hassio)

P.S.

Along with this I'm experiencing problems with zigbee2mqtt connection to mqtt server but don't think it's the case

P.P.S

Before this there were first attempt to pair device but seems it failed because device were to far from coordinator

  • Error message: zigbee2mqtt:error 9/2/2019, 4:06:36 AM Cannot get the Node Descriptor of the Device: 0xXXXXXXXXXXX (Error: Timed out after 10000 ms)

Hi!

I expirienced similar errors yesterday after I tried the option to put devices in a separate file like mentioned at the bottom of https://www.zigbee2mqtt.io/configuration/configuration.html

configuration.yaml

devices: devices.yaml
groups: groups.yaml

I couldn't pair an Aqara Cube and an Aqara Vibration Sensor any more. Most of the time the device address was added, but only as unknown device. It also crashed when I tried to remove them via zigbee2mqtt/bridge/config/remove.
I lost a lot of time because I thought it had something to do with the also before added Aqara LED Bulb and that they used it as router. After I put the devices back in configuration.yaml they could join again.
Just saw that the LED stopped working again. But that seems to be another problem.

zigbee2mqtt version: version 1.5.1 (commit #ac3b924)
CC253x firmware version: Coordinator CC2530_CC2592_DEFAULT_20190608

devices: devices.yaml
groups: groups.yaml

Hmm, did that too, will try to push devices back to configuration.yaml (right now I'm not using groups).

When moving devices and (empty) groups section back to configuration.yaml pairing works fine, without crash. I even managed to avoid the "Cannot get node descriptor for..."-Error. So there may be some sort of hickup in the code which allows seperate yamls for devices and groups?!

@dirstel yes probably, I will investigate it after #1888

When moving devices and (empty) groups section back to configuration.yaml pairing works fine, without crash. I even managed to avoid the "Cannot get node descriptor for..."-Error. So there may be some sort of hickup in the code which allows seperate yamls for devices and groups?!

Thanks for this.
I have been tearing my hair out with pairing on 1.5.1 (hassio).
Will try this ASAP.

Same here, same log, sometimes same devices: Aqara Vibration sensor and Temperature sensor. The vibration doesn't work at all, errors and crashes. The temperature one let the network crash every some minutes and all the other devices (3 motion sensor and a door sensor) stop reporting the status.

zigbee-herdsman has now been released in zigbee2mqtt 1.6 dev. @dirstel can you check if the issue has been resolved?

@koenkk: had some mixed experience: a door contact did really well and pairing was a breeze. Aqara motion sensors did give me the same Cannot get node descriptor for..."-Error. I'm still observing this. At least there is a significant speed bump, but I'm experiencing some stability issues as well (same as with 1.5.1).

Have to check putting the device definition in separate file though.

Can you share your database.db and DEBUG=* npm start log when pairing this motion sensor?

Sorry for not posting details... I had no time for checking. But I read another issue and retried - now pairing is working for the motion sensors.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pepp86 picture pepp86  路  4Comments

jeroenterheerdt picture jeroenterheerdt  路  3Comments

z4rn0x picture z4rn0x  路  3Comments

Koenkk picture Koenkk  路  3Comments

tb-killa picture tb-killa  路  3Comments