zigbee-herdsman-converters 15.0.11 → 15.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -119,4 +119,12 @@ module.exports = [
119
119
  await reporting.onOff(endpoint);
120
120
  },
121
121
  },
122
+ {
123
+ zigbeeModel: ['Extended Color LED Strip V1.0'],
124
+ model: '81863',
125
+ vendor: 'AduroSmart',
126
+ description: 'Eria color LED strip',
127
+ extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true, colorTempRange: [153, 500]}),
128
+ meta: {applyRedFix: true},
129
+ },
122
130
  ];
@@ -6,7 +6,7 @@ const e = exposes.presets;
6
6
 
7
7
  module.exports = [
8
8
  {
9
- zigbeeModel: ['SMARTCODE_CONVERT_GEN1'],
9
+ zigbeeModel: ['SMARTCODE_CONVERT_GEN1', 'Smartcode'],
10
10
  model: '66492-001',
11
11
  vendor: 'Kwikset',
12
12
  description: 'Home connect smart lock conversion kit',
package/devices/namron.js CHANGED
@@ -305,6 +305,7 @@ module.exports = [
305
305
  description: 'Zigbee 4 channel remote control',
306
306
  fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_recall],
307
307
  toZigbee: [],
308
+ ota: ota.zigbeeOTA,
308
309
  exposes: [e.battery(), e.action([
309
310
  'on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
310
311
  'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2',
@@ -3259,4 +3259,11 @@ module.exports = [
3259
3259
  description: 'Hue white E27 1100lm with Bluetooth',
3260
3260
  extend: hueExtend.light_onoff_brightness(),
3261
3261
  },
3262
+ {
3263
+ zigbeeModel: ['LTD017'],
3264
+ model: '578526',
3265
+ vendor: 'Philips',
3266
+ description: 'Hue white ambiance extra bright high lumen dimmable LED smart retrofit recessed 6" downlight',
3267
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
3268
+ },
3262
3269
  ];
package/devices/tuya.js CHANGED
@@ -1696,6 +1696,24 @@ module.exports = [
1696
1696
  toZigbee: [],
1697
1697
  exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
1698
1698
  },
1699
+ {
1700
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_yjjdcqsq']),
1701
+ model: 'ZTH01',
1702
+ vendor: 'TuYa',
1703
+ description: 'Temperature and humidity sensor',
1704
+ fromZigbee: [tuya.fz.datapoints, tuya.fz.gateway_connection_status],
1705
+ toZigbee: [tuya.tz.datapoints],
1706
+ configure: tuya.configureMagicPacket,
1707
+ exposes: [e.temperature(), e.humidity(), tuya.exposes.batteryState(), e.battery_low()],
1708
+ meta: {
1709
+ tuyaDatapoints: [
1710
+ [1, 'temperature', tuya.valueConverter.divideBy10],
1711
+ [2, 'humidity', tuya.valueConverter.raw],
1712
+ [3, 'battery_state', tuya.valueConverter.batteryState],
1713
+ // [9, 'temperature_unit', tuya.valueConverter.raw], This DP is not properly supported by the device
1714
+ ],
1715
+ },
1716
+ },
1699
1717
  {
1700
1718
  fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_3zofvcaa'}],
1701
1719
  model: 'TS011F_2_gang_2_usb_wall',
@@ -124,7 +124,7 @@ module.exports = [
124
124
  'button_6_hold', 'button_6_single', 'button_6_double'])],
125
125
  },
126
126
  {
127
- fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_zigisuyh'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_v4mevirn'}],
127
+ fingerprint: tuya.fingerprint('TS011F', ['_TZ3000_zigisuyh', '_TZ3000_v4mevirn', '_TZ3000_mlswgkc3']),
128
128
  model: 'ZIGBEE-B09-UK',
129
129
  vendor: 'Zemismart',
130
130
  description: 'Zigbee smart outlet universal socket with USB port',
package/lib/philips.js CHANGED
@@ -30,6 +30,17 @@ const decodeScaledGradientToRGB = (p) => {
30
30
  const COLOR_MODE_GRADIENT = '4b01';
31
31
  const COLOR_MODE_COLOR_XY = '0b00';
32
32
  const COLOR_MODE_COLOR_TEMP = '0f00';
33
+ const COLOR_MODE_EFFECT = 'ab00';
34
+ const COLOR_MODE_BRIGHTNESS = '0300';
35
+
36
+ const knownEffects = {
37
+ '0180': 'candle',
38
+ '0280': 'fireplace',
39
+ '0380': 'colorloop',
40
+ '0980': 'sunrise',
41
+ '0a80': 'sparkle',
42
+ };
43
+
33
44
 
34
45
  // decoder for manuSpecificPhilips2.state
35
46
  function decodeGradientColors(input, opts) {
@@ -60,6 +71,20 @@ function decodeGradientColors(input, opts) {
60
71
  // 01 - on/off (2)
61
72
  // 04 - brightness (2)
62
73
  // 60b09c4e - color (8) (xLow, xHigh, yLow, yHigh)
74
+ //
75
+ // Effect mode (ab00)
76
+ // Example: ab000153df7e446a0180
77
+ // ab00 - mode (4)
78
+ // 01 - on/off (2)
79
+ // 53 - brightness (2)
80
+ // df7e446a - XY Color (8)
81
+ // 0180 - effect (4)
82
+ //
83
+ // On/off/brightness mode (0003) – For devices that only support on/off and brightness
84
+ // Example: 030001b2
85
+ // 0300 - mode (4)
86
+ // 01 - on/off (2)
87
+ // b2 - brightness (2)
63
88
 
64
89
  // Device color mode
65
90
  const mode = input.slice(0, 4);
@@ -112,7 +137,7 @@ function decodeGradientColors(input, opts) {
112
137
  brightness,
113
138
  on,
114
139
  };
115
- } else if (mode === COLOR_MODE_COLOR_XY) {
140
+ } else if (mode === COLOR_MODE_COLOR_XY || mode === COLOR_MODE_EFFECT) {
116
141
  // XY Color mode
117
142
  const xLow = parseInt(input.slice(0, 2), 16);
118
143
  input = input.slice(2);
@@ -123,15 +148,26 @@ function decodeGradientColors(input, opts) {
123
148
  const yLow = parseInt(input.slice(0, 2), 16) << 8;
124
149
  input = input.slice(2);
125
150
 
126
- const x = xHigh | xLow;
127
- const y = yHigh | yLow;
128
151
 
152
+ const x = Math.round((xHigh | xLow) / 65535 * 10000) / 10000;
153
+ const y = Math.round((yHigh | yLow) / 65535 * 10000) / 10000;
154
+
155
+ if (mode === COLOR_MODE_COLOR_XY) {
156
+ return {
157
+ color_mode: 'xy',
158
+ x, y,
159
+ brightness, on,
160
+ };
161
+ }
162
+
163
+ // Effect mode
164
+ const effect = input.slice(0, 4);
165
+ const name = knownEffects[effect] || `unknown_${effect}`;
129
166
  return {
130
167
  color_mode: 'xy',
131
- x: Math.round(x / 65535 * 10000) / 10000,
132
- y: Math.round(y / 65535 * 10000) / 10000,
133
- brightness,
134
- on,
168
+ x, y,
169
+ brightness, on,
170
+ name,
135
171
  };
136
172
  } else if (mode === COLOR_MODE_COLOR_TEMP) {
137
173
  // Color temperature mode
@@ -148,6 +184,11 @@ function decodeGradientColors(input, opts) {
148
184
  brightness,
149
185
  on,
150
186
  };
187
+ } else if (mode === COLOR_MODE_BRIGHTNESS) {
188
+ return {
189
+ brightness,
190
+ on,
191
+ };
151
192
  }
152
193
 
153
194
  // Unknown mode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "15.0.11",
3
+ "version": "15.0.13",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
36
36
  "dependencies": {
37
- "axios": "^1.2.1",
37
+ "axios": "^1.2.2",
38
38
  "buffer-crc32": "^0.2.13",
39
39
  "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^3.0.0",