zigbee-herdsman-converters 15.0.14 → 15.0.16
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/converters/fromZigbee.js +4 -4
- package/converters/toZigbee.js +1 -0
- package/devices/blitzwolf.js +1 -1
- package/devices/dlink.js +37 -0
- package/devices/gidealed.js +1 -1
- package/devices/ikea.js +7 -5
- package/devices/inovelli.js +2 -2
- package/devices/legrand.js +41 -3
- package/devices/lidl.js +1 -1
- package/devices/linkind.js +0 -4
- package/devices/livolo.js +4 -4
- package/devices/lonsonho.js +1 -1
- package/devices/m/303/274ller_licht.js +1 -1
- package/devices/philips.js +43 -14
- package/devices/sinope.js +4 -1
- package/devices/sonoff.js +11 -16
- package/devices/sunricher.js +2 -0
- package/devices/tuya.js +1 -2
- package/lib/extend.js +6 -0
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -2622,10 +2622,10 @@ const converters = {
|
|
|
2622
2622
|
result.current_heating_setpoint = precisionRound(msg.data[0x4003], 2) / 100;
|
|
2623
2623
|
}
|
|
2624
2624
|
if (typeof msg.data[0x4008] == 'number') {
|
|
2625
|
-
result.child_protection = (
|
|
2626
|
-
result.mirror_display = (
|
|
2627
|
-
result.boost = (
|
|
2628
|
-
result.window_open = (
|
|
2625
|
+
result.child_protection = (msg.data[0x4008] & (1 << 7)) != 0;
|
|
2626
|
+
result.mirror_display = (msg.data[0x4008] & (1 << 1)) != 0;
|
|
2627
|
+
result.boost = (msg.data[0x4008] & 1 << 2) != 0;
|
|
2628
|
+
result.window_open = (msg.data[0x4008] & (1 << 4)) != 0;
|
|
2629
2629
|
|
|
2630
2630
|
if (result.boost) result.system_mode = constants.thermostatSystemModes[4];
|
|
2631
2631
|
else if (result.window_open) result.system_mode = constants.thermostatSystemModes[0];
|
package/converters/toZigbee.js
CHANGED
|
@@ -4166,6 +4166,7 @@ const converters = {
|
|
|
4166
4166
|
convertSet: async (entity, key, value, meta) => {
|
|
4167
4167
|
const payload = {0x4001: {value, type: 0x20}};
|
|
4168
4168
|
await entity.write('hvacThermostat', payload, manufacturerOptions.eurotronic);
|
|
4169
|
+
return {state: {[key]: value}};
|
|
4169
4170
|
},
|
|
4170
4171
|
convertGet: async (entity, key, meta) => {
|
|
4171
4172
|
await entity.read('hvacThermostat', [0x4001], manufacturerOptions.eurotronic);
|
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/dlink.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const fz = require('../converters/fromZigbee');
|
|
2
|
+
const exposes = require('../lib/exposes');
|
|
3
|
+
const reporting = require('../lib/reporting');
|
|
4
|
+
const e = exposes.presets;
|
|
5
|
+
|
|
6
|
+
const fzLocal = {
|
|
7
|
+
DCH_B112: {
|
|
8
|
+
cluster: 'ssIasZone',
|
|
9
|
+
type: 'commandStatusChangeNotification',
|
|
10
|
+
convert: (model, msg, publish, options, meta) => {
|
|
11
|
+
const zoneStatus = msg.data.zonestatus;
|
|
12
|
+
return {
|
|
13
|
+
contact: !((zoneStatus & 1) > 0),
|
|
14
|
+
vibration: (zoneStatus & 1<<1) > 0,
|
|
15
|
+
tamper: (zoneStatus & 1<<2) > 0,
|
|
16
|
+
battery_low: (zoneStatus & 1<<3) > 0,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
module.exports = [
|
|
23
|
+
{
|
|
24
|
+
zigbeeModel: ['DCH-B112'],
|
|
25
|
+
model: 'DCH-B112',
|
|
26
|
+
vendor: 'D-Link',
|
|
27
|
+
description: 'Wireless smart door window sensor with vibration',
|
|
28
|
+
fromZigbee: [fzLocal.DCH_B112, fz.battery],
|
|
29
|
+
toZigbee: [],
|
|
30
|
+
exposes: [e.battery_low(), e.contact(), e.vibration(), e.tamper(), e.battery()],
|
|
31
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
32
|
+
const endpoint = device.getEndpoint(1);
|
|
33
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
34
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|
package/devices/gidealed.js
CHANGED
|
@@ -6,6 +6,6 @@ module.exports = [
|
|
|
6
6
|
model: 'ZC05M',
|
|
7
7
|
vendor: 'GIDEALED',
|
|
8
8
|
description: 'Smart Zigbee RGB LED strip controller',
|
|
9
|
-
extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true, colorTempRange: [153,
|
|
9
|
+
extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true, colorTempRange: [153, 370]}),
|
|
10
10
|
},
|
|
11
11
|
];
|
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']);
|
|
@@ -982,4 +977,11 @@ module.exports = [
|
|
|
982
977
|
description: 'TRADFRI E26 PAR38 LED bulb 900 lumen, dimmable, white spectrum, downlight',
|
|
983
978
|
extend: tradfriExtend.light_onoff_brightness_colortemp(),
|
|
984
979
|
},
|
|
980
|
+
{
|
|
981
|
+
zigbeeModel: ['Floor lamp WW'],
|
|
982
|
+
model: 'G2015',
|
|
983
|
+
vendor: 'IKEA',
|
|
984
|
+
description: 'PILSKOTT LED floor lamp',
|
|
985
|
+
extend: tradfriExtend.light_onoff_brightness(),
|
|
986
|
+
},
|
|
985
987
|
];
|
package/devices/inovelli.js
CHANGED
|
@@ -1304,9 +1304,9 @@ module.exports = [
|
|
|
1304
1304
|
]);
|
|
1305
1305
|
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
1306
1306
|
|
|
1307
|
-
await reporting.activePower(endpoint, {min:
|
|
1307
|
+
await reporting.activePower(endpoint, {min: 15, max: 3600, change: 1});
|
|
1308
1308
|
await reporting.currentSummDelivered(endpoint, {
|
|
1309
|
-
min:
|
|
1309
|
+
min: 15,
|
|
1310
1310
|
max: 3600,
|
|
1311
1311
|
change: 0,
|
|
1312
1312
|
});
|
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);
|
|
@@ -303,7 +303,7 @@ module.exports = [
|
|
|
303
303
|
description: 'DIN power consumption module',
|
|
304
304
|
fromZigbee: [fz.identify, fz.metering, fz.electrical_measurement, fz.ignore_basic_report, fz.ignore_genOta, fz.legrand_power_alarm],
|
|
305
305
|
toZigbee: [tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.electrical_measurement_power, tz.legrand_powerAlarm],
|
|
306
|
-
exposes: [e.power().withAccess(ea.STATE_GET), exposes.binary('power_alarm_active', ea.STATE, true, false),
|
|
306
|
+
exposes: [e.power().withAccess(ea.STATE_GET), e.power_apparent(), exposes.binary('power_alarm_active', ea.STATE, true, false),
|
|
307
307
|
exposes.binary('power_alarm', ea.ALL, true, false).withDescription('Enable/disable the power alarm')],
|
|
308
308
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
309
309
|
const endpoint = device.getEndpoint(1);
|
|
@@ -428,4 +428,42 @@ 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
|
+
},
|
|
450
|
+
{
|
|
451
|
+
zigbeeModel: [' Centralized ventilation SW', ' Centralized ventilation SW\u0000\u0000\u0000\u0000'],
|
|
452
|
+
model: '067766',
|
|
453
|
+
vendor: 'Legrand',
|
|
454
|
+
description: 'Centralized ventilation switch',
|
|
455
|
+
fromZigbee: [fz.identify, fz.on_off, fz.power_on_behavior],
|
|
456
|
+
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn,
|
|
457
|
+
tz.power_on_behavior],
|
|
458
|
+
exposes: [e.switch(), e.action(['identify']),
|
|
459
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
|
|
460
|
+
allowing to see it in the dark`),
|
|
461
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on'),
|
|
462
|
+
e.power_on_behavior()],
|
|
463
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
464
|
+
const endpoint = device.getEndpoint(1);
|
|
465
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff']);
|
|
466
|
+
await reporting.onOff(endpoint);
|
|
467
|
+
},
|
|
468
|
+
},
|
|
431
469
|
];
|
package/devices/lidl.js
CHANGED
|
@@ -510,7 +510,7 @@ module.exports = [
|
|
|
510
510
|
model: 'HG06104A',
|
|
511
511
|
vendor: 'Lidl',
|
|
512
512
|
description: 'Livarno Lux smart LED light strip 2.5m',
|
|
513
|
-
...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
|
|
513
|
+
...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true, disablePowerOnBehavior: true}),
|
|
514
514
|
meta: {applyRedFix: true, enhancedHue: false},
|
|
515
515
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
516
516
|
device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
|
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
|
},
|
|
@@ -8,7 +8,7 @@ const e = exposes.presets;
|
|
|
8
8
|
module.exports = [
|
|
9
9
|
{
|
|
10
10
|
zigbeeModel: ['tint-ExtendedColor'],
|
|
11
|
-
model: '404036/45327/45317',
|
|
11
|
+
model: '404036/45327/45317/45328',
|
|
12
12
|
vendor: 'Müller Licht',
|
|
13
13
|
description: 'Tint LED white+color',
|
|
14
14
|
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 556]}),
|
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([
|
|
@@ -458,7 +458,7 @@ module.exports = [
|
|
|
458
458
|
model: '929002994901',
|
|
459
459
|
vendor: 'Philips',
|
|
460
460
|
description: 'Hue gradient lightstrip',
|
|
461
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
461
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
462
462
|
},
|
|
463
463
|
{
|
|
464
464
|
zigbeeModel: ['929003045401'],
|
|
@@ -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',
|
|
@@ -731,14 +738,14 @@ module.exports = [
|
|
|
731
738
|
model: '4090331P9',
|
|
732
739
|
vendor: 'Philips',
|
|
733
740
|
description: 'Hue Ensis (white)',
|
|
734
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
741
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
735
742
|
},
|
|
736
743
|
{
|
|
737
744
|
zigbeeModel: ['4090330P9_01', '4090330P9_02', '929003052501_01', '929003052501_02'],
|
|
738
745
|
model: '4090330P9',
|
|
739
746
|
vendor: 'Philips',
|
|
740
747
|
description: 'Hue Ensis (black)',
|
|
741
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
748
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
742
749
|
},
|
|
743
750
|
{
|
|
744
751
|
zigbeeModel: ['929003055901', '929003055901_01', '929003055901_02', '929003055901_03'],
|
|
@@ -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);
|
|
@@ -3091,6 +3105,13 @@ module.exports = [
|
|
|
3091
3105
|
description: 'Hue Bluetooth white & color ambiance ceiling lamp Infuse large',
|
|
3092
3106
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
3093
3107
|
},
|
|
3108
|
+
{
|
|
3109
|
+
zigbeeModel: ['929003531702'],
|
|
3110
|
+
model: '929003531702',
|
|
3111
|
+
vendor: 'Philips',
|
|
3112
|
+
description: 'Hue Bluetooth white & color ambiance ceiling lamp Infuse medium',
|
|
3113
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
3114
|
+
},
|
|
3094
3115
|
{
|
|
3095
3116
|
zigbeeModel: ['929003045001_01', '929003045001_02', '929003045001_03'],
|
|
3096
3117
|
model: '9290019533',
|
|
@@ -3245,6 +3266,14 @@ module.exports = [
|
|
|
3245
3266
|
description: 'Hue White & Color Ambiance Xamento M',
|
|
3246
3267
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
3247
3268
|
},
|
|
3269
|
+
{
|
|
3270
|
+
zigbeeModel: ['929003074801_01', '929003074801_02', '929003074801_03'],
|
|
3271
|
+
model: '929003074801',
|
|
3272
|
+
vendor: 'Philips',
|
|
3273
|
+
description: 'Hue White and Color Ambiance GU10 (Xamento)',
|
|
3274
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
3275
|
+
meta: {turnsOffAtBrightness1: true},
|
|
3276
|
+
},
|
|
3248
3277
|
{
|
|
3249
3278
|
zigbeeModel: ['LWE008'],
|
|
3250
3279
|
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
|
|
@@ -123,8 +116,8 @@ module.exports = [
|
|
|
123
116
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
124
117
|
const endpoint = device.getEndpoint(1);
|
|
125
118
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
126
|
-
await reporting.batteryVoltage(endpoint);
|
|
127
|
-
await reporting.batteryPercentageRemaining(endpoint);
|
|
119
|
+
await reporting.batteryVoltage(endpoint, {min: 3600, max: 7200});
|
|
120
|
+
await reporting.batteryPercentageRemaining(endpoint, {min: 3600, max: 7200});
|
|
128
121
|
},
|
|
129
122
|
},
|
|
130
123
|
{
|
|
@@ -139,8 +132,8 @@ module.exports = [
|
|
|
139
132
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
140
133
|
const endpoint = device.getEndpoint(1);
|
|
141
134
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
|
|
142
|
-
await reporting.batteryVoltage(endpoint);
|
|
143
|
-
await reporting.batteryPercentageRemaining(endpoint);
|
|
135
|
+
await reporting.batteryVoltage(endpoint, {min: 3600, max: 7200});
|
|
136
|
+
await reporting.batteryPercentageRemaining(endpoint, {min: 3600, max: 7200});
|
|
144
137
|
},
|
|
145
138
|
},
|
|
146
139
|
{
|
|
@@ -172,8 +165,8 @@ module.exports = [
|
|
|
172
165
|
await reporting.bind(endpoint, coordinatorEndpoint, bindClusters);
|
|
173
166
|
await reporting.temperature(endpoint, {min: 5, max: constants.repInterval.MINUTES_30, change: 20});
|
|
174
167
|
await reporting.humidity(endpoint);
|
|
175
|
-
await reporting.batteryVoltage(endpoint);
|
|
176
|
-
await reporting.batteryPercentageRemaining(endpoint);
|
|
168
|
+
await reporting.batteryVoltage(endpoint, {min: 3600, max: 7200});
|
|
169
|
+
await reporting.batteryPercentageRemaining(endpoint, {min: 3600, max: 7200});
|
|
177
170
|
} catch (e) {/* Not required for all: https://github.com/Koenkk/zigbee2mqtt/issues/5562 */
|
|
178
171
|
logger.error(`Configure failed: ${e}`);
|
|
179
172
|
}
|
|
@@ -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/devices/sunricher.js
CHANGED
|
@@ -359,6 +359,8 @@ module.exports = [
|
|
|
359
359
|
{
|
|
360
360
|
fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x000000005d5.....$/},
|
|
361
361
|
{modelID: 'GreenPower_2', ieeeAddr: /^0x0000000057e.....$/},
|
|
362
|
+
{modelID: 'GreenPower_2', ieeeAddr: /^0x000000001fa.....$/},
|
|
363
|
+
{modelID: 'GreenPower_2', ieeeAddr: /^0x0000000034b.....$/},
|
|
362
364
|
{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000f12.....$/}],
|
|
363
365
|
model: 'SR-ZGP2801K4-DIM',
|
|
364
366
|
vendor: 'Sunricher',
|
package/devices/tuya.js
CHANGED
|
@@ -3493,7 +3493,7 @@ module.exports = [
|
|
|
3493
3493
|
exposes: [e.contact(), e.battery(), e.vibration()],
|
|
3494
3494
|
},
|
|
3495
3495
|
{
|
|
3496
|
-
fingerprint: [{modelID: `TS0601`, manufacturerName: `_TZE200_yi4jtqq1`}],
|
|
3496
|
+
fingerprint: [{modelID: `TS0601`, manufacturerName: `_TZE200_yi4jtqq1`}, {modelID: `TS0601`, manufacturerName: `_TZE200_khx7nnka`}],
|
|
3497
3497
|
model: `XFY-CGQ-ZIGB`,
|
|
3498
3498
|
vendor: `TuYa`,
|
|
3499
3499
|
description: `Illuminance sensor`,
|
|
@@ -3769,7 +3769,6 @@ module.exports = [
|
|
|
3769
3769
|
.fromZigbee.concat([tuya.fz.power_on_behavior, fzLocal.TS110E_switch_type, fzLocal.TS110E]),
|
|
3770
3770
|
toZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
|
|
3771
3771
|
.toZigbee.concat([tuya.tz.power_on_behavior, tzLocal.TS110E_options]),
|
|
3772
|
-
meta: {multiEndpoint: true},
|
|
3773
3772
|
exposes: [e.light_brightness(), e.power_on_behavior(), tuya.exposes.switchType()],
|
|
3774
3773
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3775
3774
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
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={}) => {
|