Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
456 stars 277 forks source link

Error UnhandledPromiseRejectionWarning #342

Closed glsf91 closed 2 years ago

glsf91 commented 3 years ago

I have a Sonoff SNZB-03 motion sensor. I use this firmware https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_other_coordinator_20210120.zip on a CC2652P (Ebyte E72). I got this error:

Mar 29 17:10:06 ubuntu1 npm[30551]: Zigbee2MQTT:info  2021-03-29 17:10:06: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"SonoffMotionSensor","ieee_address":"0x00124b0022fd35a1"},"type":"device_announce"}'
Mar 29 17:10:06 ubuntu1 npm[30551]: Zigbee2MQTT:info  2021-03-29 17:10:06: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"SonoffMotionSensor"},"type":"device_announced"}'
Mar 29 17:10:06 ubuntu1 npm[30551]: Zigbee2MQTT:info  2021-03-29 17:10:06: MQTT publish: topic 'zigbee2mqtt/SonoffMotionSensor', payload '{"battery_low":false,"linkquality":24,"occupancy":true,"tamper":false}'
Mar 29 17:10:49 ubuntu1 npm[30551]: (node:30600) UnhandledPromiseRejectionWarning: Error: Command 0x00124b0022fd35a1/1 ssIasZone.enrollRsp({"enrollrspcode":0,"zoneid":23}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null}) failed (Data request failed with error: 'MAC transaction expired' (240))
Mar 29 17:10:49 ubuntu1 npm[30551]:     at ZStackAdapter.<anonymous> (/home/john/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:339:27)
Mar 29 17:10:49 ubuntu1 npm[30551]:     at Generator.next (<anonymous>)
Mar 29 17:10:49 ubuntu1 npm[30551]:     at fulfilled (/home/john/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:24:58)
Mar 29 17:10:49 ubuntu1 npm[30551]: (node:30600) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Mar 29 17:10:49 ubuntu1 npm[30551]: (node:30600) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I see the device_announce a few times a day for only this device. My other sensors are from Xiaomi. There is also a DeprecationWarning.

Looks lik I can reproduce this:

github-actions[bot] commented 3 years 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

glsf91 commented 3 years ago

This is still a problem

github-actions[bot] commented 2 years 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

glsf91 commented 2 years ago

This is still a problem (avoid closing)

github-actions[bot] commented 2 years 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

glsf91 commented 2 years ago

Prefent stale

github-actions[bot] commented 2 years 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

glsf91 commented 2 years ago

prevent stale

MattWestb commented 2 years ago

device_announce is made then one device is rejoining the network after being re powered (routers) or have losing / not liking its parent and "jumping" to one new parent (end devices). I have 2 Philips HUE motion sensors that is "jumping around" all the time and using one of the worse parent they can find in the other end of the apartment but i cant do anything about it until i baying 2 new light sensors for replace them with (i primary using the light sensor in then and Aqaras for temperature).

I dont knowing if the Sonoff motion sensor is not liking some routers as its parent but i think its normal and dot have large problems like most older Xiaomi sensor is having (but they is leaving and not coming back if they is getting problems).

glsf91 commented 2 years ago

The problem is the error and DeprecationWarning.

github-actions[bot] commented 2 years 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

glsf91 commented 2 years ago

prevent stale

github-actions[bot] commented 2 years 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

glsf91 commented 2 years ago

prevent stale

github-actions[bot] commented 2 years 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

glsf91 commented 2 years ago

prevent stale