cId -> cid. #45

This commit is contained in:
Koenkk
2018-05-16 19:22:47 +02:00
parent 2521af7d78
commit e3c9448656
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ class Controller {
}
};
this.zigbee.publish(deviceID, message.cId, message.cmd, message.zclData, ep, callback);
this.zigbee.publish(deviceID, message.cid, message.cmd, message.zclData, ep, callback);
});
}
+4 -4
View File
@@ -1,14 +1,14 @@
const converters = {
"state": (value) => {
return {
cId: 'genOnOff',
cid: 'genOnOff',
cmd: value.toLowerCase(),
zclData: {},
}
},
"brightness": (value) => {
return {
cId: 'genLevelCtrl',
cid: 'genLevelCtrl',
cmd: 'moveToLevel',
zclData: {
level: value,
@@ -18,7 +18,7 @@ const converters = {
},
"color_temp": (value) => {
return {
cId: 'lightingColorCtrl',
cid: 'lightingColorCtrl',
cmd: 'moveToColorTemp',
zclData: {
colortemp: value,
@@ -28,7 +28,7 @@ const converters = {
},
"color": (value) => {
return {
cId: 'lightingColorCtrl',
cid: 'lightingColorCtrl',
cmd: 'moveToColor',
zclData: {
colorx: value.x * 65535,
+3 -3
View File
@@ -108,7 +108,7 @@ class Zigbee {
return this.shepherd.list().find((d) => d.ieeeAddr === deviceID);
}
publish(deviceID, cId, cmd, zclData, ep, callback) {
publish(deviceID, cid, cmd, zclData, ep, callback) {
// Find device in zigbee-shepherd
let device = this.getDevice(deviceID);
if (!device || !device.epList || !device.epList.length) {
@@ -124,8 +124,8 @@ class Zigbee {
return;
}
logger.info(`Zigbee publish to '${deviceID}', ${cId} - ${cmd} - ${JSON.stringify(zclData)} - ${ep}`);
device.functional(cId, cmd, zclData, callback);
logger.info(`Zigbee publish to '${deviceID}', ${cid} - ${cmd} - ${JSON.stringify(zclData)} - ${ep}`);
device.functional(cid, cmd, zclData, callback);
}
}