diff --git a/lib/extension/deviceConfigure.js b/lib/extension/deviceConfigure.js index e867a5786..9a220e143 100644 --- a/lib/extension/deviceConfigure.js +++ b/lib/extension/deviceConfigure.js @@ -42,11 +42,6 @@ class DeviceConfigure { } }); - // Setup an OnAfIncomingMsg handler if needed. - if (mappedDevice.onAfIncomingMsg) { - mappedDevice.onAfIncomingMsg.forEach((ep) => this.zigbee.registerOnAfIncomingMsg(ieeeAddr, ep)); - } - // Mark as configured this.configured.push(ieeeAddr); } diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index a997e239f..a4a88a2b2 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -382,6 +382,7 @@ const mapping = { '915005733701': [configurations.light_brightness_colortemp_colorxy], 'RB 285 C': [configurations.light_brightness_colortemp_colorxy], '3216331P5': [configurations.light_brightness_colortemp], + 'AC08562': [configurations.light_brightness], }; /** diff --git a/lib/zigbee.js b/lib/zigbee.js index 42dafd608..da5b6224e 100644 --- a/lib/zigbee.js +++ b/lib/zigbee.js @@ -2,7 +2,6 @@ const ZShepherd = require('zigbee-shepherd'); const logger = require('./util/logger'); const settings = require('./util/settings'); const data = require('./util/data'); -const zclPacket = require('zcl-packet'); const utils = require('./util/utils'); const advancedSettings = settings.get().advanced; @@ -210,21 +209,6 @@ class Zigbee { }); } - registerOnAfIncomingMsg(ieeeAddr, ep) { - const device = this.findDevice(ieeeAddr, ep); - device.onAfIncomingMsg = (message) => { - // Parse the message - zclPacket.parse(message.data, message.clusterid, (error, zclData) => { - const message = { - endpoints: [device], - data: zclData, - }; - - this.onMessage(message); - }); - }; - } - findDevice(deviceID, ep) { // Find device in zigbee-shepherd let device = this.getDevice(deviceID); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 8641db0d9..eccda673c 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -559,21 +559,6 @@ "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", "dev": true }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -952,20 +937,6 @@ "is-descriptor": "^1.0.0" } }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - } - }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -1396,14 +1367,14 @@ } }, "flat-cache": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.2.tgz", - "integrity": "sha512-KByBY8c98sLUAGpnmjEdWTrtrLZRtZdwds+kAL/ciFXTCb7AZgqKsAnVnYFQj1hxepwO8JKN/8AsRWwLq+RK0A==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", "dev": true, "requires": { "circular-json": "^0.3.1", - "del": "^3.0.0", "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", "write": "^0.2.1" } }, @@ -1512,27 +1483,6 @@ "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", "dev": true }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", @@ -1780,30 +1730,6 @@ "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", "dev": true }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3586,12 +3512,6 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -3643,27 +3563,6 @@ "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", "dev": true }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -4831,9 +4730,9 @@ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "zcl-id": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/zcl-id/-/zcl-id-0.2.0.tgz", - "integrity": "sha1-E5nV5ba6SbZtDVpQYgCGXTcRfo0=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/zcl-id/-/zcl-id-0.3.2.tgz", + "integrity": "sha1-O6v7HsvMgpujuy6/gyf2iQIxDsI=", "requires": { "busyman": "^0.3.0", "enum": "^2.3.0" @@ -4847,6 +4746,17 @@ "dissolve-chunks": "^1.3.0", "enum": "^2.3.0", "zcl-id": "^0.2.0" + }, + "dependencies": { + "zcl-id": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/zcl-id/-/zcl-id-0.2.0.tgz", + "integrity": "sha1-E5nV5ba6SbZtDVpQYgCGXTcRfo0=", + "requires": { + "busyman": "^0.3.0", + "enum": "^2.3.0" + } + } } }, "ziee": { @@ -4856,11 +4766,22 @@ "requires": { "busyman": "^0.3.0", "zcl-id": "^0.2.0" + }, + "dependencies": { + "zcl-id": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/zcl-id/-/zcl-id-0.2.0.tgz", + "integrity": "sha1-E5nV5ba6SbZtDVpQYgCGXTcRfo0=", + "requires": { + "busyman": "^0.3.0", + "enum": "^2.3.0" + } + } } }, "zigbee-shepherd": { - "version": "git+https://github.com/Koenkk/zigbee-shepherd.git#c3fdef2c30267573aa5821a0f2c51f21a700eff2", - "from": "git+https://github.com/Koenkk/zigbee-shepherd.git#c3fdef2c30267573aa5821a0f2c51f21a700eff2", + "version": "git+https://github.com/Koenkk/zigbee-shepherd.git#ce52ac4131e2a505af6197b4a26d2b5360e4eb80", + "from": "git+https://github.com/Koenkk/zigbee-shepherd.git#ce52ac4131e2a505af6197b4a26d2b5360e4eb80", "requires": { "areq": "^0.2.0", "busyman": "^0.3.0", @@ -4874,23 +4795,12 @@ "ziee": "^0.3.0", "zive": "^0.2.2", "zstack-constants": "^0.2.0" - }, - "dependencies": { - "zcl-id": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/zcl-id/-/zcl-id-0.3.2.tgz", - "integrity": "sha1-O6v7HsvMgpujuy6/gyf2iQIxDsI=", - "requires": { - "busyman": "^0.3.0", - "enum": "^2.3.0" - } - } } }, "zigbee-shepherd-converters": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-5.0.1.tgz", - "integrity": "sha512-1zGpuIastVmae5V7hLhISgUvqZkAUqbkL7rbailij7oxOZq0tluT199hfwtJpTNkJVfH65iH8q5TG7BaW7wmxQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-5.0.2.tgz", + "integrity": "sha512-+G4QkFGVg13Iyb4dW8vijaz305DpFoQTICqgconguCS5mhHJYORBKVVKQ1FywkdbDLIIkF4IYUyO+Y74vMhufg==", "requires": { "debounce": "*", "zcl-id": "*" @@ -5832,6 +5742,17 @@ "requires": { "busyman": "^0.3.0", "zcl-id": "^0.2.0" + }, + "dependencies": { + "zcl-id": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/zcl-id/-/zcl-id-0.2.0.tgz", + "integrity": "sha1-E5nV5ba6SbZtDVpQYgCGXTcRfo0=", + "requires": { + "busyman": "^0.3.0", + "enum": "^2.3.0" + } + } } }, "zstack-constants": { diff --git a/package.json b/package.json index 2bb1ed0d9..25df3b2cc 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,8 @@ "queue": "*", "rimraf": "*", "winston": "2.4.2", - "zcl-packet": "git+https://github.com/Koenkk/zcl-packet.git#fbd8c936bbd4be0597ad3e934be0ca722b0128a6", - "zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#c3fdef2c30267573aa5821a0f2c51f21a700eff2", - "zigbee-shepherd-converters": "5.0.1" + "zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#ce52ac4131e2a505af6197b4a26d2b5360e4eb80", + "zigbee-shepherd-converters": "5.0.2" }, "devDependencies": { "chai": "*",