zigbeer / zcl-packet Goto Github PK
View Code? Open in Web Editor NEWzcl-packet is a framer and parser for ZigBee Cluster Library (ZCL) packet on node.js.
License: MIT License
zcl-packet is a framer and parser for ZigBee Cluster Library (ZCL) packet on node.js.
License: MIT License
It would be good to be able to extend the definitions externally (without forking) to support manufacturer specific commands.
RangeError: Index past Buffer end
at BufferWithPointer.goTo (/home/iota/edge/node_modules/buffster/dist/index.js:19:19)
at BufferWithPointer.fwd (/home/iota/edge/node_modules/buffster/dist/index.js:32:21)
at BufferWithPointer.uint16le (/home/iota/edge/node_modules/buffster/dist/index.js:41:43)
at struct (/home/iota/edge/node_modules/zcl-packet/dist/dataTypeRead.js:52:27)
at Object.exports.readByType (/home/iota/edge/node_modules/zcl-packet/dist/dataTypeRead.js:70:12)
at exports.specialReads.report.readUtils_1.readUntilEnd.r (/home/iota/edge/node_modules/zcl-packet/dist/foundationReads.js:78:61)
at r (/home/iota/edge/node_modules/zcl-packet/dist/readUtils.js:31:26)
at FoundPayload.parse (/home/iota/edge/node_modules/zcl-packet/dist/foundation.js:60:26)
at Object.parse (/home/iota/edge/node_modules/zcl-packet/dist/index.js:72:32)
at dispatchIncomingMsg (/home/iota/edge/node_modules/zigbee-shepherd/lib/components/af.js:719:49)
at Controller.incomingMsgHandler (/home/iota/edge/node_modules/zigbee-shepherd/lib/components/af.js:735:16)
at Controller.emit (events.js:198:13)
at Object.bridge._areqEventBridge (/home/iota/edge/node_modules/zigbee-shepherd/lib/components/event_bridge.js:16:16)
at CcZnp.Controller.znp.on.msg (/home/iota/edge/node_modules/zigbee-shepherd/lib/components/controller.js:105:20)
at CcZnp.emit (events.js:198:13)
at CcZnp._mtIncomingDataHdlr (/home/iota/edge/node_modules/cc-znp/dist/ccznp.js:332:18)
If I already have the frame header parsed - frame header, command is 10 (report attributes) can i use this library to parse just the ZCL content itself, by sending in a buffer that starts with the first attrId?
"initNormalOpMode":1
, "initTestMode":2
"transferApdu":0
, "connectReq":1
, "disconnectReq":2
, "connectStatusNoti":3
"transferApdu":0
, "connectReq":1
, "disconnectReq":2
, "connectStatusNoti":3
"getProfile":0
, "reqMirror":1
, "mirrorRem":2
, "reqFastPollMode":3
, "getSnapshot":4
, "takeSnapshot":5
, "mirrorReportAttrRsp":6
"getProfileRsp":0
, "reqMirrorRsp":1
, "mirrorRemRsp":2
, "reqFastPollModeRsp":3
, "getSnapshotRsp":4
Please change
Line 120 in 351c420
to
throw new Error('The argument object has incorrect properties, missing '+arg.name);
It will help a lot at development.
API: .parse(zclBuf [, clusterId], callback)
The document shows: if the zclBuf is a "functional packet", clusterId should be given, and if it's a foundation packet then not.
My question is, when I received a zclBuf, how do I know it's a foundation or a functional packet before parsing? If I don't know, how could I tell parse() to do the right thing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.