Closed palitu closed 6 years ago
is there any way around this at the moment? I haven't looked through the error to see how trivial it is (i am also no pro when it comes to this)
Should i remove a device that is causing this?
This error appears with bad (damaged) data packets. This problem appears periodically with all devices. I've patched node_modules\zigbee-shepherd\node_modules\zcl-packet\lib\zcl.js
zcl.header = function (buf) { if (!Buffer.isBuffer(buf)) throw new TypeError('header should be a buffer.');
if(buf.length < 3){ return; } //!!! <======== added
Check added, thanks! @ptvoinfo
@palitu please let me know if I can close this issue.
ahh, nope - just got another one after readding a Mijia motion sensor:
buffer.js:977
throw new RangeError('Index out of range');
^
RangeError: Index out of range
at checkOffset (buffer.js:977:11)
at Buffer.readUInt8 (buffer.js:1015:5)
at Object.zcl.header (/app/node_modules/zcl-packet/lib/zcl.js:73:24)
at Object.header (/app/node_modules/zigbee-shepherd/lib/components/zcl.js:10:32)
at dispatchIncomingMsg (/app/node_modules/zigbee-shepherd/lib/components/af.js:631:29)
at Controller.incomingMsgHandler (/app/node_modules/zigbee-shepherd/lib/components/af.js:714:12)
at emitOne (events.js:116:13)
at Controller.emit (events.js:211:7)
at Object.bridge._areqEventBridge (/app/node_modules/zigbee-shepherd/lib/components/event_bridge.js:15:16)
at CcZnp.<anonymous> (/app/node_modules/zigbee-shepherd/lib/components/controller.js:98:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@0.1.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@0.1.0 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/2018-05-28T09_46_37_187Z-debug.log
I'm running in a docker container and i'm not sure where to find the detail log file...
Probably you are not running the latest version.
Your log shows at Object.zcl.header (/app/node_modules/zcl-packet/lib/zcl.js:73:24)
, this is not possible because there is a comment at this line: https://github.com/Koenkk/zcl-packet/blob/master/lib/zcl.js#L73.
To update your docker container:
docker rm -f ZIGBEE2MQTT_CONTAINER_NAME
docker rmi -f ZIGBEE2MQT_IMAGE_NAME
Now run again, this will pull the last version from hub.docker.com.
will give it a go - i thought i had recently done this, but will see what happens now :)
On Tue, May 29, 2018 at 1:47 AM, Koen Kanters notifications@github.com wrote:
Probably you are not running the latest version.
Your log shows at Object.zcl.header (/app/node_modules/zcl-packet/ lib/zcl.js:73:24), this is not possible because there is a comment at this line: https://github.com/Koenkk/zcl-packet/blob/master/lib/zcl.js#L73 .
To update your docker container:
docker rm -f ZIGBEE2MQTT_CONTAINER_NAME docker rmi -f ZIGBEE2MQT_IMAGE_NAME
Now run again, this will pull the last version from hub.docker.com.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/42#issuecomment-392577468, or mute the thread https://github.com/notifications/unsubscribe-auth/AGU9IPmErt_QPbI336-3d_9ge5Pb8gg-ks5t3DgWgaJpZM4T8Q7o .
nope i was wrong, i did not update it correctly.
Looking good now, i can also see more details coming out of the Mi plugs which is good :)
cheers,
On Tue, May 29, 2018 at 10:38 AM, Leigh van der Merwe palitu822@gmail.com wrote:
will give it a go - i thought i had recently done this, but will see what happens now :)
On Tue, May 29, 2018 at 1:47 AM, Koen Kanters notifications@github.com wrote:
Probably you are not running the latest version.
Your log shows at Object.zcl.header (/app/node_modules/zcl-packet/ lib/zcl.js:73:24), this is not possible because there is a comment at this line: https://github.com/Koenkk/zcl-packet/blob/master/lib/zcl.js# L73.
To update your docker container:
docker rm -f ZIGBEE2MQTT_CONTAINER_NAME docker rmi -f ZIGBEE2MQT_IMAGE_NAME
Now run again, this will pull the last version from hub.docker.com.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/42#issuecomment-392577468, or mute the thread https://github.com/notifications/unsubscribe-auth/AGU9IPmErt_QPbI336-3d_9ge5Pb8gg-ks5t3DgWgaJpZM4T8Q7o .
Ok good, let me know if you encounter this again.
another error that just popped up... this seems to happen after getting data from a xiaomi temp/humidity sensor
WSDCGQ01LM
.