diff --git a/.homeychangelog.json b/.homeychangelog.json index da12bb12..4c995517 100644 --- a/.homeychangelog.json +++ b/.homeychangelog.json @@ -190,5 +190,8 @@ }, "0.2.11": { "en": "New test version with a number of new deviced added." + }, + "0.2.12": { + "en": "Added support for a number of devices." } } diff --git a/.homeycompose/app.json b/.homeycompose/app.json index fd524b1b..4086ce00 100644 --- a/.homeycompose/app.json +++ b/.homeycompose/app.json @@ -1,6 +1,6 @@ { "id": "com.tuya.zigbee", - "version": "0.2.11", + "version": "0.2.12", "compatibility": ">=5.0.0", "platforms": [ "local" diff --git a/README.md b/README.md index da956940..cc2a21e0 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ Supported devices: _TZ3000_fllyghyj / TS0201 _TZ3000_8ybe88nf / TS0201 _TZ3000_fie1dpkm / TS0201 + _TZ3000_0s1izerx / TS0201 + TUYATEC-ojmxeikq / RH3052 + TUYATEC-riuj5xzs / RH3052 - LCD Temperature and Humidity Sensor _TZ2000_a476raq2 / TS0201 @@ -109,6 +112,10 @@ Supported devices: _TZ3000_rgchmad8 / TS0203 _TZ3000_au1rjicn / TS0203 _TZ3000_4ugnzsli / TS0203 + TUYATEC-7qunn4gq / RH3001 + _TZ3000_zgrffiwg / TS0203 + Immax / DoorWindow-Sensor-ZB3.0 + Visonic / MCT-340 E - Smart Door/Windows Sensor _TZ1800_ejwkn2h2 / TY0203 (Silvercrest / Lidl) @@ -164,6 +171,7 @@ Supported devices: _TZ3000_r6buo8ba / TS011F _TZ3000_2putqrmw / TS011F _TZ3000_5ity3zyu / TS0121 + _TZ3000_okaz9tjs / TS011F - Smart Plug, without metering _TZ3000_kdi2o9m6 / TS011F (Silvercrest / Lidl) @@ -188,6 +196,10 @@ Supported devices: _TYZB01_vkwryfdr / TS0115 _TZ3000_o005nuxx / TS011F (UseeLink) _TZ3000_cfnprab5 / TS011F + LELLKI / JZ-ZB-004 + +- Double Power Point, with metering + _TZ3210_7jnk7l3k / TS011F **In-Wall** - 1 Gang Switch Module @@ -224,11 +236,15 @@ Supported devices: _TZ3000_ktuoyvt5 / TS110F _TZ3210_zxbtub8r / TS110E _TZE200_la2c2uo9 / TS0601 + _TZ3210_weaqkhab / TS110E + _TZ3210_k1msuvg6 / TS110E - 2 Gang Dimmer Module _TYZB01_v8gtiaed / TS110F _TZ3000_92chsky7 / TS110F _TZE200_e3oitdyu / TS0601 + _TZ3210_wdexaypg / TS110E + _TZ3210_3mpwqzuu / TS110E **On-Wall** - 1 Gang Wall Switch @@ -274,6 +290,7 @@ Supported devices: _TZ3000_2dlwlvex / TS0003 _TZ3000_qcdqw8nf / TS0003 _TZ3000_vvlivusi / TS0003 + _TZ3000_5e5ptb24 / TS0013 - 4 Gang Wall Switch _TZ3000_r0pmi2p3 / TS0014 diff --git a/app.json b/app.json index 8ef63e3b..9ed7c908 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,7 @@ { "_comment": "This file is generated. Please edit .homeycompose/app.json instead.", "id": "com.tuya.zigbee", - "version": "0.2.11", + "version": "0.2.12", "compatibility": ">=5.0.0", "platforms": [ "local" @@ -653,6 +653,79 @@ ] } ] + }, + { + "id": "wall_remote_4_gang_buttons_3", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "The [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=wall_remote_4_gang_3" + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Button Action" + }, + "values": [ + { + "id": "leftUp-oneClick", + "label": { + "en": "Upper Left Button: 1 Click" + } + }, + { + "id": "leftUp-twoClicks", + "label": { + "en": "Upper Left Button: 2 Clicks" + } + }, + { + "id": "rightUp-oneClick", + "label": { + "en": "Upper Right Button: 1 Click" + } + }, + { + "id": "rightUp-twoClicks", + "label": { + "en": "Upper Right Button: 2 Clicks" + } + }, + { + "id": "leftDown-oneClick", + "label": { + "en": "Lower Left Button: 1 Click" + } + }, + { + "id": "leftDown-twoClicks", + "label": { + "en": "Lower Left Button: 2 Clicks" + } + }, + { + "id": "rightDown-oneClick", + "label": { + "en": "Lower Right Button: 1 Click" + } + }, + { + "id": "rightDown-twoClicks", + "label": { + "en": "Lower Right Button: 2 Clicks" + } + } + ] + } + ] } ] }, @@ -939,7 +1012,9 @@ "_TYZB01_qezuin6k", "_TZ3210_ngqk6jia", "_TZ3000_ktuoyvt5", - "_TZ3210_zxbtub8r" + "_TZ3210_zxbtub8r", + "_TZ3210_weaqkhab", + "_TZ3210_k1msuvg6" ], "productId": [ "TS110F", @@ -1069,10 +1144,13 @@ "zigbee": { "manufacturerName": [ "_TYZB01_v8gtiaed", - "_TZ3000_92chsky7" + "_TZ3000_92chsky7", + "_TZ3210_wdexaypg", + "_TZ3210_3mpwqzuu" ], "productId": [ - "TS110F" + "TS110F", + "TS110E" ], "endpoints": { "1": { @@ -1248,7 +1326,8 @@ "_TZ3000_7d8yme6f", "_TZ3000_rgchmad8", "_TZ3000_au1rjicn", - "_TZ3000_4ugnzsli" + "_TZ3000_4ugnzsli", + "TUYATEC-7qunn4gq" ], "productId": [ "RH3001", @@ -1306,11 +1385,15 @@ "manufacturerName": [ "TUYATEC-0l6xaqmi", "_TZ3000_7tbsruql", - "_TZ3000_osu834un" + "_TZ3000_osu834un", + "Immax", + "Visonic" ], "productId": [ "RH3001", - "TS0203" + "TS0203", + "DoorWindow-Sensor-ZB3.0", + "MCT-340 E" ], "endpoints": { "1": { @@ -1334,6 +1417,242 @@ }, "settings": [] }, + { + "id": "doorwindowsensor_3", + "name": { + "en": "Door & Window Sensor" + }, + "class": "sensor", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "alarm_contact", + "alarm_battery" + ], + "energy": { + "batteries": [ + "AAA", + "AAA" + ] + }, + "images": { + "large": "/drivers/doorwindowsensor_3/assets/images/large.png", + "small": "/drivers/doorwindowsensor_3/assets/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "_TZ3000_zgrffiwg" + ], + "productId": [ + "TS0203" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 1, + 1280 + ], + "bindings": [ + 1, + 1280 + ] + } + }, + "learnmode": { + "image": "/drivers/doorwindowsensor_3/assets/learn.svg", + "instruction": { + "en": "Insert a pin into the single hole on the side of the device and press it gently for aprox 10 seconds until the LED blinks rapidly." + } + } + }, + "settings": [] + }, + { + "id": "double_power_point", + "name": { + "en": "Double Power Point" + }, + "class": "socket", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "onoff", + "measure_power", + "meter_power", + "measure_current", + "measure_voltage" + ], + "capabilitiesOptions": { + "measure_power": { + "approximated": true + } + }, + "images": { + "large": "/drivers/double_power_point/assets/images/large.png", + "small": "/drivers/double_power_point/assets/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "_TZ3210_7jnk7l3k" + ], + "productId": [ + "TS011F" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 4, + 5, + 6, + 1794, + 2820 + ], + "bindings": [ + 6, + 1794, + 2820 + ] + } + }, + "learnmode": { + "instruction": { + "en": "Press and hold down on/off switch for aprox 5 seconds until the LED blinks rapidly." + } + } + }, + "subdevices": [ + { + "id": "seconddoublepowerpoint", + "name": { + "en": "Second Power Point" + }, + "class": "socket", + "capabilities": [ + "onoff", + "measure_power", + "meter_power", + "measure_current", + "measure_voltage" + ], + "capabilitiesOptions": { + "measure_power": { + "approximated": true + } + }, + "zigbee": { + "endpoints": { + "2": { + "clusters": [ + 0, + 4, + 5, + 6, + 1794, + 2820 + ], + "bindings": [ + 6, + 1794, + 2820 + ] + } + } + } + } + ], + "settings": [ + { + "id": "metering_offset", + "type": "number", + "label": { + "en": "Metering Correction Factor" + }, + "hint": { + "en": "Set a value to compensate if you experience that the Metered Power is not correct.\nRange: 0.8 - 1.2, step size 0.1, \ndefault: 1" + }, + "value": 1, + "attr": { + "min": 0.8, + "max": 1.2, + "step": 0.1 + } + }, + { + "id": "measure_offset", + "type": "number", + "label": { + "en": "Measure Correction Factor" + }, + "hint": { + "en": "Set a value to compensate if you experience that the Measured Power is not correct.\nRange: 0.8 - 1.2, step size 0.1, \ndefault: 1" + }, + "value": 1, + "attr": { + "min": 0.8, + "max": 1.2, + "step": 0.1 + } + }, + { + "id": "minReportPower", + "type": "number", + "label": { + "en": "Min report interval for power (s)" + }, + "hint": { + "en": "Min interval before a report is sent to Homey (s)" + }, + "value": 60, + "attr": { + "step": 1, + "min": 10, + "max": 86400 + } + }, + { + "id": "minReportCurrent", + "type": "number", + "label": { + "en": "Min report interval for current (s)" + }, + "hint": { + "en": "Min interval before a report is sent to Homey (s)" + }, + "value": 60, + "attr": { + "step": 1, + "min": 10, + "max": 86400 + } + }, + { + "id": "minReportVoltage", + "type": "number", + "label": { + "en": "Min report interval for voltage (s)" + }, + "hint": { + "en": "Min interval before a report is sent to Homey (s)" + }, + "value": 60, + "attr": { + "step": 1, + "min": 10, + "max": 86400 + } + } + ] + }, { "id": "flood_sensor", "name": { @@ -3403,7 +3722,8 @@ "_TZ3000_1h2x4akh", "_TZ3000_r6buo8ba", "_TZ3000_2putqrmw", - "_TZ3000_5ity3zyu" + "_TZ3000_5ity3zyu", + "_TZ3000_okaz9tjs" ], "productId": [ "TS0121", @@ -3913,6 +4233,135 @@ }, "settings": [] }, + { + "id": "socket_power_strip_four_three", + "name": { + "en": "Power Strip 4 Sockets" + }, + "class": "socket", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "onoff" + ], + "capabilitiesOptions": { + "measure_power": { + "approximated": true + } + }, + "images": { + "large": "/drivers/socket_power_strip_four_three/assets/images/large.png", + "small": "/drivers/socket_power_strip_four_three/assets/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "LELLKI" + ], + "productId": [ + "JZ-ZB-004" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 4, + 5, + 6 + ], + "bindings": [ + 6 + ] + }, + "2": { + "clusters": [ + 4, + 5, + 6 + ], + "bindings": [ + 6 + ] + }, + "3": { + "clusters": [ + 4, + 5, + 6 + ], + "bindings": [ + 6 + ] + }, + "4": { + "clusters": [ + 4, + 5, + 6 + ], + "bindings": [ + 6 + ] + } + }, + "devices": { + "socket2": { + "class": "socket", + "capabilities": [ + "onoff" + ], + "name": { + "en": "Power Strip Socket 2/4" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + } + }, + "socket3": { + "class": "socket", + "capabilities": [ + "onoff" + ], + "name": { + "en": "Power Strip Socket 3/4" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + } + }, + "socket4": { + "class": "socket", + "capabilities": [ + "onoff" + ], + "name": { + "en": "Power Strip Socket 4/4" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + } + } + }, + "learnmode": { + "instruction": { + "en": "A tile for each socket will be created. Press and hold down on/off switch for aprox 5 seconds until the LED blinks rapidly." + } + } + }, + "settings": [] + }, { "id": "socket_power_strip_four_two", "name": { @@ -4270,12 +4719,14 @@ "TUYATEC-gqhxixyk", "TUYATEC-vmgh3fxd", "TUYATEC-ojmxeikg", + "TUYATEC-ojmxeikq", "TUYATEC-1g3tawnp", "_TZ3000_i8jfiezr", "TUYATEC-v3uxbuxy", "_TZ3000_bguser20", "_TZ3000_8ybe88nf", - "_TZ3000_fie1dpkm" + "_TZ3000_fie1dpkm", + "TUYATEC-riuj5xzs" ], "productId": [ "RH3052", @@ -4417,7 +4868,8 @@ }, "zigbee": { "manufacturerName": [ - "_TZ3000_dowj6gyi" + "_TZ3000_dowj6gyi", + "_TZ3000_0s1izerx" ], "productId": [ "RH3052", @@ -5215,7 +5667,6 @@ "zigbee": { "manufacturerName": [ "_TZ3000_vp6clf9d", - "_TZ3000_wkai4ga5", "_TZ3000_ufhtxr59", "_TZ3000_ee8nrt2l" ], @@ -5318,6 +5769,79 @@ }, "settings": [] }, + { + "id": "wall_remote_4_gang_3", + "name": { + "en": "4 Gang Wall Remote" + }, + "class": "remote", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [], + "images": { + "large": "/drivers/wall_remote_4_gang_3/assets/images/large.png", + "small": "/drivers/wall_remote_4_gang_3/assets/images/small.png" + }, + "energy": { + "batteries": [ + "CR2032" + ] + }, + "zigbee": { + "manufacturerName": [ + "_TZ3000_wkai4ga5" + ], + "productId": [ + "TS0044" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 6 + ], + "bindings": [ + 6 + ] + }, + "2": { + "clusters": [ + 6 + ], + "bindings": [ + 6 + ] + }, + "3": { + "clusters": [ + 6 + ], + "bindings": [ + 6 + ] + }, + "4": { + "clusters": [ + 6 + ], + "bindings": [ + 6 + ] + } + }, + "learnmode": { + "image": "/drivers/wall_remote_4_gang_3/assets/icon.svg", + "instruction": { + "en": "Press the lower left button for aprox 10 seconds (all LED should start blinking)." + } + } + }, + "settings": [] + }, { "id": "wall_switch_1_gang", "name": { @@ -5510,7 +6034,8 @@ "_TZ3000_thhxrept", "_TZ3000_2dlwlvex", "_TZ3000_qcdqw8nf", - "_TZ3000_vvlivusi" + "_TZ3000_vvlivusi", + "_TZ3000_5e5ptb24" ], "productId": [ "TS0003", diff --git a/drivers/christmas_lights/device.js b/drivers/christmas_lights/device.js index f422b586..bed316ad 100644 --- a/drivers/christmas_lights/device.js +++ b/drivers/christmas_lights/device.js @@ -126,4 +126,17 @@ class christmas_lights extends TuyaSpecificClusterDevice { } -module.exports = christmas_lights; \ No newline at end of file +module.exports = christmas_lights; + +// Cluster 61184 is a custom cluster that is used to control the device. +// The device has 6 datapoints. +// 1: Boolean that controls on/off. +// 2: Enum that controls the mode (white, color, effect). +// 3: 32 bit integer that controls the dim level in white mode. +// 4: 32 bit integer that controls the dim level in color mode. +// 5: String that controls the color in color mode. +// 6: String that controls the effect in effect mode. +// The device does not report any of these attributes, so the app has to poll the device to get the current state. +// The device does report the on/off state, but the app does not use this, because it is not reliable. +// The device also reports the current mode, but the app does not use this, because it is not reliable. +// The device does not report the current dim level, color or effect, so the app has to poll the device to get the current state. \ No newline at end of file diff --git a/drivers/curtain_motor/device.js b/drivers/curtain_motor/device.js index 2c8c37d2..5c41d337 100644 --- a/drivers/curtain_motor/device.js +++ b/drivers/curtain_motor/device.js @@ -111,6 +111,15 @@ class CurtainMotor extends TuyaSpecificClusterDevice { module.exports = CurtainMotor; +// Cluster 61184 is a custom cluster that is used to control the curtain motor. +// The device has 5 datapoints. +// 1: position of the curtain. 32 bit integer, but only the first byte is used. The value is between 0 and 100. 0 is closed, 100 is open. +// 2: position (0-100). 32 bit integer, but only the first byte is used. The value is between 0 and 100. 0 is closed, 100 is open. +// 3: arrived (0/1). Boolean. 0 is false, 1 is true. +// 4: motor reverse (0/1). Boolean. 0 is false, 1 is true. +// 5: motor speed (0-100). 32 bit integer, but only the first byte is used. The value is between 0 and 100. 0 is slow, 100 is fast. + + // { // "ids": { // "modelId": "TS0601", diff --git a/drivers/dimmer_1_gang/driver.compose.json b/drivers/dimmer_1_gang/driver.compose.json index ae111ae4..21cd03cd 100644 --- a/drivers/dimmer_1_gang/driver.compose.json +++ b/drivers/dimmer_1_gang/driver.compose.json @@ -32,7 +32,9 @@ "_TYZB01_qezuin6k", "_TZ3210_ngqk6jia", "_TZ3000_ktuoyvt5", - "_TZ3210_zxbtub8r" + "_TZ3210_zxbtub8r", + "_TZ3210_weaqkhab", + "_TZ3210_k1msuvg6" ], "productId": [ "TS110F", diff --git a/drivers/dimmer_2_gang/driver.compose.json b/drivers/dimmer_2_gang/driver.compose.json index 10fda051..a24a02fc 100644 --- a/drivers/dimmer_2_gang/driver.compose.json +++ b/drivers/dimmer_2_gang/driver.compose.json @@ -30,10 +30,13 @@ "zigbee": { "manufacturerName": [ "_TYZB01_v8gtiaed", - "_TZ3000_92chsky7" + "_TZ3000_92chsky7", + "_TZ3210_wdexaypg", + "_TZ3210_3mpwqzuu" ], "productId": [ - "TS110F" + "TS110F", + "TS110E" ], "endpoints": { "1": { diff --git a/drivers/doorwindowsensor/driver.compose.json b/drivers/doorwindowsensor/driver.compose.json index 1ea0f956..016cf165 100644 --- a/drivers/doorwindowsensor/driver.compose.json +++ b/drivers/doorwindowsensor/driver.compose.json @@ -45,7 +45,8 @@ "_TZ3000_7d8yme6f", "_TZ3000_rgchmad8", "_TZ3000_au1rjicn", - "_TZ3000_4ugnzsli" + "_TZ3000_4ugnzsli", + "TUYATEC-7qunn4gq" ], "productId": [ "RH3001", diff --git a/drivers/doorwindowsensor_2/driver.compose.json b/drivers/doorwindowsensor_2/driver.compose.json index 0b35d4b3..a7f343c7 100644 --- a/drivers/doorwindowsensor_2/driver.compose.json +++ b/drivers/doorwindowsensor_2/driver.compose.json @@ -24,11 +24,15 @@ "manufacturerName": [ "TUYATEC-0l6xaqmi", "_TZ3000_7tbsruql", - "_TZ3000_osu834un" + "_TZ3000_osu834un", + "Immax", + "Visonic" ], "productId": [ "RH3001", - "TS0203" + "TS0203", + "DoorWindow-Sensor-ZB3.0", + "MCT-340 E" ], "endpoints": { "1": { diff --git a/drivers/doorwindowsensor_3/assets/icon.svg b/drivers/doorwindowsensor_3/assets/icon.svg new file mode 100644 index 00000000..00dd6000 --- /dev/null +++ b/drivers/doorwindowsensor_3/assets/icon.svg @@ -0,0 +1,104 @@ + +image/svg+xml + + + + diff --git a/drivers/doorwindowsensor_3/assets/images/large.png b/drivers/doorwindowsensor_3/assets/images/large.png new file mode 100644 index 00000000..e7cafc94 Binary files /dev/null and b/drivers/doorwindowsensor_3/assets/images/large.png differ diff --git a/drivers/doorwindowsensor_3/assets/images/small.png b/drivers/doorwindowsensor_3/assets/images/small.png new file mode 100644 index 00000000..dd65dd83 Binary files /dev/null and b/drivers/doorwindowsensor_3/assets/images/small.png differ diff --git a/drivers/doorwindowsensor_3/assets/learn.svg b/drivers/doorwindowsensor_3/assets/learn.svg new file mode 100644 index 00000000..a08e0c25 --- /dev/null +++ b/drivers/doorwindowsensor_3/assets/learn.svg @@ -0,0 +1,195 @@ + +image/svg+xml + + + + diff --git a/drivers/doorwindowsensor_3/device.js b/drivers/doorwindowsensor_3/device.js new file mode 100644 index 00000000..00a4d151 --- /dev/null +++ b/drivers/doorwindowsensor_3/device.js @@ -0,0 +1,32 @@ +'use strict'; + +const Homey = require('homey'); +const { ZigBeeDevice } = require('homey-zigbeedriver'); +const { CLUSTER } = require('zigbee-clusters'); + +class doorwindowsensor_3 extends ZigBeeDevice { + + async onNodeInit({zclNode}) { + + this.printNode(); + + // alarm_contact + zclNode.endpoints[1].clusters[CLUSTER.IAS_ZONE.NAME].onZoneStatusChangeNotification = payload => { + this.onIASZoneStatusChangeNotification(payload); + } + + } + + onIASZoneStatusChangeNotification({zoneStatus, extendedStatus, zoneId, delay,}) { + this.log('IASZoneStatusChangeNotification received:', zoneStatus, extendedStatus, zoneId, delay); + this.setCapabilityValue('alarm_contact', zoneStatus.alarm1).catch(this.error); + this.setCapabilityValue('alarm_battery', zoneStatus.battery).catch(this.error); + } + + onDeleted(){ + this.log("Door/Window Sensor removed") + } + +} + +module.exports = doorwindowsensor_3; \ No newline at end of file diff --git a/drivers/doorwindowsensor_3/driver.compose.json b/drivers/doorwindowsensor_3/driver.compose.json new file mode 100644 index 00000000..dc3ed82d --- /dev/null +++ b/drivers/doorwindowsensor_3/driver.compose.json @@ -0,0 +1,50 @@ +{ + "id": "doorwindowsensor_3", + "name": { + "en": "Door & Window Sensor" + }, + "class": "sensor", + "platforms": ["local"], + "connectivity": ["zigbee"], + "capabilities": [ + "alarm_contact", + "alarm_battery" + ], + "energy": { + "batteries": [ + "AAA", + "AAA" + ] + }, + "images": { + "large": "{{driverAssetsPath}}/images/large.png", + "small": "{{driverAssetsPath}}/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "_TZ3000_zgrffiwg" + ], + "productId": [ + "TS0203" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 1, + 1280 + ], + "bindings": [ + 1, + 1280 + ] + } + }, + "learnmode": { + "image": "{{driverAssetsPath}}/learn.svg", + "instruction": { + "en": "Insert a pin into the single hole on the side of the device and press it gently for aprox 10 seconds until the LED blinks rapidly." + } + } + } +} \ No newline at end of file diff --git a/drivers/doorwindowsensor_3/driver.settings.compose.json b/drivers/doorwindowsensor_3/driver.settings.compose.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/drivers/doorwindowsensor_3/driver.settings.compose.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/drivers/double_power_point/assets/icon.svg b/drivers/double_power_point/assets/icon.svg new file mode 100644 index 00000000..8be64b55 --- /dev/null +++ b/drivers/double_power_point/assets/icon.svg @@ -0,0 +1,301 @@ + +image/svg+xml + + + + diff --git a/drivers/double_power_point/assets/images/large.png b/drivers/double_power_point/assets/images/large.png new file mode 100644 index 00000000..3b553480 Binary files /dev/null and b/drivers/double_power_point/assets/images/large.png differ diff --git a/drivers/double_power_point/assets/images/small.png b/drivers/double_power_point/assets/images/small.png new file mode 100644 index 00000000..5ee44b96 Binary files /dev/null and b/drivers/double_power_point/assets/images/small.png differ diff --git a/drivers/double_power_point/device.js b/drivers/double_power_point/device.js new file mode 100644 index 00000000..83c552c4 --- /dev/null +++ b/drivers/double_power_point/device.js @@ -0,0 +1,109 @@ +'use strict'; + +const { ZigBeeDevice } = require('homey-zigbeedriver'); +const { CLUSTER, Cluster, ZCLDataTypes} = require('zigbee-clusters'); +const TuyaOnOffCluster = require('../../lib/TuyaOnOffCluster'); + +Cluster.addCluster(TuyaOnOffCluster); + +class doublepowerpoint extends ZigBeeDevice { + + async onNodeInit({zclNode}) { + + this.printNode(); + + const { subDeviceId } = this.getData(); + this.log('Device data: ', subDeviceId); + + let options = {}; + + switch (subDeviceId) { + case 'seconddoublepowerpoint': + options.endpoint = 2; + break; + default: + options.endpoint = 1; + break; + } + + this.meteringOffset = this.getSetting('metering_offset'); + this.measureOffset = this.getSetting('measure_offset') * 100; + this.minReportPower= this.getSetting('minReportPower') * 1000; + this.minReportCurrent = this.getSetting('minReportCurrent') * 1000; + this.minReportVoltage = this.getSetting('minReportVoltage') * 1000; + + if (!this.hasCapability('measure_current')) { + await this.addCapability('measure_current').catch(this.error);; + } + + if (!this.hasCapability('measure_voltage')) { + await this.addCapability('measure_voltage').catch(this.error);; + } + + // onOff + this.registerCapability('onoff', CLUSTER.ON_OFF, options, { + getOpts: { + getOnStart: true, + pollInterval: 60000 + } + }); + + // meter_power + this.registerCapability('meter_power', CLUSTER.METERING, options, { + reportParser: value => (value * this.meteringOffset)/100.0, + getParser: value => (value * this.meteringOffset)/100.0, + getOpts: { + getOnStart: true, + pollInterval: 300000 + } + }); + + // measure_power + this.registerCapability('measure_power', CLUSTER.ELECTRICAL_MEASUREMENT, options, { + reportParser: value => { + return (value * this.measureOffset)/100; + }, + getOpts: { + getOnStart: true, + pollInterval: this.minReportPower + } + }); + + this.registerCapability('measure_current', CLUSTER.ELECTRICAL_MEASUREMENT, options, { + reportParser: value => { + return value/1000; + }, + getOpts: { + getOnStart: true, + pollInterval: this.minReportCurrent + } + }); + + this.registerCapability('measure_voltage', CLUSTER.ELECTRICAL_MEASUREMENT, options, { + reportParser: value => { + return value; + }, + getOpts: { + getOnStart: true, + pollInterval: this.minReportVoltage + } + }); + + await zclNode.endpoints[1].clusters.basic.readAttributes('manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 'attributeReportingStatus') + .catch(err => { + this.error('Error when reading device attributes ', err); + }); + + } + + onDeleted() { + this.log("Double Power Point removed") + } + + async onSettings({oldSettings, newSettings, changedKeys}) { + + } +} + +module.exports = doublepowerpoint; + diff --git a/drivers/double_power_point/driver.compose.json b/drivers/double_power_point/driver.compose.json new file mode 100644 index 00000000..a620584d --- /dev/null +++ b/drivers/double_power_point/driver.compose.json @@ -0,0 +1,73 @@ +{ + "id": "doublepowerpoint", + "name": { + "en": "Double Power Point" + }, + "class": "socket", + "platforms": ["local"], + "connectivity": ["zigbee"], + "capabilities": [ + "onoff", + "measure_power", + "meter_power", + "measure_current", + "measure_voltage" + ], + "capabilitiesOptions": { + "measure_power": { + "approximated": true + } + }, + "images": { + "large": "{{driverAssetsPath}}/images/large.png", + "small": "{{driverAssetsPath}}/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "_TZ3210_7jnk7l3k" + ], + "productId": [ + "TS011F" + ], + "endpoints": { + "1": { + "clusters": [0, 4, 5, 6, 1794, 2820], + "bindings": [6, 1794, 2820] + } + }, + "learnmode": { + "instruction": { + "en": "Press and hold down on/off switch for aprox 5 seconds until the LED blinks rapidly." + } + } + }, + "subdevices": [ + { + "id": "seconddoublepowerpoint", + "name": { + "en": "Second Power Point" + }, + "class": "socket", + "capabilities": [ + "onoff", + "measure_power", + "meter_power", + "measure_current", + "measure_voltage" + ], + "capabilitiesOptions": { + "measure_power": { + "approximated": true + } + }, + "zigbee": { + "endpoints": { + "2": { + "clusters": [0, 4, 5, 6, 1794, 2820], + "bindings": [6, 1794, 2820] + } + } + } + } + ] +} diff --git a/drivers/double_power_point/driver.settings.compose.json b/drivers/double_power_point/driver.settings.compose.json new file mode 100644 index 00000000..4ec5f95d --- /dev/null +++ b/drivers/double_power_point/driver.settings.compose.json @@ -0,0 +1,82 @@ +[ + { + "id": "metering_offset", + "type": "number", + "label": { + "en": "Metering Correction Factor" + }, + "hint": { + "en": "Set a value to compensate if you experience that the Metered Power is not correct.\nRange: 0.8 - 1.2, step size 0.1, \ndefault: 1" + }, + "value": 1, + "attr": { + "min": 0.8, + "max": 1.2, + "step": 0.1 + } + }, + { + "id": "measure_offset", + "type": "number", + "label": { + "en": "Measure Correction Factor" + }, + "hint": { + "en": "Set a value to compensate if you experience that the Measured Power is not correct.\nRange: 0.8 - 1.2, step size 0.1, \ndefault: 1" + }, + "value": 1, + "attr": { + "min": 0.8, + "max": 1.2, + "step": 0.1 + } + }, + { + "id": "minReportPower", + "type": "number", + "label": { + "en": "Min report interval for power (s)" + }, + "hint": { + "en": "Min interval before a report is sent to Homey (s)" + }, + "value": 60, + "attr": { + "step": 1, + "min": 10, + "max": 86400 + } + }, + { + "id": "minReportCurrent", + "type": "number", + "label": { + "en": "Min report interval for current (s)" + }, + "hint": { + "en": "Min interval before a report is sent to Homey (s)" + }, + "value": 60, + "attr": { + "step": 1, + "min": 10, + "max": 86400 + } + }, + { + "id": "minReportVoltage", + "type": "number", + "label": { + "en": "Min report interval for voltage (s)" + }, + "hint": { + "en": "Min interval before a report is sent to Homey (s)" + }, + "value": 60, + "attr": { + "step": 1, + "min": 10, + "max": 86400 + } + } +] diff --git a/drivers/smartplug/driver.compose.json b/drivers/smartplug/driver.compose.json index 9b7d372d..24e0dd9e 100644 --- a/drivers/smartplug/driver.compose.json +++ b/drivers/smartplug/driver.compose.json @@ -59,7 +59,8 @@ "_TZ3000_1h2x4akh", "_TZ3000_r6buo8ba", "_TZ3000_2putqrmw", - "_TZ3000_5ity3zyu" + "_TZ3000_5ity3zyu", + "_TZ3000_okaz9tjs" ], "productId": [ "TS0121", diff --git a/drivers/socket_power_strip_four_three/assets/icon.svg b/drivers/socket_power_strip_four_three/assets/icon.svg new file mode 100644 index 00000000..9ef4546a --- /dev/null +++ b/drivers/socket_power_strip_four_three/assets/icon.svg @@ -0,0 +1,256 @@ + +image/svg+xml + + + + diff --git a/drivers/socket_power_strip_four_three/assets/images/large.png b/drivers/socket_power_strip_four_three/assets/images/large.png new file mode 100644 index 00000000..0d71eb9c Binary files /dev/null and b/drivers/socket_power_strip_four_three/assets/images/large.png differ diff --git a/drivers/socket_power_strip_four_three/assets/images/small.png b/drivers/socket_power_strip_four_three/assets/images/small.png new file mode 100644 index 00000000..ec169ce7 Binary files /dev/null and b/drivers/socket_power_strip_four_three/assets/images/small.png differ diff --git a/drivers/socket_power_strip_four_three/device.js b/drivers/socket_power_strip_four_three/device.js new file mode 100644 index 00000000..dada4e27 --- /dev/null +++ b/drivers/socket_power_strip_four_three/device.js @@ -0,0 +1,35 @@ +'use strict'; + +const Homey = require('homey'); +const { ZigBeeDevice } = require('homey-zigbeedriver'); +const { debug, CLUSTER } = require('zigbee-clusters'); + +class socket_power_strip_four_three extends ZigBeeDevice { + + async onNodeInit({zclNode}) { + + this.printNode(); + + const { subDeviceId } = this.getData(); + this.log("Device data: ", subDeviceId); + + this.registerCapability('onoff', CLUSTER.ON_OFF, { + endpoint: subDeviceId === 'socket2' ? 2 : subDeviceId === 'socket3' ? 3 : subDeviceId === 'socket4' ? 4 : 1, + }); + + if (!this.isSubDevice()) { + await zclNode.endpoints[1].clusters.basic.readAttributes('manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 'attributeReportingStatus') + .catch(err => { + this.error('Error when reading device attributes ', err); + }); + } + + } + + onDeleted(){ + this.log("Power Strip removed") + } + +} + +module.exports = socket_power_strip_four_three; \ No newline at end of file diff --git a/drivers/socket_power_strip_four_three/driver.compose.json b/drivers/socket_power_strip_four_three/driver.compose.json new file mode 100644 index 00000000..6af3e53b --- /dev/null +++ b/drivers/socket_power_strip_four_three/driver.compose.json @@ -0,0 +1,93 @@ +{ + "id": "socket_power_strip_four_three", + "name": { + "en": "Power Strip 4 Sockets" + }, + "class": "socket", + "platforms": ["local"], + "connectivity": ["zigbee"], + "capabilities": [ + "onoff" + ], + "capabilitiesOptions": { + "measure_power": { + "approximated": true + } + }, + "images": { + "large": "{{driverAssetsPath}}/images/large.png", + "small": "{{driverAssetsPath}}/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "LELLKI" + ], + "productId": [ + "JZ-ZB-004" + ], + "endpoints": { + "1": { + "clusters": [0, 4, 5, 6], + "bindings": [6] + }, + "2": { + "clusters": [4, 5, 6], + "bindings": [6] + }, + "3": { + "clusters": [4, 5, 6], + "bindings": [6] + }, + "4": { + "clusters": [4, 5, 6], + "bindings": [6] + } + }, + "devices": { + "socket2": { + "class": "socket", + "capabilities": ["onoff"], + "name": { + "en": "Power Strip Socket 2/4" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + } + }, + "socket3": { + "class": "socket", + "capabilities": ["onoff"], + "name": { + "en": "Power Strip Socket 3/4" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + } + }, + "socket4": { + "class": "socket", + "capabilities": ["onoff"], + "name": { + "en": "Power Strip Socket 4/4" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + } + } + }, + "learnmode": { + "instruction": { + "en": "A tile for each socket will be created. Press and hold down on/off switch for aprox 5 seconds until the LED blinks rapidly." + } + } + } +} \ No newline at end of file diff --git a/drivers/socket_power_strip_four_three/driver.js b/drivers/socket_power_strip_four_three/driver.js new file mode 100644 index 00000000..89d87c08 --- /dev/null +++ b/drivers/socket_power_strip_four_three/driver.js @@ -0,0 +1,10 @@ + +'use strict'; + +const { ZigBeeDriver } = require('homey-zigbeedriver'); + +class socket_power_strip_four_three extends ZigBeeDriver { + +} + +module.exports = socket_power_strip_four_three; \ No newline at end of file diff --git a/drivers/socket_power_strip_four_three/driver.settings.compose.json b/drivers/socket_power_strip_four_three/driver.settings.compose.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/drivers/socket_power_strip_four_three/driver.settings.compose.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/drivers/socket_power_strip_four_two/driver.compose.json b/drivers/socket_power_strip_four_two/driver.compose.json index 1a226804..796adbea 100644 --- a/drivers/socket_power_strip_four_two/driver.compose.json +++ b/drivers/socket_power_strip_four_two/driver.compose.json @@ -1,5 +1,5 @@ { - "id": "socket_power_strip_four", + "id": "socket_power_strip_four_two", "name": { "en": "Power Strip 4 Sockets" }, diff --git a/drivers/temphumidsensor/driver.compose.json b/drivers/temphumidsensor/driver.compose.json index f8f31270..e55958eb 100644 --- a/drivers/temphumidsensor/driver.compose.json +++ b/drivers/temphumidsensor/driver.compose.json @@ -31,12 +31,14 @@ "TUYATEC-gqhxixyk", "TUYATEC-vmgh3fxd", "TUYATEC-ojmxeikg", + "TUYATEC-ojmxeikq", "TUYATEC-1g3tawnp", "_TZ3000_i8jfiezr", "TUYATEC-v3uxbuxy", "_TZ3000_bguser20", "_TZ3000_8ybe88nf", - "_TZ3000_fie1dpkm" + "_TZ3000_fie1dpkm", + "TUYATEC-riuj5xzs" ], "productId": [ "RH3052", diff --git a/drivers/temphumidsensor2/driver.compose.json b/drivers/temphumidsensor2/driver.compose.json index fbe5ee28..b774fc91 100644 --- a/drivers/temphumidsensor2/driver.compose.json +++ b/drivers/temphumidsensor2/driver.compose.json @@ -23,7 +23,8 @@ }, "zigbee": { "manufacturerName": [ - "_TZ3000_dowj6gyi" + "_TZ3000_dowj6gyi", + "_TZ3000_0s1izerx" ], "productId": [ "RH3052", diff --git a/drivers/wall_remote_4_gang/driver.compose.json b/drivers/wall_remote_4_gang/driver.compose.json index 0a8f63f3..492b80e2 100644 --- a/drivers/wall_remote_4_gang/driver.compose.json +++ b/drivers/wall_remote_4_gang/driver.compose.json @@ -20,7 +20,6 @@ "zigbee": { "manufacturerName": [ "_TZ3000_vp6clf9d", - "_TZ3000_wkai4ga5", "_TZ3000_ufhtxr59", "_TZ3000_ee8nrt2l" ], diff --git a/drivers/wall_remote_4_gang_3/assets/icon.svg b/drivers/wall_remote_4_gang_3/assets/icon.svg new file mode 100644 index 00000000..cc928ed3 --- /dev/null +++ b/drivers/wall_remote_4_gang_3/assets/icon.svg @@ -0,0 +1,119 @@ + +image/svg+xml + + + + diff --git a/drivers/wall_remote_4_gang_3/assets/images/large.png b/drivers/wall_remote_4_gang_3/assets/images/large.png new file mode 100644 index 00000000..4093bcd5 Binary files /dev/null and b/drivers/wall_remote_4_gang_3/assets/images/large.png differ diff --git a/drivers/wall_remote_4_gang_3/assets/images/small.png b/drivers/wall_remote_4_gang_3/assets/images/small.png new file mode 100644 index 00000000..3b1ceefb Binary files /dev/null and b/drivers/wall_remote_4_gang_3/assets/images/small.png differ diff --git a/drivers/wall_remote_4_gang_3/device.js b/drivers/wall_remote_4_gang_3/device.js new file mode 100644 index 00000000..4368589a --- /dev/null +++ b/drivers/wall_remote_4_gang_3/device.js @@ -0,0 +1,285 @@ +'use strict'; + +const { ZigBeeDevice } = require('homey-zigbeedriver'); +// const { CLUSTER } = require('zigbee-clusters'); + +class wall_remote_4_gang_3 extends ZigBeeDevice { + + async onNodeInit({zclNode}) { + + var debounce = 0; + this.printNode(); + + const node = await this.homey.zigbee.getNode(this); + node.handleFrame = (endpointId, clusterId, frame, meta) => { + if (clusterId === 6) { + this.log("endpointId:", endpointId,", clusterId:", clusterId,", frame:", frame, ", meta:", meta); + this.log("Frame JSON data:", frame.toJSON()); + frame = frame.toJSON(); + if (endpointId === 1) { + this.buttonCommandParser(endpointId, frame); + } else { + debounce = debounce+1; + if (debounce===1){ + this.buttonCommandParser(endpointId, frame); + } else { + debounce=0; + } + } + } + }; + + this._buttonPressedTriggerDevice = this.homey.flow.getDeviceTriggerCard('wall_remote_4_gang_buttons') + .registerRunListener(async (args, state) => { + return (null, args.action === state.action); + }); + + } + + buttonCommandParser(ep, frame) { + var button = ep === 1 ? 'leftUp' : ep === 2 ? 'rightUp' : ep === 3 ? 'leftDown' : 'rightDown'; + var action = frame.data[3] === 0 ? 'oneClick' : 'twoClicks'; + return this._buttonPressedTriggerDevice.trigger(this, {}, { action: `${button}-${action}` }) + .then(() => this.log(`Triggered 4 Gang Wall Remote, action=${button}-${action}`)) + .catch(err => this.error('Error triggering 4 Gang Wall Remote', err)); + } + + onDeleted(){ + this.log("4 Gang Wall Remote removed") + } + +} + +module.exports = wall_remote_4_gang_3; + + + +/* + "ids": { + "modelId": "TS0044", + "manufacturerName": "_TZ3000_wkai4ga5" + }, + "endpoints": { + "endpointDescriptors": [ + { + "endpointId": 1, + "applicationProfileId": 260, + "applicationDeviceId": 0, + "applicationDeviceVersion": 0, + "_reserved1": 1, + "inputClusters": [ + 0, + 1, + 6 + ], + "outputClusters": [ + 25, + 10 + ] + }, + { + "endpointId": 2, + "applicationProfileId": 260, + "applicationDeviceId": 0, + "applicationDeviceVersion": 0, + "_reserved1": 1, + "inputClusters": [ + 1, + 6 + ], + "outputClusters": [] + }, + { + "endpointId": 3, + "applicationProfileId": 260, + "applicationDeviceId": 0, + "applicationDeviceVersion": 0, + "_reserved1": 1, + "inputClusters": [ + 1, + 6 + ], + "outputClusters": [] + }, + { + "endpointId": 4, + "applicationProfileId": 260, + "applicationDeviceId": 0, + "applicationDeviceVersion": 0, + "_reserved1": 1, + "inputClusters": [ + 1, + 6 + ], + "outputClusters": [] + } + ], + "endpoints": { + "1": { + "clusters": { + "basic": { + "attributes": [ + { + "acl": [ + "readable", + "reportable" + ], + "id": 0, + "name": "zclVersion", + "value": 3 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 1, + "name": "appVersion", + "value": 66 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 2, + "name": "stackVersion", + "value": 0 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 3, + "name": "hwVersion", + "value": 1 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 4, + "name": "manufacturerName", + "value": "_TZ3000_wkai4ga5" + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 5, + "name": "modelId", + "value": "TS0044" + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 6, + "name": "dateCode", + "value": "" + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 7, + "name": "powerSource", + "value": "battery" + }, + { + "acl": [ + "readable", + "writable", + "reportable" + ], + "id": 65502 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 65533, + "name": "clusterRevision", + "value": 2 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 65534, + "name": "attributeReportingStatus", + "value": "PENDING" + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 65504 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 65505 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 65506 + }, + { + "acl": [ + "readable", + "reportable" + ], + "id": 65507 + } + ] + }, + "powerConfiguration": {}, + "onOff": {} + }, + "bindings": { + "ota": {}, + "time": {} + } + }, + "2": { + "clusters": { + "powerConfiguration": {}, + "onOff": {} + }, + "bindings": {} + }, + "3": { + "clusters": { + "powerConfiguration": {}, + "onOff": {} + }, + "bindings": {} + }, + "4": { + "clusters": { + "powerConfiguration": {}, + "onOff": {} + }, + "bindings": {} + } + } + } + +*/ + + + \ No newline at end of file diff --git a/drivers/wall_remote_4_gang_3/driver.compose.json b/drivers/wall_remote_4_gang_3/driver.compose.json new file mode 100644 index 00000000..a7e37475 --- /dev/null +++ b/drivers/wall_remote_4_gang_3/driver.compose.json @@ -0,0 +1,53 @@ +{ + "id": "wall_remote_4_gang_3", + "name": { + "en": "4 Gang Wall Remote" + }, + "class": "remote", + "platforms": ["local"], + "connectivity": ["zigbee"], + "capabilities": [ + ], + "images": { + "large": "{{driverAssetsPath}}/images/large.png", + "small": "{{driverAssetsPath}}/images/small.png" + }, + "energy": { + "batteries": [ + "CR2032" + ] + }, + "zigbee": { + "manufacturerName": [ + "_TZ3000_wkai4ga5" + ], + "productId": [ + "TS0044" + ], + "endpoints": { + "1": { + "clusters": [0, 6], + "bindings": [6] + }, + "2": { + "clusters": [6], + "bindings": [6] + }, + "3": { + "clusters": [6], + "bindings": [6] + }, + "4": { + "clusters": [6], + "bindings": [6] + } + }, + "learnmode": { + "image": "{{driverAssetsPath}}/icon.svg", + "instruction": { + "en": "Press the lower left button for aprox 10 seconds (all LED should start blinking)." + } + } + } + +} \ No newline at end of file diff --git a/drivers/wall_remote_4_gang_3/driver.flow.compose.json b/drivers/wall_remote_4_gang_3/driver.flow.compose.json new file mode 100644 index 00000000..7779d602 --- /dev/null +++ b/drivers/wall_remote_4_gang_3/driver.flow.compose.json @@ -0,0 +1,66 @@ +{ + "triggers": [ + { + "id": "wall_remote_4_gang_buttons_3", + "title": {"en": "Button Action"}, + "titleFormatted": {"en": "The [[action]]"}, + "args": [ + { + "name": "action", + "type": "dropdown", + "title": {"en": "Button Action"}, + "values": [ + { + "id": "leftUp-oneClick", + "label": { + "en": "Upper Left Button: 1 Click" + } + }, + { + "id": "leftUp-twoClicks", + "label": { + "en": "Upper Left Button: 2 Clicks" + } + }, + { + "id": "rightUp-oneClick", + "label": { + "en": "Upper Right Button: 1 Click" + } + }, + { + "id": "rightUp-twoClicks", + "label": { + "en": "Upper Right Button: 2 Clicks" + } + }, + { + "id": "leftDown-oneClick", + "label": { + "en": "Lower Left Button: 1 Click" + } + }, + { + "id": "leftDown-twoClicks", + "label": { + "en": "Lower Left Button: 2 Clicks" + } + }, + { + "id": "rightDown-oneClick", + "label": { + "en": "Lower Right Button: 1 Click" + } + }, + { + "id": "rightDown-twoClicks", + "label": { + "en": "Lower Right Button: 2 Clicks" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/drivers/wall_remote_4_gang_3/driver.settings.compose.json b/drivers/wall_remote_4_gang_3/driver.settings.compose.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/drivers/wall_remote_4_gang_3/driver.settings.compose.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/drivers/wall_switch_3_gang/driver.compose.json b/drivers/wall_switch_3_gang/driver.compose.json index 2bd04bca..8654b97a 100644 --- a/drivers/wall_switch_3_gang/driver.compose.json +++ b/drivers/wall_switch_3_gang/driver.compose.json @@ -31,7 +31,8 @@ "_TZ3000_thhxrept", "_TZ3000_2dlwlvex", "_TZ3000_qcdqw8nf", - "_TZ3000_vvlivusi" + "_TZ3000_vvlivusi", + "_TZ3000_5e5ptb24" ], "productId": [ "TS0003", diff --git a/lib/TuyaOnOffCluster.js b/lib/TuyaOnOffCluster.js index f7d697b1..49a4e7cd 100644 --- a/lib/TuyaOnOffCluster.js +++ b/lib/TuyaOnOffCluster.js @@ -20,7 +20,7 @@ class TuyaOnOffCluster extends OnOffCluster { ...super.ATTRIBUTES, childLock: { id: 0x8000, type: ZCLDataTypes.bool}, indicatorMode: { id: 0x8001, type: ZCLDataTypes.enum8IndicatorMode}, - relayStatus: { id: 0x8002, type: ZCLDataTypes.enum8RelayStatus}, + relayStatus: { id: 0x8002, type: ZCLDataTypes.enum8RelayStatus} }; } } diff --git a/lib/TuyaSpecificClusterDevice.js b/lib/TuyaSpecificClusterDevice.js index 4d7cc8e6..9924de50 100644 --- a/lib/TuyaSpecificClusterDevice.js +++ b/lib/TuyaSpecificClusterDevice.js @@ -77,15 +77,13 @@ class TuyaSpecificClusterDevice extends ZigBeeDevice { // data temperature (in degrees Celsius) * 10 // Radiator Actuator Functions - async setRadiatorActuatorOn(value) { +/* async setRadiatorActuatorOn(value) { return this.writeEnum(0x0101, value ? 1 : 0); } async setRadiatorActuatorTemperature(value) { return this.writeData32(0x0203, value * 10); - } - - + } */ } diff --git a/lib/TuyapowerOnState.js b/lib/TuyapowerOnState.js new file mode 100644 index 00000000..c70542cf --- /dev/null +++ b/lib/TuyapowerOnState.js @@ -0,0 +1,31 @@ +'use strict'; + +const { ZCLDataTypes} = require('zigbee-clusters'); + +ZCLDataTypes.enum8IndicatorMode = ZCLDataTypes.enum8({ + Off : 0x00, + Status : 0x01, + Position : 0x02 +}); +ZCLDataTypes.enum8RelayStatus = ZCLDataTypes.enum8({ + Off : 0x00, + On : 0x01, + Recover : 0x02 +}); + +class TuyaOnOffCluster extends OnOffCluster { + + static get ATTRIBUTES() { + return { + ...super.ATTRIBUTES, + powerOnstate: { id: 53264, type: ZCLDataTypes.enum8 ({ + off: 0, // OFF (0) - off after power loss (default) + on: 1, // ON (1) - on after power loss + Recover: 2, // RECOVER (2) - last state after power loss + }) + } + }; + } +} + +module.exports = TuyaPowerOnStateCluster; diff --git a/package-lock.json b/package-lock.json index f222f0dc..0bbc032e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "com.tuya.zigbee", - "version": "0.2.11", + "version": "0.2.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 84fd37ea..de42fb7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.tuya.zigbee", - "version": "0.2.11", + "version": "0.2.12", "description": "Adds support for Tuya Zigbee devices to Homey", "main": "app.js", "scripts": {