Giter Club home page Giter Club logo

Comments (9)

ptvoinfo avatar ptvoinfo commented on September 23, 2024 1

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

from zigbee2mqtt.

palitu avatar palitu commented on September 23, 2024

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?

from zigbee2mqtt.

Koenkk avatar Koenkk commented on September 23, 2024

Check added, thanks! @ptvoinfo

@palitu please let me know if I can close this issue.

from zigbee2mqtt.

palitu avatar palitu commented on September 23, 2024

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! [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/2018-05-28T09_46_37_187Z-debug.log

from zigbee2mqtt.

palitu avatar palitu commented on September 23, 2024

I'm running in a docker container and i'm not sure where to find the detail log file...

from zigbee2mqtt.

Koenkk avatar Koenkk commented on September 23, 2024

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.

from zigbee2mqtt.

palitu avatar palitu commented on September 23, 2024

from zigbee2mqtt.

palitu avatar palitu commented on September 23, 2024

from zigbee2mqtt.

Koenkk avatar Koenkk commented on September 23, 2024

Ok good, let me know if you encounter this again.

from zigbee2mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.