zigbee-herdsman-converters 14.0.583 → 14.0.586

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.
@@ -1544,6 +1544,8 @@ const converters = {
1544
1544
  if (msg.data.hasOwnProperty('currentPositionLiftPercentage') && msg.data['currentPositionLiftPercentage'] <= 100) {
1545
1545
  const value = msg.data['currentPositionLiftPercentage'];
1546
1546
  result[postfixWithEndpointName('position', msg, model, meta)] = invert ? value : 100 - value;
1547
+ result[postfixWithEndpointName('state', msg, model, meta)] =
1548
+ invert ? (value === 100 ? 'CLOSE' : 'OPEN') : (value === 0 ? 'CLOSE' : 'OPEN');
1547
1549
  }
1548
1550
  if (msg.data.hasOwnProperty('currentPositionTiltPercentage') && msg.data['currentPositionTiltPercentage'] <= 100) {
1549
1551
  const value = msg.data['currentPositionTiltPercentage'];
package/devices/awox.js CHANGED
@@ -72,25 +72,9 @@ module.exports = [
72
72
  {
73
73
  fingerprint: [
74
74
  {
75
- type: 'EndDevice',
76
- manufacturerName: 'AwoX',
77
- modelID: 'TLSR82xx',
78
- powerSource: 'Battery',
79
- endpoints: [
80
- {
81
- ID: 1,
82
- profileID: 260,
83
- deviceID: 2048,
84
- inputClusters: [0, 3, 4, 4096],
85
- outputClusters: [0, 3, 4, 5, 6, 8, 768, 4096],
86
- },
87
- {
88
- ID: 3,
89
- profileID: 4751,
90
- deviceID: 2048,
91
- inputClusters: [65360, 65361],
92
- outputClusters: [65360, 65361],
93
- },
75
+ type: 'EndDevice', manufacturerName: 'AwoX', modelID: 'TLSR82xx', powerSource: 'Battery', endpoints: [
76
+ {ID: 1, profileID: 260, deviceID: 2048, inputClusters: [0, 3, 4, 4096], outputClusters: [0, 3, 4, 5, 6, 8, 768, 4096]},
77
+ {ID: 3, profileID: 4751, deviceID: 2048, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
94
78
  ],
95
79
  },
96
80
  ],
@@ -108,76 +92,35 @@ module.exports = [
108
92
  fingerprint: [
109
93
  {
110
94
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
111
- {
112
- ID: 1,
113
- profileID: 260,
114
- deviceID: 269,
115
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599, 10],
116
- outputClusters: [6],
117
- },
118
- {
119
- ID: 3,
120
- profileID: 4751,
121
- deviceID: 269,
122
- inputClusters: [65360, 65361],
123
- outputClusters: [65360, 65361],
124
- },
95
+ {ID: 1, profileID: 260, deviceID: 269, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599, 10], outputClusters: [6]},
96
+ {ID: 3, profileID: 4751, deviceID: 269, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
125
97
  {ID: 242, profileID: 41440, deviceID: 97, inputClusters: [], outputClusters: [33]},
126
98
  ],
127
99
  },
128
100
  {
129
101
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
130
- {
131
- ID: 1,
132
- profileID: 260,
133
- deviceID: 258,
134
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096],
135
- outputClusters: [6, 25],
136
- },
137
- {
138
- ID: 3,
139
- profileID: 49152,
140
- deviceID: 258,
141
- inputClusters: [65360, 65361],
142
- outputClusters: [65360, 65361],
143
- },
102
+ {ID: 1, profileID: 260, deviceID: 269, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599, 10], outputClusters: [6]},
103
+ {ID: 3, profileID: 4751, deviceID: 269, inputClusters: [65360, 65361, 4], outputClusters: [65360, 65361]},
104
+ {ID: 242, profileID: 41440, deviceID: 97, inputClusters: [], outputClusters: [33]},
105
+ ],
106
+ },
107
+ {
108
+ type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
109
+ {ID: 1, profileID: 260, deviceID: 258, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096], outputClusters: [6, 25]},
110
+ {ID: 3, profileID: 49152, deviceID: 258, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
144
111
  ],
145
112
  },
146
113
  {
147
114
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
148
- {
149
- ID: 1,
150
- profileID: 260,
151
- deviceID: 269,
152
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599],
153
- outputClusters: [6],
154
- },
155
- {
156
- ID: 3,
157
- profileID: 4751,
158
- deviceID: 269,
159
- inputClusters: [65360, 65361],
160
- outputClusters: [65360, 65361],
161
- },
115
+ {ID: 1, profileID: 260, deviceID: 269, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599], outputClusters: [6]},
116
+ {ID: 3, profileID: 4751, deviceID: 269, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
162
117
  {ID: 242, profileID: 41440, deviceID: 97, inputClusters: [], outputClusters: [33]},
163
118
  ],
164
119
  },
165
120
  {
166
121
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
167
- {
168
- ID: 1,
169
- profileID: 260,
170
- deviceID: 269,
171
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599],
172
- outputClusters: [6],
173
- },
174
- {
175
- ID: 3,
176
- profileID: 4751,
177
- deviceID: 269,
178
- inputClusters: [65360, 65361],
179
- outputClusters: [65360, 65361],
180
- },
122
+ {ID: 1, profileID: 260, deviceID: 269, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599], outputClusters: [6]},
123
+ {ID: 3, profileID: 4751, deviceID: 269, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
181
124
  ],
182
125
  },
183
126
  ],
@@ -190,58 +133,22 @@ module.exports = [
190
133
  fingerprint: [
191
134
  {
192
135
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
193
- {
194
- ID: 1,
195
- profileID: 260,
196
- deviceID: 268,
197
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599],
198
- outputClusters: [6],
199
- },
200
- {
201
- ID: 3,
202
- profileID: 4751,
203
- deviceID: 268,
204
- inputClusters: [65360, 65361],
205
- outputClusters: [65360, 65361],
206
- },
136
+ {ID: 1, profileID: 260, deviceID: 268, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599], outputClusters: [6]},
137
+ {ID: 3, profileID: 4751, deviceID: 268, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
207
138
  ],
208
139
  },
209
140
  {
210
141
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
211
- {
212
- ID: 1,
213
- profileID: 260,
214
- deviceID: 268,
215
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599],
216
- outputClusters: [6],
217
- },
142
+ {ID: 1, profileID: 260, deviceID: 268, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599], outputClusters: [6]},
218
143
  {ID: 242, profileID: 41440, deviceID: 97, inputClusters: [], outputClusters: [33]},
219
- {
220
- ID: 3,
221
- profileID: 4751,
222
- deviceID: 268,
223
- inputClusters: [65360, 65361],
224
- outputClusters: [65360, 65361],
225
- },
144
+ {ID: 3, profileID: 4751, deviceID: 268, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
226
145
  ],
227
146
  },
228
147
  {
229
148
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
230
- {
231
- ID: 1,
232
- profileID: 260,
233
- deviceID: 268,
234
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599, 10],
235
- outputClusters: [6],
236
- },
149
+ {ID: 1, profileID: 260, deviceID: 268, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599, 10], outputClusters: [6]},
237
150
  {ID: 242, profileID: 41440, deviceID: 97, inputClusters: [], outputClusters: [33]},
238
- {
239
- ID: 3,
240
- profileID: 4751,
241
- deviceID: 268,
242
- inputClusters: [65360, 65361],
243
- outputClusters: [65360, 65361],
244
- },
151
+ {ID: 3, profileID: 4751, deviceID: 268, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
245
152
  ],
246
153
  },
247
154
  ],
@@ -255,20 +162,8 @@ module.exports = [
255
162
  fingerprint: [
256
163
  {
257
164
  type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [
258
- {
259
- ID: 1,
260
- profileID: 260,
261
- deviceID: 268,
262
- inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096],
263
- outputClusters: [6, 25],
264
- },
265
- {
266
- ID: 3,
267
- profileID: 49152,
268
- deviceID: 268,
269
- inputClusters: [65360, 65361],
270
- outputClusters: [65360, 65361],
271
- },
165
+ {ID: 1, profileID: 260, deviceID: 268, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096], outputClusters: [6, 25]},
166
+ {ID: 3, profileID: 49152, deviceID: 268, inputClusters: [65360, 65361], outputClusters: [65360, 65361]},
272
167
  ],
273
168
  },
274
169
  ],
@@ -16,6 +16,8 @@ module.exports = [
16
16
  {vendor: 'Niko', description: 'Dimmer switch for Hue system', model: '91004'},
17
17
  {vendor: 'NodOn', description: 'Smart switch for Philips Hue', model: 'CWS-4-1-01_HUE'},
18
18
  {vendor: 'Vimar', description: 'Zigbee Friends of Hue RF switch', model: '03906'},
19
+ {vendor: 'Sunricher', model: 'SR-ZGP2801K4-FOH-E'},
20
+ {vendor: 'LED Trading', model: '9125'},
19
21
  ],
20
22
  },
21
23
  {
@@ -115,7 +115,7 @@ module.exports = [
115
115
  model: '5128.10',
116
116
  vendor: 'Iluminize',
117
117
  description: 'Zigbee 3.0 switch shutter SW with level control',
118
- fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff],
118
+ fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.cover_position_tilt],
119
119
  toZigbee: [tz.cover_state, tz.cover_via_brightness],
120
120
  exposes: [e.cover_position()],
121
121
  ota: ota.zigbeeOTA,
@@ -21,31 +21,6 @@ const fzLocal = {
21
21
  }
22
22
  },
23
23
  },
24
- led_trading_9125: {
25
- cluster: 'greenPower',
26
- type: ['commandNotification', 'commandCommisioningNotification'],
27
- convert: (model, msg, publish, options, meta) => {
28
- const commandID = msg.data.commandID;
29
- if (utils.hasAlreadyProcessedMessage(msg, msg.data.frameCounter, `${msg.device.ieeeAddr}_${commandID}`)) return;
30
- if (commandID === 104) return; // Skip commisioning command.
31
-
32
- // Button 1: A0 (top left)
33
- // Button 2: A1 (bottom left)
34
- // Button 3: B0 (top right)
35
- // Button 4: B1 (bottom right)
36
- const lookup = {
37
- 0x10: 'press_1', 0x14: 'release_1', 0x11: 'press_2', 0x15: 'release_2', 0x13: 'press_3', 0x17: 'release_3',
38
- 0x12: 'press_4', 0x16: 'release_4', 0x64: 'press_1_and_3', 0x65: 'release_1_and_3', 0x62: 'press_2_and_4',
39
- 0x63: 'release_2_and_4',
40
- };
41
-
42
- if (!lookup.hasOwnProperty(commandID)) {
43
- meta.logger.error(`LED Trading 9125: missing command '${commandID}'`);
44
- } else {
45
- return {action: lookup[commandID]};
46
- }
47
- },
48
- },
49
24
  };
50
25
 
51
26
  module.exports = [
@@ -91,15 +66,4 @@ module.exports = [
91
66
  await reporting.bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
92
67
  },
93
68
  },
94
- {
95
- fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000017.....$/, manufId: null}],
96
- model: '9125',
97
- vendor: 'LED Trading',
98
- description: 'FOH smart switch',
99
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZGP2801K4-FOH-E'}],
100
- fromZigbee: [fzLocal.led_trading_9125],
101
- toZigbee: [],
102
- exposes: [e.action(['press_1', 'release_1', 'press_2', 'release_2', 'press_3', 'release_3', 'press_4', 'release_4',
103
- 'press_1_and_3', 'release_1_and_3', 'press_2_and_4', 'release_2_and_4'])],
104
- },
105
69
  ];
@@ -3,6 +3,8 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
3
3
  const tz = require('../converters/toZigbee');
4
4
  const ota = require('../lib/ota');
5
5
  const reporting = require('../lib/reporting');
6
+ const globalStore = require('../lib/store');
7
+ const utils = require('../lib/utils');
6
8
  const e = exposes.presets;
7
9
  const ea = exposes.access;
8
10
 
@@ -40,6 +42,48 @@ const hueExtend = {
40
42
  }),
41
43
  };
42
44
 
45
+ const fzLocal = {
46
+ hue_tap_dial: {
47
+ cluster: 'manuSpecificPhilips',
48
+ type: 'commandHueNotification',
49
+ options: [exposes.options.simulated_brightness()],
50
+ convert: (model, msg, publish, options, meta) => {
51
+ const buttonLookup = {1: 'button_1', 2: 'button_2', 3: 'button_3', 4: 'button_4', 20: 'dial'};
52
+ const button = buttonLookup[msg.data['button']];
53
+ const typeLookup = {0: 'press', 1: 'hold', 2: 'press_release', 3: 'hold_release'};
54
+ const type = typeLookup[msg.data['type']];
55
+ const direction = msg.data['unknown2'] <127 ? 'right' : 'left';
56
+ const time = msg.data['time'];
57
+ const payload = {};
58
+
59
+ if (button === 'dial') {
60
+ const adjustedTime = direction === 'right' ? time : 256 - time;
61
+ const dialType = 'rotate';
62
+ const speed = adjustedTime <= 25 ? 'step' : adjustedTime <= 75 ? 'slow' : 'fast';
63
+ payload.action = `${button}_${dialType}_${direction}_${speed}`;
64
+
65
+ // simulated brightness
66
+ if (options.simulated_brightness) {
67
+ const opts = options.simulated_brightness;
68
+ const deltaOpts = typeof opts === 'object' && opts.hasOwnProperty('delta') ? opts.delta : 35;
69
+ const delta = direction === 'right' ? deltaOpts : deltaOpts * -1;
70
+ const brightness = globalStore.getValue(msg.endpoint, 'brightness', 255) + delta;
71
+ payload.brightness = utils.numberWithinRange(brightness, 0, 255);
72
+ globalStore.putValue(msg.endpoint, 'brightness', payload.brightness);
73
+ }
74
+ } else {
75
+ payload.action = `${button}_${type}`;
76
+ // duration
77
+ if (type === 'press') globalStore.putValue(msg.endpoint, 'press_start', Date.now());
78
+ else if (type === 'hold' || type === 'hold_release') {
79
+ payload.action_duration = (Date.now() - globalStore.getValue(msg.endpoint, 'press_start')) / 1000;
80
+ }
81
+ }
82
+ return payload;
83
+ },
84
+ },
85
+ };
86
+
43
87
  module.exports = [
44
88
  {
45
89
  zigbeeModel: ['929003055801'],
@@ -2313,6 +2357,29 @@ module.exports = [
2313
2357
  description: 'Hue White and Color Ambiance A19 1100 lumen',
2314
2358
  extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
2315
2359
  },
2360
+ {
2361
+ zigbeeModel: ['RDM002'],
2362
+ model: '8719514440937/8719514440999',
2363
+ vendor: 'Philips',
2364
+ description: 'Hue Tap dial switch',
2365
+ fromZigbee: [fz.ignore_command_step, fzLocal.hue_tap_dial, fz.battery],
2366
+ toZigbee: [],
2367
+ exposes: [e.battery(), e.action(['button_1_press', 'button_1_press_release', 'button_1_hold', 'button_1_hold_release',
2368
+ 'button_2_press', 'button_2_press_release', 'button_2_hold', 'button_2_hold_release',
2369
+ 'button_3_press', 'button_3_press_release', 'button_3_hold', 'button_3_hold_release',
2370
+ 'button_4_press', 'button_4_press_release', 'button_4_hold', 'button_4_hold_release',
2371
+ 'dial_rotate_left_step', 'dial_rotate_left_slow', 'dial_rotate_left_fast',
2372
+ 'dial_rotate_right_step', 'dial_rotate_right_slow', 'dial_rotate_right_fast']),
2373
+ ],
2374
+ configure: async (device, coordinatorEndpoint, logger) => {
2375
+ const endpoint = device.getEndpoint(1);
2376
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'manuSpecificPhilips', 'genPowerCfg']);
2377
+ const options = {manufacturerCode: 0x100B, disableDefaultResponse: true};
2378
+ await endpoint.write('genBasic', {0x0031: {value: 0x000B, type: 0x19}}, options);
2379
+ await reporting.batteryPercentageRemaining(endpoint);
2380
+ },
2381
+ ota: ota.zigbeeOTA,
2382
+ },
2316
2383
  {
2317
2384
  fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000004.....$/}],
2318
2385
  model: '8718696743133',
@@ -3,18 +3,27 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
3
3
  const tz = require('../converters/toZigbee');
4
4
  const ota = require('../lib/ota');
5
5
  const reporting = require('../lib/reporting');
6
- const extend = require('../lib/extend');
7
6
  const e = exposes.presets;
8
7
 
8
+ // Make sure extend.ldight_* is not used (sengledExtend should be used instead)
9
+ const extendDontUse = require('../lib/extend');
10
+ const extend = {switch: extendDontUse.switch};
11
+ const sengledExtend = {
12
+ light_onoff_brightness: (options={}) => extendDontUse.light_onoff_brightness({disableEffect: true, ...options}),
13
+ light_onoff_brightness_colortemp: (options={}) => extendDontUse.light_onoff_brightness_colortemp({disableEffect: true, ...options}),
14
+ light_onoff_brightness_colortemp_color: (options={}) =>
15
+ extendDontUse.light_onoff_brightness_colortemp_color({disableEffect: true, ...options}),
16
+ };
17
+
9
18
  module.exports = [
10
19
  {
11
20
  zigbeeModel: ['E13-N11'],
12
21
  model: 'E13-N11',
13
22
  vendor: 'Sengled',
14
23
  description: 'Flood light with motion sensor light outdoor',
15
- fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.ias_occupancy_alarm_1]),
16
- toZigbee: extend.light_onoff_brightness().toZigbee,
17
- exposes: extend.light_onoff_brightness().exposes.concat([e.occupancy()]),
24
+ fromZigbee: sengledExtend.light_onoff_brightness().fromZigbee.concat([fz.ias_occupancy_alarm_1]),
25
+ toZigbee: sengledExtend.light_onoff_brightness().toZigbee,
26
+ exposes: sengledExtend.light_onoff_brightness().exposes.concat([e.occupancy()]),
18
27
  ota: ota.zigbeeOTA,
19
28
  },
20
29
  {
@@ -22,7 +31,7 @@ module.exports = [
22
31
  model: 'E21-N13A',
23
32
  vendor: 'Sengled',
24
33
  description: 'Smart LED (A19)',
25
- extend: extend.light_onoff_brightness(),
34
+ extend: sengledExtend.light_onoff_brightness(),
26
35
  ota: ota.zigbeeOTA,
27
36
  },
28
37
  {
@@ -30,12 +39,12 @@ module.exports = [
30
39
  model: 'E21-N1EA',
31
40
  vendor: 'Sengled',
32
41
  description: 'Smart LED multicolor A19 bulb',
33
- fromZigbee: extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).fromZigbee.concat([fz.metering]),
34
- toZigbee: extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).toZigbee,
35
- exposes: extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).exposes.concat([e.power(), e.energy()]),
42
+ fromZigbee: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).fromZigbee.concat([fz.metering]),
43
+ toZigbee: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).toZigbee,
44
+ exposes: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).exposes.concat([e.power(), e.energy()]),
36
45
  ota: ota.zigbeeOTA,
37
46
  configure: async (device, coordinatorEndpoint, logger) => {
38
- await extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]})
47
+ await sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]})
39
48
  .configure(device, coordinatorEndpoint, logger);
40
49
  device.powerSource = 'Mains (single phase)';
41
50
  device.save();
@@ -52,7 +61,7 @@ module.exports = [
52
61
  model: 'E12-N1E',
53
62
  vendor: 'Sengled',
54
63
  description: 'Smart LED multicolor (BR30)',
55
- extend: extend.light_onoff_brightness_colortemp_color(),
64
+ extend: sengledExtend.light_onoff_brightness_colortemp_color(),
56
65
  ota: ota.zigbeeOTA,
57
66
  },
58
67
  {
@@ -60,7 +69,7 @@ module.exports = [
60
69
  model: 'E1G-G8E',
61
70
  vendor: 'Sengled',
62
71
  description: 'Multicolor light strip (2M)',
63
- extend: extend.light_onoff_brightness_colortemp_color(),
72
+ extend: sengledExtend.light_onoff_brightness_colortemp_color(),
64
73
  ota: ota.zigbeeOTA,
65
74
  },
66
75
  {
@@ -68,7 +77,7 @@ module.exports = [
68
77
  model: 'E11-U21U31',
69
78
  vendor: 'Sengled',
70
79
  description: 'Element touch (A19)',
71
- extend: extend.light_onoff_brightness(),
80
+ extend: sengledExtend.light_onoff_brightness(),
72
81
  ota: ota.zigbeeOTA,
73
82
  },
74
83
  {
@@ -76,11 +85,11 @@ module.exports = [
76
85
  model: 'E11-G13',
77
86
  vendor: 'Sengled',
78
87
  description: 'Element classic (A19)',
79
- fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.metering]),
80
- toZigbee: extend.light_onoff_brightness().toZigbee,
88
+ fromZigbee: sengledExtend.light_onoff_brightness().fromZigbee.concat([fz.metering]),
89
+ toZigbee: sengledExtend.light_onoff_brightness().toZigbee,
81
90
  ota: ota.zigbeeOTA,
82
91
  configure: async (device, coordinatorEndpoint, logger) => {
83
- await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
92
+ await sengledExtend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
84
93
  device.powerSource = 'Mains (single phase)';
85
94
  device.save();
86
95
 
@@ -90,14 +99,14 @@ module.exports = [
90
99
  await reporting.currentSummDelivered(endpoint);
91
100
  await reporting.instantaneousDemand(endpoint);
92
101
  },
93
- exposes: extend.light_onoff_brightness().exposes.concat([e.power(), e.energy()]),
102
+ exposes: sengledExtend.light_onoff_brightness().exposes.concat([e.power(), e.energy()]),
94
103
  },
95
104
  {
96
105
  zigbeeModel: ['E11-G23', 'E11-G33'],
97
106
  model: 'E11-G23/E11-G33',
98
107
  vendor: 'Sengled',
99
108
  description: 'Element classic (A60)',
100
- extend: extend.light_onoff_brightness(),
109
+ extend: sengledExtend.light_onoff_brightness(),
101
110
  ota: ota.zigbeeOTA,
102
111
  },
103
112
  {
@@ -105,7 +114,7 @@ module.exports = [
105
114
  model: 'E11-N13/E11-N13A/E11-N14/E11-N14A',
106
115
  vendor: 'Sengled',
107
116
  description: 'Element extra bright (A19)',
108
- extend: extend.light_onoff_brightness(),
117
+ extend: sengledExtend.light_onoff_brightness(),
109
118
  ota: ota.zigbeeOTA,
110
119
  },
111
120
  {
@@ -113,7 +122,7 @@ module.exports = [
113
122
  model: 'Z01-CIA19NAE26',
114
123
  vendor: 'Sengled',
115
124
  description: 'Element touch (A19)',
116
- extend: extend.light_onoff_brightness(),
125
+ extend: sengledExtend.light_onoff_brightness(),
117
126
  ota: ota.zigbeeOTA,
118
127
  },
119
128
  {
@@ -121,7 +130,7 @@ module.exports = [
121
130
  model: 'Z01-A19NAE26',
122
131
  vendor: 'Sengled',
123
132
  description: 'Element plus (A19)',
124
- extend: extend.light_onoff_brightness_colortemp(),
133
+ extend: sengledExtend.light_onoff_brightness_colortemp(),
125
134
  ota: ota.zigbeeOTA,
126
135
  },
127
136
  {
@@ -129,7 +138,7 @@ module.exports = [
129
138
  model: 'Z01-A60EAE27',
130
139
  vendor: 'Sengled',
131
140
  description: 'Element Plus (A60)',
132
- extend: extend.light_onoff_brightness_colortemp(),
141
+ extend: sengledExtend.light_onoff_brightness_colortemp(),
133
142
  ota: ota.zigbeeOTA,
134
143
  },
135
144
  {
@@ -137,11 +146,11 @@ module.exports = [
137
146
  model: 'E11-N1EA',
138
147
  vendor: 'Sengled',
139
148
  description: 'Element plus color (A19)',
140
- fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.metering]),
141
- toZigbee: extend.light_onoff_brightness().toZigbee,
149
+ fromZigbee: sengledExtend.light_onoff_brightness_colortemp_color().fromZigbee.concat([fz.metering]),
150
+ toZigbee: sengledExtend.light_onoff_brightness_colortemp_color().toZigbee,
142
151
  ota: ota.zigbeeOTA,
143
152
  configure: async (device, coordinatorEndpoint, logger) => {
144
- await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
153
+ await sengledExtend.light_onoff_brightness_colortemp_color().configure(device, coordinatorEndpoint, logger);
145
154
  device.powerSource = 'Mains (single phase)';
146
155
  device.save();
147
156
 
@@ -151,14 +160,14 @@ module.exports = [
151
160
  await reporting.currentSummDelivered(endpoint);
152
161
  await reporting.instantaneousDemand(endpoint);
153
162
  },
154
- exposes: extend.light_onoff_brightness().exposes.concat([e.power(), e.energy()]),
163
+ exposes: sengledExtend.light_onoff_brightness_colortemp_color().exposes.concat([e.power(), e.energy()]),
155
164
  },
156
165
  {
157
166
  zigbeeModel: ['E11-U2E'],
158
167
  model: 'E11-U2E',
159
168
  vendor: 'Sengled',
160
169
  description: 'Element color plus E27',
161
- extend: extend.light_onoff_brightness_colortemp_color(),
170
+ extend: sengledExtend.light_onoff_brightness_colortemp_color(),
162
171
  ota: ota.zigbeeOTA,
163
172
  },
164
173
  {
@@ -166,7 +175,7 @@ module.exports = [
166
175
  model: 'E11-U3E',
167
176
  vendor: 'Sengled',
168
177
  description: 'Element color plus B22',
169
- extend: extend.light_onoff_brightness_colortemp_color(),
178
+ extend: sengledExtend.light_onoff_brightness_colortemp_color(),
170
179
  ota: ota.zigbeeOTA,
171
180
  },
172
181
  {
@@ -174,12 +183,12 @@ module.exports = [
174
183
  model: 'E1F-N5E',
175
184
  vendor: 'Sengled',
176
185
  description: 'Element color plus E12',
177
- fromZigbee: extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).fromZigbee.concat([fz.metering]),
178
- toZigbee: extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).toZigbee,
179
- exposes: extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).exposes.concat([e.power(), e.energy()]),
186
+ fromZigbee: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).fromZigbee.concat([fz.metering]),
187
+ toZigbee: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).toZigbee,
188
+ exposes: sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]}).exposes.concat([e.power(), e.energy()]),
180
189
  ota: ota.zigbeeOTA,
181
190
  configure: async (device, coordinatorEndpoint, logger) => {
182
- await extend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]})
191
+ await sengledExtend.light_onoff_brightness_colortemp_color({colorTempRange: [154, 500]})
183
192
  .configure(device, coordinatorEndpoint, logger);
184
193
  device.powerSource = 'Mains (single phase)';
185
194
  device.save();
@@ -196,7 +205,7 @@ module.exports = [
196
205
  model: 'E12-N14',
197
206
  vendor: 'Sengled',
198
207
  description: 'Element Classic (BR30)',
199
- extend: extend.light_onoff_brightness(),
208
+ extend: sengledExtend.light_onoff_brightness(),
200
209
  ota: ota.zigbeeOTA,
201
210
  },
202
211
  {
@@ -204,7 +213,7 @@ module.exports = [
204
213
  model: 'E1ACA4ABE38A',
205
214
  vendor: 'Sengled',
206
215
  description: 'Element downlight smart LED bulb',
207
- extend: extend.light_onoff_brightness(),
216
+ extend: sengledExtend.light_onoff_brightness(),
208
217
  ota: ota.zigbeeOTA,
209
218
  },
210
219
  {
@@ -261,7 +270,7 @@ module.exports = [
261
270
  model: 'E11-N1G',
262
271
  vendor: 'Sengled',
263
272
  description: 'Vintage LED edison bulb (ST19)',
264
- extend: extend.light_onoff_brightness(),
273
+ extend: sengledExtend.light_onoff_brightness(),
265
274
  ota: ota.zigbeeOTA,
266
275
  },
267
276
  {
@@ -269,7 +278,7 @@ module.exports = [
269
278
  model: 'E1F-N9G',
270
279
  vendor: 'Sengled',
271
280
  description: 'Smart LED filament candle (E12)',
272
- extend: extend.light_onoff_brightness(),
281
+ extend: sengledExtend.light_onoff_brightness(),
273
282
  ota: ota.zigbeeOTA,
274
283
  },
275
284
  ];
package/devices/tuya.js CHANGED
@@ -794,6 +794,7 @@ module.exports = [
794
794
  {modelID: 'TS0503B', manufacturerName: '_TZ3210_778drfdt'},
795
795
  {modelID: 'TS0503B', manufacturerName: '_TZ3000_g5xawfcq'},
796
796
  {modelID: 'TS0503B', manufacturerName: '_TZ3210_trm3l2aw'},
797
+ {modelID: 'TS0503B', manufacturerName: '_TZ3210_95txyzbx'},
797
798
  {modelID: 'TS0503B', manufacturerName: '_TZ3210_odlghna1'}],
798
799
  model: 'TS0503B',
799
800
  vendor: 'TuYa',
@@ -2202,13 +2203,20 @@ module.exports = [
2202
2203
  vendor: 'TuYa',
2203
2204
  description: 'Smart light switch - 3 gang without neutral wire',
2204
2205
  extend: extend.switch(),
2205
- exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
2206
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_backlight_mode]),
2207
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_backlight_mode]),
2208
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right'),
2209
+ exposes.enum('power_on_behavior', ea.ALL, Object.values(tuya.moesSwitch.powerOnBehavior)),
2210
+ exposes.enum('backlight_mode', ea.ALL, ['LOW', 'MEDIUM', 'HIGH'])
2211
+ .withDescription('Indicator light status: LOW: Off | MEDIUM: On| HIGH: Inverted')],
2206
2212
  endpoint: (device) => {
2207
2213
  return {'left': 1, 'center': 2, 'right': 3};
2208
2214
  },
2209
2215
  whiteLabel: [{vendor: 'TUYATEC', model: 'GDKES-03TZXD'}],
2210
2216
  meta: {multiEndpoint: true},
2211
2217
  configure: async (device, coordinatorEndpoint, logger) => {
2218
+ await device.getEndpoint(1).read('genBasic',
2219
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
2212
2220
  try {
2213
2221
  for (const ID of [1, 2, 3]) {
2214
2222
  const endpoint = device.getEndpoint(ID);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.583",
3
+ "version": "14.0.586",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [