zigbee-herdsman-converters 15.0.14 → 15.0.15
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.
- package/devices/blitzwolf.js +1 -1
- package/devices/ikea.js +0 -5
- package/devices/legrand.js +21 -2
- package/devices/linkind.js +0 -4
- package/devices/livolo.js +4 -4
- package/devices/lonsonho.js +1 -1
- package/devices/philips.js +33 -11
- package/devices/sinope.js +4 -1
- package/devices/sonoff.js +5 -10
- package/lib/extend.js +6 -0
- package/package.json +1 -1
package/devices/blitzwolf.js
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = [
|
|
|
22
22
|
vendor: 'BlitzWolf',
|
|
23
23
|
description: 'Zigbee 3.0 smart light switch module 1 gang',
|
|
24
24
|
extend: extend.switch(),
|
|
25
|
-
toZigbee: [tz.TYZB01_on_off],
|
|
25
|
+
toZigbee: [tz.TYZB01_on_off, tz.power_on_behavior],
|
|
26
26
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
27
27
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
28
28
|
},
|
package/devices/ikea.js
CHANGED
|
@@ -602,11 +602,6 @@ module.exports = [
|
|
|
602
602
|
description: 'TRADFRI control outlet',
|
|
603
603
|
vendor: 'IKEA',
|
|
604
604
|
extend: extend.switch(),
|
|
605
|
-
toZigbee: extend.switch().toZigbee.concat([tz.power_on_behavior]),
|
|
606
|
-
fromZigbee: extend.switch().fromZigbee.concat([fz.power_on_behavior]),
|
|
607
|
-
// power_on_behavior 'toggle' does not seem to be supported
|
|
608
|
-
exposes: extend.switch().exposes.concat([exposes.enum('power_on_behavior', ea.ALL, ['off', 'previous', 'on'])
|
|
609
|
-
.withDescription('Controls the behaviour when the device is powered on')]),
|
|
610
605
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
611
606
|
const endpoint = device.getEndpoint(1);
|
|
612
607
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
package/devices/legrand.js
CHANGED
|
@@ -262,8 +262,8 @@ module.exports = [
|
|
|
262
262
|
description: 'Wired micromodule switch',
|
|
263
263
|
extend: extend.switch(),
|
|
264
264
|
ota: ota.zigbeeOTA,
|
|
265
|
-
fromZigbee: [
|
|
266
|
-
toZigbee: [
|
|
265
|
+
fromZigbee: [...extend.switch().fromZigbee, fz.identify],
|
|
266
|
+
toZigbee: [...extend.switch().toZigbee, tz.legrand_identify],
|
|
267
267
|
whiteLabel: [{vendor: 'BTicino', model: '3584C'}],
|
|
268
268
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
269
269
|
const endpoint = device.getEndpoint(1);
|
|
@@ -428,4 +428,23 @@ module.exports = [
|
|
|
428
428
|
await reporting.activePower(endpoint);
|
|
429
429
|
},
|
|
430
430
|
},
|
|
431
|
+
{
|
|
432
|
+
zigbeeModel: ['Remote dimmer switch'],
|
|
433
|
+
model: 'WNAL63',
|
|
434
|
+
vendor: 'Legrand',
|
|
435
|
+
// led blink RED when battery is low
|
|
436
|
+
description: 'Remote dimmer switch',
|
|
437
|
+
fromZigbee: [fz.identify, fz.command_on, fz.command_off, fz.command_toggle, fz.legacy.cmd_move, fz.legacy.cmd_stop,
|
|
438
|
+
fz.battery],
|
|
439
|
+
exposes: [e.battery(), e.action(['identify', 'on', 'off', 'toggle', 'brightness_move_up',
|
|
440
|
+
'brightness_move_down', 'brightness_stop'])],
|
|
441
|
+
toZigbee: [],
|
|
442
|
+
meta: {battery: {voltageToPercentage: '3V_2500'}, publishDuplicateTransaction: true},
|
|
443
|
+
onEvent: readInitialBatteryState,
|
|
444
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
445
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
446
|
+
const endpoint = device.getEndpoint(1);
|
|
447
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'genLevelCtrl']);
|
|
448
|
+
},
|
|
449
|
+
},
|
|
431
450
|
];
|
package/devices/linkind.js
CHANGED
|
@@ -157,10 +157,6 @@ module.exports = [
|
|
|
157
157
|
vendor: 'Linkind',
|
|
158
158
|
description: 'Control outlet',
|
|
159
159
|
extend: extend.switch(),
|
|
160
|
-
toZigbee: extend.switch().toZigbee.concat([tz.power_on_behavior]),
|
|
161
|
-
fromZigbee: extend.switch().fromZigbee.concat([fz.power_on_behavior]),
|
|
162
|
-
exposes: extend.switch().exposes.concat([exposes.enum('power_on_behavior', ea.ALL, ['off', 'previous', 'on', 'toggle'])
|
|
163
|
-
.withDescription('Controls the behaviour when the device is powered on')]),
|
|
164
160
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
165
161
|
const endpoint = device.getEndpoint(1);
|
|
166
162
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
package/devices/livolo.js
CHANGED
|
@@ -65,8 +65,8 @@ module.exports = [
|
|
|
65
65
|
model: 'TI0001-switch',
|
|
66
66
|
description: 'Zigbee switch 1 gang',
|
|
67
67
|
vendor: 'Livolo',
|
|
68
|
-
fromZigbee: [fz.livolo_new_switch_state],
|
|
69
|
-
toZigbee: [tz.livolo_socket_switch_on_off],
|
|
68
|
+
fromZigbee: [fz.livolo_new_switch_state, fz.power_on_behavior],
|
|
69
|
+
toZigbee: [tz.livolo_socket_switch_on_off, tz.power_on_behavior],
|
|
70
70
|
extend: extend.switch(),
|
|
71
71
|
configure: poll,
|
|
72
72
|
endpoint: (device) => {
|
|
@@ -151,8 +151,8 @@ module.exports = [
|
|
|
151
151
|
description: 'Zigbee socket',
|
|
152
152
|
vendor: 'Livolo',
|
|
153
153
|
extend: extend.switch(),
|
|
154
|
-
fromZigbee: [fz.livolo_socket_state],
|
|
155
|
-
toZigbee: [tz.livolo_socket_switch_on_off],
|
|
154
|
+
fromZigbee: [fz.livolo_socket_state, fz.power_on_behavior],
|
|
155
|
+
toZigbee: [tz.livolo_socket_switch_on_off, tz.power_on_behavior],
|
|
156
156
|
configure: poll,
|
|
157
157
|
onEvent: async (type, data, device) => {
|
|
158
158
|
if (type === 'stop') {
|
package/devices/lonsonho.js
CHANGED
|
@@ -205,7 +205,7 @@ module.exports = [
|
|
|
205
205
|
vendor: 'Lonsonho',
|
|
206
206
|
description: '1 gang switch module with neutral wire',
|
|
207
207
|
extend: extend.switch(),
|
|
208
|
-
toZigbee: [tz.TYZB01_on_off],
|
|
208
|
+
toZigbee: [tz.power_on_behavior, tz.TYZB01_on_off],
|
|
209
209
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
210
210
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
211
211
|
},
|
package/devices/philips.js
CHANGED
|
@@ -75,8 +75,8 @@ const hueExtend = {
|
|
|
75
75
|
return result;
|
|
76
76
|
},
|
|
77
77
|
light_onoff_brightness_colortemp_color_gradient: (options={}) => {
|
|
78
|
-
options = {supportsHS: true, disableEffect: true,
|
|
79
|
-
const result = extendDontUse.light_onoff_brightness_colortemp_color({
|
|
78
|
+
options = {supportsHS: true, disableEffect: true, extraEffects: [], ...options};
|
|
79
|
+
const result = extendDontUse.light_onoff_brightness_colortemp_color({noConfigure: true, ...options});
|
|
80
80
|
result['ota'] = ota.zigbeeOTA;
|
|
81
81
|
result['meta'] = {turnsOffAtBrightness1: true};
|
|
82
82
|
result['toZigbee'] = result['toZigbee'].concat([
|
|
@@ -642,6 +642,13 @@ module.exports = [
|
|
|
642
642
|
description: 'Hue white E27 LED bulb filament giant globe',
|
|
643
643
|
extend: hueExtend.light_onoff_brightness(),
|
|
644
644
|
},
|
|
645
|
+
{
|
|
646
|
+
zigbeeModel: ['LWO004'],
|
|
647
|
+
model: '8719514279155',
|
|
648
|
+
vendor: 'Philips',
|
|
649
|
+
description: 'Hue white G125 B22 LED bulb filament giant globe',
|
|
650
|
+
extend: hueExtend.light_onoff_brightness(),
|
|
651
|
+
},
|
|
645
652
|
{
|
|
646
653
|
zigbeeModel: ['LTD011'],
|
|
647
654
|
model: '5110131H5',
|
|
@@ -1078,6 +1085,13 @@ module.exports = [
|
|
|
1078
1085
|
description: 'Hue white A60 bulb B22 bluetooth',
|
|
1079
1086
|
extend: hueExtend.light_onoff_brightness(),
|
|
1080
1087
|
},
|
|
1088
|
+
{
|
|
1089
|
+
zigbeeModel: ['929003047001'],
|
|
1090
|
+
model: '929003047001',
|
|
1091
|
+
vendor: 'Philips',
|
|
1092
|
+
description: 'Hue White ambiance Milliskin (round)',
|
|
1093
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
1094
|
+
},
|
|
1081
1095
|
{
|
|
1082
1096
|
zigbeeModel: ['LWA017'],
|
|
1083
1097
|
model: '929002469202',
|
|
@@ -1216,7 +1230,7 @@ module.exports = [
|
|
|
1216
1230
|
model: '8718699703424',
|
|
1217
1231
|
vendor: 'Philips',
|
|
1218
1232
|
description: 'Hue white and color ambiance LightStrip plus',
|
|
1219
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color(),
|
|
1233
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false}),
|
|
1220
1234
|
},
|
|
1221
1235
|
{
|
|
1222
1236
|
zigbeeModel: ['LCL002'],
|
|
@@ -2343,7 +2357,7 @@ module.exports = [
|
|
|
2343
2357
|
model: '929002240401',
|
|
2344
2358
|
vendor: 'Philips',
|
|
2345
2359
|
description: 'Hue smart plug - EU',
|
|
2346
|
-
extend: extend.switch(),
|
|
2360
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2347
2361
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2348
2362
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2349
2363
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2357,7 +2371,7 @@ module.exports = [
|
|
|
2357
2371
|
model: '046677552343',
|
|
2358
2372
|
vendor: 'Philips',
|
|
2359
2373
|
description: 'Hue smart plug bluetooth',
|
|
2360
|
-
extend: extend.switch(),
|
|
2374
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2361
2375
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2362
2376
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2363
2377
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2371,7 +2385,7 @@ module.exports = [
|
|
|
2371
2385
|
model: '8718699689308',
|
|
2372
2386
|
vendor: 'Philips',
|
|
2373
2387
|
description: 'Hue smart plug - UK',
|
|
2374
|
-
extend: extend.switch(),
|
|
2388
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2375
2389
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2376
2390
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2377
2391
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2385,7 +2399,7 @@ module.exports = [
|
|
|
2385
2399
|
model: '9290022408',
|
|
2386
2400
|
vendor: 'Philips',
|
|
2387
2401
|
description: 'Hue smart plug - AU',
|
|
2388
|
-
extend: extend.switch(),
|
|
2402
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2389
2403
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2390
2404
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2391
2405
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2399,7 +2413,7 @@ module.exports = [
|
|
|
2399
2413
|
model: '8719514342361',
|
|
2400
2414
|
vendor: 'Philips',
|
|
2401
2415
|
description: 'Hue smart plug - AU',
|
|
2402
|
-
extend: extend.switch(),
|
|
2416
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2403
2417
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2404
2418
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2405
2419
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2413,7 +2427,7 @@ module.exports = [
|
|
|
2413
2427
|
model: '9290024426',
|
|
2414
2428
|
vendor: 'Philips',
|
|
2415
2429
|
description: 'Hue smart plug - CH',
|
|
2416
|
-
extend: extend.switch(),
|
|
2430
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2417
2431
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2418
2432
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2419
2433
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2427,7 +2441,7 @@ module.exports = [
|
|
|
2427
2441
|
model: '929003050601',
|
|
2428
2442
|
vendor: 'Philips',
|
|
2429
2443
|
description: 'Hue smart plug',
|
|
2430
|
-
extend: extend.switch(),
|
|
2444
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2431
2445
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2432
2446
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2433
2447
|
const endpoint = device.getEndpoint(11);
|
|
@@ -2441,7 +2455,7 @@ module.exports = [
|
|
|
2441
2455
|
model: '9290030509',
|
|
2442
2456
|
vendor: 'Philips',
|
|
2443
2457
|
description: 'Hue smart plug - EU',
|
|
2444
|
-
extend: extend.switch(),
|
|
2458
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
2445
2459
|
toZigbee: [tz.on_off].concat([tzLocal.hue_power_on_behavior, tzLocal.hue_power_on_error]),
|
|
2446
2460
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2447
2461
|
const endpoint = device.getEndpoint(11);
|
|
@@ -3245,6 +3259,14 @@ module.exports = [
|
|
|
3245
3259
|
description: 'Hue White & Color Ambiance Xamento M',
|
|
3246
3260
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
3247
3261
|
},
|
|
3262
|
+
{
|
|
3263
|
+
zigbeeModel: ['929003074801_01', '929003074801_02', '929003074801_03'],
|
|
3264
|
+
model: '929003074801',
|
|
3265
|
+
vendor: 'Philips',
|
|
3266
|
+
description: 'Hue White and Color Ambiance GU10 (Xamento)',
|
|
3267
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
3268
|
+
meta: {turnsOffAtBrightness1: true},
|
|
3269
|
+
},
|
|
3248
3270
|
{
|
|
3249
3271
|
zigbeeModel: ['LWE008'],
|
|
3250
3272
|
model: '929003021301',
|
package/devices/sinope.js
CHANGED
|
@@ -801,7 +801,10 @@ module.exports = [
|
|
|
801
801
|
await reporting.thermostatTemperature(endpoint);
|
|
802
802
|
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
803
803
|
await reporting.thermostatPIHeatingDemand(endpoint);
|
|
804
|
-
|
|
804
|
+
|
|
805
|
+
try {
|
|
806
|
+
await reporting.thermostatSystemMode(endpoint);
|
|
807
|
+
} catch (error) {/* Not all support this */}
|
|
805
808
|
|
|
806
809
|
await endpoint.read('hvacThermostat', ['occupiedHeatingSetpoint', 'localTemp', 'systemMode', 'pIHeatingDemand',
|
|
807
810
|
'SinopeBacklight', 'maxHeatSetpointLimit', 'minHeatSetpointLimit', 'SinopeMainCycleOutput', 'SinopeAuxCycleOutput']);
|
package/devices/sonoff.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
|
-
const fz =
|
|
3
|
-
const tz = require('../converters/toZigbee');
|
|
2
|
+
const fz = require('../converters/fromZigbee');
|
|
4
3
|
const constants = require('../lib/constants');
|
|
5
4
|
const reporting = require('../lib/reporting');
|
|
6
5
|
const extend = require('../lib/extend');
|
|
@@ -47,9 +46,6 @@ module.exports = [
|
|
|
47
46
|
description: 'Zigbee smart switch (no neutral)',
|
|
48
47
|
ota: ota.zigbeeOTA,
|
|
49
48
|
extend: extend.switch(),
|
|
50
|
-
toZigbee: extend.switch().toZigbee.concat([tz.power_on_behavior]),
|
|
51
|
-
fromZigbee: extend.switch().fromZigbee.concat([fz.power_on_behavior]),
|
|
52
|
-
exposes: extend.switch().exposes.concat([e.power_on_behavior()]),
|
|
53
49
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
54
50
|
// Unbind genPollCtrl to prevent device from sending checkin message.
|
|
55
51
|
// Zigbee-herdsmans responds to the checkin message which causes the device
|
|
@@ -67,9 +63,6 @@ module.exports = [
|
|
|
67
63
|
description: 'Zigbee smart switch (no neutral)',
|
|
68
64
|
ota: ota.zigbeeOTA,
|
|
69
65
|
extend: extend.switch(),
|
|
70
|
-
toZigbee: extend.switch().toZigbee.concat([tz.power_on_behavior]),
|
|
71
|
-
fromZigbee: extend.switch().fromZigbee.concat([fz.power_on_behavior]),
|
|
72
|
-
exposes: extend.switch().exposes.concat([e.power_on_behavior()]),
|
|
73
66
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
74
67
|
// Unbind genPollCtrl to prevent device from sending checkin message.
|
|
75
68
|
// Zigbee-herdsmans responds to the checkin message which causes the device
|
|
@@ -218,8 +211,10 @@ module.exports = [
|
|
|
218
211
|
const endpoint = device.getEndpoint(1);
|
|
219
212
|
const bindClusters = ['genPowerCfg'];
|
|
220
213
|
await reporting.bind(endpoint, coordinatorEndpoint, bindClusters);
|
|
221
|
-
|
|
222
|
-
|
|
214
|
+
// 3600/7200 prevents disconnect
|
|
215
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/13600#issuecomment-1283827935
|
|
216
|
+
await reporting.batteryVoltage(endpoint, {min: 3600, max: 7200});
|
|
217
|
+
await reporting.batteryPercentageRemaining(endpoint, {min: 3600, max: 7200});
|
|
223
218
|
},
|
|
224
219
|
exposes: [e.occupancy(), e.battery_low(), e.battery(), e.battery_voltage()],
|
|
225
220
|
},
|
package/lib/extend.js
CHANGED
|
@@ -6,9 +6,15 @@ const light = require('./light');
|
|
|
6
6
|
|
|
7
7
|
const extend = {
|
|
8
8
|
switch: (options={}) => {
|
|
9
|
+
options = {disablePowerOnBehavior: false, ...options};
|
|
9
10
|
const exposes = [e.switch()];
|
|
10
11
|
const fromZigbee = [fz.on_off, fz.ignore_basic_report];
|
|
11
12
|
const toZigbee = [tz.on_off];
|
|
13
|
+
if (!options.disablePowerOnBehavior) {
|
|
14
|
+
exposes.push(e.power_on_behavior(['off', 'on', 'toggle', 'previous']));
|
|
15
|
+
fromZigbee.push(fz.power_on_behavior);
|
|
16
|
+
toZigbee.push(tz.power_on_behavior);
|
|
17
|
+
}
|
|
12
18
|
return {exposes, fromZigbee, toZigbee};
|
|
13
19
|
},
|
|
14
20
|
light_onoff_brightness: (options={}) => {
|