zcl-id > Zcl.

This commit is contained in:
Koen Kanters 2019-07-27 13:29:20 +02:00
parent 7853f41a0e
commit a60fdd75dc
4 changed files with 15 additions and 6536 deletions

View File

@ -1,4 +1,4 @@
const zclId = require('zigbee-herdsman/dist/zcl-id');
const Zcl = require('zigbee-herdsman/dist/zcl');
const OneJanuary2000 = new Date('January 01, 2000 00:00:00').getTime();
@ -37,8 +37,8 @@ class ExtensionResponder {
readResponse(message, endpoint) {
const clusterID = message.clusterid;
const cluster = zclId.cluster(clusterID).key;
const attributes = message.zclMsg.payload.map((p) => zclId.attr(message.clusterid, p.attrId));
const cluster = Zcl.getClusterLegacy(clusterID).key;
const attributes = message.zclMsg.payload.map((p) => Zcl.getAttributeLegacy(message.clusterid, p.attrId));
const response = [];
attributes.forEach((attribute) => {
@ -59,7 +59,7 @@ class ExtensionResponder {
attrId: attrId,
status: 0,
attrData: value,
dataType: zclId.attrType(cId, attrId).value,
dataType: Zcl.getAttributeTypeLegacy(cId, attrId).value,
};
}

View File

@ -6,7 +6,7 @@ const utils = require('./util/utils');
const ZigbeeQueue = require('./util/zigbeeQueue');
const cieApp = require('./zapp/cie');
const objectAssignDeep = require('object-assign-deep');
const zclId = require('zigbee-herdsman/dist/zcl-id');
const Zcl = require('zigbee-herdsman/dist/zcl');
const advancedSettings = settings.get().advanced;
@ -615,8 +615,8 @@ class Zigbee {
report(ep, cluster, attributes) {
const friendlyName = this.getDeviceFriendlyName(ep.device.ieeeAddr);
const cfgArr = attributes.map((attribute) => {
const attrId = zclId.attr(cluster, attribute.attr).value;
const dataType = zclId.attrType(cluster, attribute.attr).value;
const attrId = Zcl.getAttributeLegacy(cluster, attribute.attr).value;
const dataType = Zcl.getAttributeTypeLegacy(cluster, attribute.attr).value;
return {
direction: 0,
attrId,

6535
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@
"semver": "*",
"winston": "2.4.2",
"zigbee-herdsman": "0.4.0",
"zigbee-shepherd-converters": "10.1.7",
"zigbee-shepherd-converters": "10.1.8",
"deep-diff": "*"
},
"devDependencies": {