diff --git a/docs/images/devices/1TST-EU.jpg b/docs/images/devices/1TST-EU.jpg new file mode 100644 index 000000000..86c353a16 Binary files /dev/null and b/docs/images/devices/1TST-EU.jpg differ diff --git a/docs/images/devices/3321-S.jpg b/docs/images/devices/3321-S.jpg new file mode 100644 index 000000000..dae0f33b9 Binary files /dev/null and b/docs/images/devices/3321-S.jpg differ diff --git a/docs/images/devices/45856GE.jpg b/docs/images/devices/45856GE.jpg new file mode 100644 index 000000000..a41e3e5c5 Binary files /dev/null and b/docs/images/devices/45856GE.jpg differ diff --git a/docs/images/devices/AIRAM-CTR.U.jpg b/docs/images/devices/AIRAM-CTR.U.jpg new file mode 100644 index 000000000..4ba202031 Binary files /dev/null and b/docs/images/devices/AIRAM-CTR.U.jpg differ diff --git a/docs/images/devices/E12-N14.jpg b/docs/images/devices/E12-N14.jpg new file mode 100644 index 000000000..0373c81e9 Binary files /dev/null and b/docs/images/devices/E12-N14.jpg differ diff --git a/docs/images/devices/GD-CZ-006.jpg b/docs/images/devices/GD-CZ-006.jpg new file mode 100644 index 000000000..1e259927f Binary files /dev/null and b/docs/images/devices/GD-CZ-006.jpg differ diff --git a/docs/images/devices/GL-D-003Z.jpg b/docs/images/devices/GL-D-003Z.jpg new file mode 100644 index 000000000..fbe78e06c Binary files /dev/null and b/docs/images/devices/GL-D-003Z.jpg differ diff --git a/docs/images/devices/HALIGHTDIMWWB22.jpg b/docs/images/devices/HALIGHTDIMWWB22.jpg new file mode 100644 index 000000000..3fdac88c0 Binary files /dev/null and b/docs/images/devices/HALIGHTDIMWWB22.jpg differ diff --git a/docs/images/devices/HGZB-20-DE.jpg b/docs/images/devices/HGZB-20-DE.jpg new file mode 100644 index 000000000..33be00f64 Binary files /dev/null and b/docs/images/devices/HGZB-20-DE.jpg differ diff --git a/docs/images/devices/L1531.jpg b/docs/images/devices/L1531.jpg new file mode 100644 index 000000000..f94f4224f Binary files /dev/null and b/docs/images/devices/L1531.jpg differ diff --git a/docs/images/devices/RB-178-T.jpg b/docs/images/devices/RB-178-T.jpg new file mode 100644 index 000000000..8f59699e9 Binary files /dev/null and b/docs/images/devices/RB-178-T.jpg differ diff --git a/docs/information/supported_devices.md b/docs/information/supported_devices.md index d4df82558..ef67299ef 100644 --- a/docs/information/supported_devices.md +++ b/docs/information/supported_devices.md @@ -2,7 +2,7 @@ *NOTE: This file has been generated, do not edit this file manually!* -Currently **159** devices are supported from **32** different vendors. +Currently **170** devices are supported from **34** different vendors. In case you own a Zigbee device which is **NOT** listed here, please see [How to support new devices](https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html). @@ -12,6 +12,7 @@ In case you own a Zigbee device which is **NOT** listed here, please see | Model | Description | Picture | | ------------- | ------------- | -------------------------- | | 4713407 | Airam LED OP A60 ZB 9W/827 E27 (on/off, brightness) | ![../images/devices/4713407.jpg](../images/devices/4713407.jpg) | +| AIRAM-CTR.U | Airam CTR.U remote (can only be used to control the Airam 4713407 bulb) (on/off) | ![../images/devices/AIRAM-CTR.U.jpg](../images/devices/AIRAM-CTR.U.jpg) | ### Belkin @@ -84,6 +85,7 @@ In case you own a Zigbee device which is **NOT** listed here, please see | ------------- | ------------- | -------------------------- | | 22670 | GE Link smart LED light bulb, BR30 soft white (2700K) (on/off, brightness) | ![../images/devices/22670.jpg](../images/devices/22670.jpg) | | 45852GE | GE ZigBee plug-in smart dimmer (on/off, brightness) | ![../images/devices/45852GE.jpg](../images/devices/45852GE.jpg) | +| 45856GE | GE In-wall smart switch (on/off) | ![../images/devices/45856GE.jpg](../images/devices/45856GE.jpg) | | 45857GE | GE ZigBee in-wall smart dimmer (on/off, brightness) | ![../images/devices/45857GE.jpg](../images/devices/45857GE.jpg) | ### Gledopto @@ -93,6 +95,8 @@ In case you own a Zigbee device which is **NOT** listed here, please see | GL-C-008 | Gledopto Zigbee LED controller RGB + CCT / RGBW / WWCW / Dimmer (on/off, brightness, color temperature, color xy) | ![../images/devices/GL-C-008.jpg](../images/devices/GL-C-008.jpg) | | GL-S-007Z | Gledopto Smart RGBW GU10 (on/off, brightness, color temperature, color xy) | ![../images/devices/GL-S-007Z.jpg](../images/devices/GL-S-007Z.jpg) | | GL-B-008Z | Gledopto Smart 12W E27 RGB / CW LED bulb (on/off, brightness, color temperature, color xy) | ![../images/devices/GL-B-008Z.jpg](../images/devices/GL-B-008Z.jpg) | +| GL-D-003Z | Gledopto LED RGB + CCT downlight (on/off, brightness, color temperature, color xy) | ![../images/devices/GL-D-003Z.jpg](../images/devices/GL-D-003Z.jpg) | +| GD-CZ-006 | Gledopto Zigbee LED Driver (on/off, brightness) | ![../images/devices/GD-CZ-006.jpg](../images/devices/GD-CZ-006.jpg) | ### HEIMAN @@ -107,7 +111,8 @@ In case you own a Zigbee device which is **NOT** listed here, please see | Model | Description | Picture | | ------------- | ------------- | -------------------------- | -| HALIGHTDIMWWE27 | Hive Active light dimmable (on/off, brightness) | ![../images/devices/HALIGHTDIMWWE27.jpg](../images/devices/HALIGHTDIMWWE27.jpg) | +| HALIGHTDIMWWE27 | Hive Active smart bulb white LED (E27) (on/off, brightness) | ![../images/devices/HALIGHTDIMWWE27.jpg](../images/devices/HALIGHTDIMWWE27.jpg) | +| HALIGHTDIMWWB22 | Hive Active smart bulb white LED (B22) (on/off, brightness) | ![../images/devices/HALIGHTDIMWWB22.jpg](../images/devices/HALIGHTDIMWWB22.jpg) | ### IKEA @@ -128,6 +133,7 @@ In case you own a Zigbee device which is **NOT** listed here, please see | L1527 | IKEA FLOALT LED light panel, dimmable, white spectrum (30x30 cm) (on/off, brightness, color temperature) | ![../images/devices/L1527.jpg](../images/devices/L1527.jpg) | | L1529 | IKEA FLOALT LED light panel, dimmable, white spectrum (60x60 cm) (on/off, brightness, color temperature) | ![../images/devices/L1529.jpg](../images/devices/L1529.jpg) | | L1528 | IKEA FLOALT LED light panel, dimmable, white spectrum (30x90 cm) (on/off, brightness, color temperature) | ![../images/devices/L1528.jpg](../images/devices/L1528.jpg) | +| L1531 | IKEA SURTE door light panel, dimmable, white spectrum (38x64 cm) (on/off, brightness, color temperature) | ![../images/devices/L1531.jpg](../images/devices/L1531.jpg) | | E1603 | IKEA TRADFRI control outlet (on/off) | ![../images/devices/E1603.jpg](../images/devices/E1603.jpg) | ### Innr @@ -139,6 +145,7 @@ In case you own a Zigbee device which is **NOT** listed here, please see | RB 285 C | Innr E27 Bulb RGBW (on/off, brightness, color temperature, color xy) | ![../images/devices/RB-285-C.jpg](../images/devices/RB-285-C.jpg) | | RB 165 | Innr E27 Bulb (on/off, brightness) | ![../images/devices/RB-165.jpg](../images/devices/RB-165.jpg) | | RB 175 W | Innr E27 Bulb warm dimming (on/off, brightness) | ![../images/devices/RB-175-W.jpg](../images/devices/RB-175-W.jpg) | +| RB 178 T | Innr Smart bulb tunable white E27 (on/off, brightness, color temperature) | ![../images/devices/RB-178-T.jpg](../images/devices/RB-178-T.jpg) | | RS 125 | Innr GU10 Spot (on/off, brightness) | ![../images/devices/RS-125.jpg](../images/devices/RS-125.jpg) | | RS 128 T | Innr GU10 Spot 350 lm, dimmable, white spectrum (on/off, brightness, color temperature) | ![../images/devices/RS-128-T.jpg](../images/devices/RS-128-T.jpg) | | RB 145 | Innr E14 Candle (on/off, brightness) | ![../images/devices/RB-145.jpg](../images/devices/RB-145.jpg) | @@ -260,6 +267,13 @@ In case you own a Zigbee device which is **NOT** listed here, please see | Z01-CIA19NAE26 | Sengled Element Touch (A19) (on/off, brightness) | ![../images/devices/Z01-CIA19NAE26.jpg](../images/devices/Z01-CIA19NAE26.jpg) | | Z01-A19NAE26 | Sengled Element Plus (A19) (on/off, brightness, color temperature) | ![../images/devices/Z01-A19NAE26.jpg](../images/devices/Z01-A19NAE26.jpg) | | E11-N1EA | Sengled Element Plus Color (A19) (on/off, brightness, color temperature, color xy) | ![../images/devices/E11-N1EA.jpg](../images/devices/E11-N1EA.jpg) | +| E12-N14 | Sengled Element Classic (BR30) (on/off, brightness) | ![../images/devices/E12-N14.jpg](../images/devices/E12-N14.jpg) | + +### Smart Home Pty + +| Model | Description | Picture | +| ------------- | ------------- | -------------------------- | +| HGZB-20-DE | Smart Home Pty Power plug (on/off) | ![../images/devices/HGZB-20-DE.jpg](../images/devices/HGZB-20-DE.jpg) | ### SmartThings @@ -268,6 +282,7 @@ In case you own a Zigbee device which is **NOT** listed here, please see | STSS-MULT-001 | SmartThings Multipurpose sensor (contact) | ![../images/devices/STSS-MULT-001.jpg](../images/devices/STSS-MULT-001.jpg) | | STS-PRS-251 | SmartThings Arrival sensor (presence) | ![../images/devices/STS-PRS-251.jpg](../images/devices/STS-PRS-251.jpg) | | 3325-S | SmartThings Motion sensor (2015 model) (occupancy and temperature) | ![../images/devices/3325-S.jpg](../images/devices/3325-S.jpg) | +| 3321-S | SmartThings Multi Sensor (2015 model) (contact and temperature) | ![../images/devices/3321-S.jpg](../images/devices/3321-S.jpg) | ### Sylvania @@ -320,6 +335,12 @@ In case you own a Zigbee device which is **NOT** listed here, please see | DJT11LM | Xiaomi Aqara vibration sensor (drop, tilt and touch) | ![../images/devices/DJT11LM.jpg](../images/devices/DJT11LM.jpg) | | ZNCLDJ11LM | Xiaomi Aqara curtain motor (open, close, stop, position) | ![../images/devices/ZNCLDJ11LM.jpg](../images/devices/ZNCLDJ11LM.jpg) | +### eCozy + +| Model | Description | Picture | +| ------------- | ------------- | -------------------------- | +| 1TST-EU | eCozy Smart heating thermostat (temperature, occupancy, un-/occupied heating, schedule) | ![../images/devices/1TST-EU.jpg](../images/devices/1TST-EU.jpg) | + ### ilux | Model | Description | Picture | diff --git a/docs/integration/home_assistant.md b/docs/integration/home_assistant.md index 91ee27a5c..cc304dea7 100644 --- a/docs/integration/home_assistant.md +++ b/docs/integration/home_assistant.md @@ -1112,6 +1112,20 @@ light: ``` {% endraw %} +### L1531 +{% raw %} +```yaml +light: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + color_temp: true + schema: "json" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + ### E1603 {% raw %} ```yaml @@ -1696,6 +1710,12 @@ switch: ``` {% endraw %} +### 1TST-EU +{% raw %} +```yaml +``` +{% endraw %} + ### 4058075816718 {% raw %} ```yaml @@ -1992,6 +2012,19 @@ light: ``` {% endraw %} +### HALIGHTDIMWWB22 +{% raw %} +```yaml +light: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + schema: "json" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + ### RB 185 C {% raw %} ```yaml @@ -2063,6 +2096,20 @@ light: ``` {% endraw %} +### RB 178 T +{% raw %} +```yaml +light: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + color_temp: true + schema: "json" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + ### RS 125 {% raw %} ```yaml @@ -2401,6 +2448,20 @@ light: ``` {% endraw %} +### 45856GE +{% raw %} +```yaml +switch: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + payload_off: "OFF" + payload_on: "ON" + value_template: "{{ value_json.state }}" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + ### 45857GE {% raw %} ```yaml @@ -2482,6 +2543,19 @@ light: ``` {% endraw %} +### E12-N14 +{% raw %} +```yaml +light: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + schema: "json" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + ### K2RGBW01 {% raw %} ```yaml @@ -2628,6 +2702,34 @@ light: ``` {% endraw %} +### GL-D-003Z +{% raw %} +```yaml +light: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + color_temp: true + xy: true + schema: "json" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + +### GD-CZ-006 +{% raw %} +```yaml +light: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + schema: "json" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + ### STSS-MULT-001 {% raw %} ```yaml @@ -2709,6 +2811,33 @@ binary_sensor: ``` {% endraw %} +### 3321-S +{% raw %} +```yaml +binary_sensor: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + payload_on: false + payload_off: true + value_template: "{{ value_json.contact }}" + device_class: "door" + +sensor: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + unit_of_measurement: "°C" + device_class: "temperature" + value_template: "{{ value_json.temperature }}" + json_attributes: + - "linkquality" + - "battery" + - "voltage" + - "last_seen" +``` +{% endraw %} + ### ZLED-2709 {% raw %} ```yaml @@ -3086,4 +3215,24 @@ light: ``` {% endraw %} +### AIRAM-CTR.U +{% raw %} +```yaml +``` +{% endraw %} + +### HGZB-20-DE +{% raw %} +```yaml +switch: + - platform: "mqtt" + state_topic: "zigbee2mqtt/" + availability_topic: "zigbee2mqtt/bridge/state" + payload_off: "OFF" + payload_on: "ON" + value_template: "{{ value_json.state }}" + command_topic: "zigbee2mqtt//set" +``` +{% endraw %} + diff --git a/lib/extension/deviceConfigure.js b/lib/extension/deviceConfigure.js index 9a220e143..3d82e4ebf 100644 --- a/lib/extension/deviceConfigure.js +++ b/lib/extension/deviceConfigure.js @@ -38,7 +38,7 @@ class DeviceConfigure { if (ok) { logger.info(`Succesfully configured ${friendlyName} ${ieeeAddr}`); } else { - logger.error(`Failed to configure ${friendlyName} ${ieeeAddr}`); + logger.error(`Failed to configure ${friendlyName} ${ieeeAddr} ('${msg}')`); } }); diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index adcf579d9..e3976852d 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -464,6 +464,13 @@ const mapping = { 'GL-B-008Z': [configurations.light_brightness_colortemp_colorxy], 'AV2010/25': [configurations.switch, configurations.sensor_power], 'E12-N14': [configurations.light_brightness], + '1TST-EU': [], + 'RB 178 T': [configurations.light_brightness_colortemp], + '45856GE': [configurations.switch], + 'GL-D-003Z': [configurations.light_brightness_colortemp_colorxy], + 'GD-CZ-006': [configurations.light_brightness], + 'AIRAM-CTR.U': [], + 'HGZB-20-DE': [configurations.switch], }; /** diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c6e398a17..5663840ca 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -207,9 +207,9 @@ } }, "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz", + "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==", "dev": true }, "acorn-jsx": { @@ -655,19 +655,10 @@ "readable-stream": "> 1.0.0 < 3.0.0" } }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", "dev": true }, "cc-znp": { @@ -712,9 +703,9 @@ "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -999,7 +990,7 @@ "dependencies": { "readable-stream": { "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "requires": { "core-util-is": "~1.0.0", @@ -1017,7 +1008,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { "core-util-is": "~1.0.0", @@ -1028,7 +1019,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } @@ -1143,9 +1134,9 @@ "dev": true }, "eslint": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.11.1.tgz", - "integrity": "sha512-gOKhM8JwlFOc2acbOrkYR05NW8M6DCMSvfcJiBB5NDxRE1gv8kbvxKaC9u69e6ZGEMWXcswA/7eKR229cEIpvg==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.12.0.tgz", + "integrity": "sha512-LntwyPxtOHrsJdcSwyQKVtHofPHdv+4+mFwEe91r2V13vqpM8yLr7b1sW+Oo/yheOPkWYsYlYJCkzlFAt8KV7g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1165,6 +1156,7 @@ "glob": "^7.1.2", "globals": "^11.7.0", "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "inquirer": "^6.1.0", "js-yaml": "^3.12.0", @@ -1179,7 +1171,6 @@ "pluralize": "^7.0.0", "progress": "^2.0.0", "regexpp": "^2.0.1", - "require-uncached": "^1.0.3", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", @@ -1575,6 +1566,16 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -1865,9 +1866,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -1892,7 +1893,7 @@ }, "json2yaml": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz", "integrity": "sha1-VBTZB/mBZYa4DFE+wuOusquBmmw=", "requires": { "remedial": "1.x" @@ -1979,7 +1980,7 @@ }, "log-utils": { "version": "0.2.1", - "resolved": "http://registry.npmjs.org/log-utils/-/log-utils-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/log-utils/-/log-utils-0.2.1.tgz", "integrity": "sha1-pMIXoN2aUFFdm5ICBgkas9TgMc8=", "requires": { "ansi-colors": "^0.2.0", @@ -2032,7 +2033,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mixin-object": { @@ -2058,7 +2059,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" @@ -2066,7 +2067,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } @@ -2180,7 +2181,7 @@ }, "mute-stream": { "version": "0.0.7", - "resolved": "http://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, "nan": { @@ -2215,7 +2216,7 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, "nice-try": { @@ -3443,7 +3444,7 @@ }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" @@ -3451,7 +3452,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" @@ -3534,15 +3535,24 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-tmpdir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -3550,7 +3560,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { @@ -3915,7 +3925,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -4022,16 +4032,6 @@ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, - "require-uncached": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", @@ -4042,9 +4042,9 @@ } }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "restore-cursor": { @@ -4058,11 +4058,11 @@ } }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "run-async": { @@ -4243,7 +4243,7 @@ }, "sprintf-js": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "stack-trace": { @@ -4270,7 +4270,7 @@ }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" @@ -4288,7 +4288,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" @@ -4323,7 +4323,7 @@ }, "stream-browserify": { "version": "2.0.1", - "resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { "inherits": "~2.0.1", @@ -4337,7 +4337,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { "code-point-at": "^1.0.0", @@ -4347,7 +4347,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" @@ -4355,7 +4355,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" @@ -4488,7 +4488,7 @@ }, "text-encoding": { "version": "0.6.4", - "resolved": "http://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", "dev": true }, @@ -4500,7 +4500,7 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, @@ -4624,7 +4624,7 @@ }, "underscore": { "version": "1.4.4", - "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=" }, "unique-stream": { @@ -4823,9 +4823,9 @@ } }, "zigbee-shepherd-converters": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-7.0.9.tgz", - "integrity": "sha512-LWPB6oGC1uXUl6gQuhf/8IZ4NcCKRAyX/Urf9JkXWt8g45IpX4WObPr5sa6l6zVKsF975ADvWnGXtWe5tg1o3Q==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-7.0.10.tgz", + "integrity": "sha512-8q7v5c0w7k159gp16EnecuPnvDRyGJokUhOoMTCG3J0dAbPzfvjNlBt7hrBeLIhhitbqkpa57FuXyYxPvQksxQ==", "requires": { "debounce": "*", "debug": "3.2.6", diff --git a/package.json b/package.json index 12286732d..b327d9464 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "winston": "2.4.2", "ziee": "*", "zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#bc2445dc0bb7a2a1d5b4a461c231e28d07f517e7", - "zigbee-shepherd-converters": "7.0.9", + "zigbee-shepherd-converters": "7.0.10", "zive": "*" }, "devDependencies": { diff --git a/test/deviceReceive.test.js b/test/deviceReceive.test.js index 7f3083a6b..f33d40bdb 100644 --- a/test/deviceReceive.test.js +++ b/test/deviceReceive.test.js @@ -142,12 +142,12 @@ describe('DeviceReceive', () => { chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected); }); - it('Should handle a zigbee message with voltage 2750', () => { + it('Should handle a zigbee message with voltage 2850', () => { const device = {ieeeAddr: '0x12345678'}; const message = utils.zigbeeMessage(device, 'genBasic', 'attReport', {'65281': {'1': 2850}}, 1); deviceReceive.onZigbeeMessage(message, device, WXKG02LM); chai.assert.isTrue(publishDeviceState.calledOnce); - const expected = {battery: 50, voltage: 2850}; + const expected = {battery: 35, voltage: 2850}; chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected); }); @@ -156,7 +156,16 @@ describe('DeviceReceive', () => { const message = utils.zigbeeMessage(device, 'genBasic', 'attReport', {'65281': {'1': 2650}}, 1); deviceReceive.onZigbeeMessage(message, device, WXKG02LM); chai.assert.isTrue(publishDeviceState.calledOnce); - const expected = {battery: 0, voltage: 2650}; + const expected = {battery: 14, voltage: 2650}; + chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected); + }); + + it('Should handle a zigbee message with voltage 2000', () => { + const device = {ieeeAddr: '0x12345678'}; + const message = utils.zigbeeMessage(device, 'genBasic', 'attReport', {'65281': {'1': 2000}}, 1); + deviceReceive.onZigbeeMessage(message, device, WXKG02LM); + chai.assert.isTrue(publishDeviceState.calledOnce); + const expected = {battery: 0, voltage: 2000}; chai.assert.deepEqual(utils.withoutLastSeen(publishDeviceState.getCall(0).args[1]), expected); }); });