zigbee-herdsman-converters 14.0.564 → 14.0.565
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/toZigbee.js +7 -2
- package/devices/acova.js +2 -1
- package/devices/adeo.js +7 -0
- package/devices/custom_devices_diy.js +177 -0
- package/devices/gledopto.js +1 -1
- package/devices/immax.js +10 -0
- package/devices/lellki.js +4 -4
- package/devices/linkind.js +8 -1
- package/devices/lonsonho.js +1 -1
- package/devices/moes.js +1 -1
- package/devices/philips.js +14 -0
- package/devices/tuya.js +28 -11
- package/devices/xiaomi.js +15 -1
- package/devices/yale.js +2 -1
- package/devices/zemismart.js +1 -1
- package/lib/exposes.js +1 -0
- package/lib/xiaomi.js +26 -2
- package/package.json +1 -1
package/converters/toZigbee.js
CHANGED
|
@@ -2167,7 +2167,8 @@ const converters = {
|
|
|
2167
2167
|
convertSet: async (entity, key, value, meta) => {
|
|
2168
2168
|
if (['SP-EUC01', 'ZNCZ04LM', 'ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM', 'SSM-U01', 'SSM-U02', 'DLKZMK11LM', 'DLKZMK12LM',
|
|
2169
2169
|
'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
|
|
2170
|
-
'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM'
|
|
2170
|
+
'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM', 'ZNLDP13LM',
|
|
2171
|
+
].includes(meta.mapped.model)) {
|
|
2171
2172
|
await entity.write('aqaraOpple', {0x0201: {value: value ? 1 : 0, type: 0x10}}, manufacturerOptions.xiaomi);
|
|
2172
2173
|
} else if (['ZNCZ02LM', 'QBCZ11LM', 'LLKZMK11LM'].includes(meta.mapped.model)) {
|
|
2173
2174
|
const payload = value ?
|
|
@@ -2190,7 +2191,8 @@ const converters = {
|
|
|
2190
2191
|
convertGet: async (entity, key, meta) => {
|
|
2191
2192
|
if (['SP-EUC01', 'ZNCZ04LM', 'ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM', 'SSM-U01', 'SSM-U02', 'DLKZMK11LM', 'DLKZMK12LM',
|
|
2192
2193
|
'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
|
|
2193
|
-
'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM'
|
|
2194
|
+
'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM', 'ZNLDP13LM',
|
|
2195
|
+
].includes(meta.mapped.model)) {
|
|
2194
2196
|
await entity.read('aqaraOpple', [0x0201]);
|
|
2195
2197
|
} else if (['ZNCZ02LM', 'QBCZ11LM', 'ZNCZ11LM'].includes(meta.mapped.model)) {
|
|
2196
2198
|
await entity.read('aqaraOpple', [0xFFF0]);
|
|
@@ -3582,6 +3584,9 @@ const converters = {
|
|
|
3582
3584
|
await entity.write('genOnOff', {moesStartUpOnOff: payload});
|
|
3583
3585
|
return {state: {power_outage_memory: value}};
|
|
3584
3586
|
},
|
|
3587
|
+
convertGet: async (entity, key, meta) => {
|
|
3588
|
+
await entity.read('genOnOff', ['moesStartUpOnOff']);
|
|
3589
|
+
},
|
|
3585
3590
|
},
|
|
3586
3591
|
moes_power_on_behavior: {
|
|
3587
3592
|
key: ['power_on_behavior'],
|
package/devices/acova.js
CHANGED
|
@@ -64,7 +64,8 @@ module.exports = [
|
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
zigbeeModel: ['TAFFETAS2 D1.00P1.02Z1.00'
|
|
67
|
+
zigbeeModel: ['TAFFETAS2 D1.00P1.02Z1.00\u0000\u0000\u0000\u0000\u0000\u0000\u0000',
|
|
68
|
+
'TAFFETAS2 D1.00P1.01Z1.00\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
68
69
|
model: 'TAFFETAS2',
|
|
69
70
|
vendor: 'Acova',
|
|
70
71
|
description: 'Taffetas 2 heater',
|
package/devices/adeo.js
CHANGED
|
@@ -22,6 +22,13 @@ module.exports = [
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
zigbeeModel: ['ZBEK-8'],
|
|
27
|
+
model: 'IG-CDZFB2G009RA-MZN-02',
|
|
28
|
+
vendor: 'ADEO',
|
|
29
|
+
description: 'ENKI LEXMAN E27 LED white filament 1055 lumen',
|
|
30
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
31
|
+
},
|
|
25
32
|
{
|
|
26
33
|
zigbeeModel: ['ZBEK-4'],
|
|
27
34
|
model: 'IM-CDZDGAAA0005KA_MAN',
|
|
@@ -3,8 +3,11 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
|
+
const constants = require('../lib/constants');
|
|
6
7
|
const e = exposes.presets;
|
|
7
8
|
const ea = exposes.access;
|
|
9
|
+
const {calibrateAndPrecisionRoundOptions} = require('../lib/utils');
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
const tzLocal = {
|
|
10
13
|
node_config: {
|
|
@@ -21,6 +24,62 @@ const tzLocal = {
|
|
|
21
24
|
};
|
|
22
25
|
},
|
|
23
26
|
},
|
|
27
|
+
local_time: {
|
|
28
|
+
key: ['local_time'],
|
|
29
|
+
convertSet: async (entity, key, value, meta) => {
|
|
30
|
+
const firstEndpoint = meta.device.getEndpoint(1);
|
|
31
|
+
const time = Math.round(((new Date()).getTime() - constants.OneJanuary2000) / 1000 + ((new Date())
|
|
32
|
+
.getTimezoneOffset() * -1) * 60);
|
|
33
|
+
await firstEndpoint.write('genTime', {time: time});
|
|
34
|
+
return {state: {local_time: time}};
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
co2_config: {
|
|
38
|
+
key: ['auto_brightness', 'forced_recalibration', 'factory_reset_co2', 'long_chart_period', 'set_altitude',
|
|
39
|
+
'manual_forced_recalibration'],
|
|
40
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
41
|
+
const lookup = {'OFF': 0x00, 'ON': 0x01};
|
|
42
|
+
const value = lookup.hasOwnProperty(rawValue) ? lookup[rawValue] : parseInt(rawValue, 10);
|
|
43
|
+
const payloads = {
|
|
44
|
+
auto_brightness: ['msCO2', {0x0203: {value, type: 0x10}}],
|
|
45
|
+
forced_recalibration: ['msCO2', {0x0202: {value, type: 0x10}}],
|
|
46
|
+
factory_reset_co2: ['msCO2', {0x0206: {value, type: 0x10}}],
|
|
47
|
+
long_chart_period: ['msCO2', {0x0204: {value, type: 0x10}}],
|
|
48
|
+
set_altitude: ['msCO2', {0x0205: {value, type: 0x21}}],
|
|
49
|
+
manual_forced_recalibration: ['msCO2', {0x0207: {value, type: 0x21}}],
|
|
50
|
+
};
|
|
51
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
52
|
+
return {
|
|
53
|
+
state: {[key]: rawValue},
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
temperature_config: {
|
|
58
|
+
key: ['temperature_offset'],
|
|
59
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
60
|
+
const value = parseInt(rawValue, 10);
|
|
61
|
+
const payloads = {
|
|
62
|
+
temperature_offset: ['msTemperatureMeasurement', {0x0210: {value, type: 0x29}}],
|
|
63
|
+
};
|
|
64
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
65
|
+
return {
|
|
66
|
+
state: {[key]: rawValue},
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
humidity_config: {
|
|
71
|
+
key: ['humidity_offset'],
|
|
72
|
+
convertSet: async (entity, key, rawValue, meta) => {
|
|
73
|
+
const value = parseInt(rawValue, 10);
|
|
74
|
+
const payloads = {
|
|
75
|
+
humidity_offset: ['msRelativeHumidity', {0x0210: {value, type: 0x29}}],
|
|
76
|
+
};
|
|
77
|
+
await entity.write(payloads[key][0], payloads[key][1]);
|
|
78
|
+
return {
|
|
79
|
+
state: {[key]: rawValue},
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
},
|
|
24
83
|
};
|
|
25
84
|
|
|
26
85
|
const fzLocal = {
|
|
@@ -35,6 +94,64 @@ const fzLocal = {
|
|
|
35
94
|
return result;
|
|
36
95
|
},
|
|
37
96
|
},
|
|
97
|
+
co2: {
|
|
98
|
+
cluster: 'msCO2',
|
|
99
|
+
type: ['attributeReport', 'readResponse'],
|
|
100
|
+
convert: (model, msg, publish, options, meta) => {
|
|
101
|
+
if (msg.data.hasOwnProperty('measuredValue')) {
|
|
102
|
+
const co2 = msg.data['measuredValue'];
|
|
103
|
+
return {co2: calibrateAndPrecisionRoundOptions(co2, options, 'co2')};
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
co2_config: {
|
|
108
|
+
cluster: 'msCO2',
|
|
109
|
+
type: ['attributeReport', 'readResponse'],
|
|
110
|
+
convert: (model, msg, publish, options, meta) => {
|
|
111
|
+
const result = {};
|
|
112
|
+
if (msg.data.hasOwnProperty(0x0203)) {
|
|
113
|
+
result.auto_brightness = ['OFF', 'ON'][msg.data[0x0203]];
|
|
114
|
+
}
|
|
115
|
+
if (msg.data.hasOwnProperty(0x0202)) {
|
|
116
|
+
result.forced_recalibration = ['OFF', 'ON'][msg.data[0x0202]];
|
|
117
|
+
}
|
|
118
|
+
if (msg.data.hasOwnProperty(0x0206)) {
|
|
119
|
+
result.factory_reset_co2 = ['OFF', 'ON'][msg.data[0x0206]];
|
|
120
|
+
}
|
|
121
|
+
if (msg.data.hasOwnProperty(0x0204)) {
|
|
122
|
+
result.long_chart_period = ['OFF', 'ON'][msg.data[0x0204]];
|
|
123
|
+
}
|
|
124
|
+
if (msg.data.hasOwnProperty(0x0205)) {
|
|
125
|
+
result.set_altitude = msg.data[0x0205];
|
|
126
|
+
}
|
|
127
|
+
if (msg.data.hasOwnProperty(0x0207)) {
|
|
128
|
+
result.manual_forced_recalibration = msg.data[0x0207];
|
|
129
|
+
}
|
|
130
|
+
return result;
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
temperature_config: {
|
|
134
|
+
cluster: 'msTemperatureMeasurement',
|
|
135
|
+
type: 'readResponse',
|
|
136
|
+
convert: (model, msg, publish, options, meta) => {
|
|
137
|
+
const result = {};
|
|
138
|
+
if (msg.data.hasOwnProperty(0x0210)) {
|
|
139
|
+
result.temperature_offset = msg.data[0x0210];
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
humidity_config: {
|
|
145
|
+
cluster: 'msRelativeHumidity',
|
|
146
|
+
type: 'readResponse',
|
|
147
|
+
convert: (model, msg, publish, options, meta) => {
|
|
148
|
+
const result = {};
|
|
149
|
+
if (msg.data.hasOwnProperty(0x0210)) {
|
|
150
|
+
result.humidity_offset = msg.data[0x0210];
|
|
151
|
+
}
|
|
152
|
+
return result;
|
|
153
|
+
},
|
|
154
|
+
},
|
|
38
155
|
};
|
|
39
156
|
|
|
40
157
|
module.exports = [
|
|
@@ -444,4 +561,64 @@ module.exports = [
|
|
|
444
561
|
},
|
|
445
562
|
exposes: [e.battery(), e.temperature(), e.humidity()],
|
|
446
563
|
},
|
|
564
|
+
{
|
|
565
|
+
zigbeeModel: ['EFEKTA_iAQ'],
|
|
566
|
+
model: 'EFEKTA_iAQ',
|
|
567
|
+
vendor: 'Custom devices (DiY)',
|
|
568
|
+
description: '[CO2 Monitor with IPS TFT Display, outdoor temperature and humidity, date and time](http://efektalab.com/iAQ)',
|
|
569
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fzLocal.co2, fzLocal.co2_config,
|
|
570
|
+
fzLocal.temperature_config, fzLocal.humidity_config],
|
|
571
|
+
toZigbee: [tz.factory_reset, tzLocal.co2_config, tzLocal.temperature_config, tzLocal.humidity_config, tzLocal.local_time],
|
|
572
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
573
|
+
const endpoint = device.getEndpoint(1);
|
|
574
|
+
const clusters = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msIlluminanceMeasurement', 'msCO2'];
|
|
575
|
+
await reporting.bind(endpoint, coordinatorEndpoint, clusters);
|
|
576
|
+
for (const cluster of clusters) {
|
|
577
|
+
await endpoint.configureReporting(cluster, [
|
|
578
|
+
{attribute: 'measuredValue', minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0},
|
|
579
|
+
]);
|
|
580
|
+
}
|
|
581
|
+
const payload1 = [{attribute: {ID: 0x0203, type: 0x10},
|
|
582
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
583
|
+
await endpoint.configureReporting('msCO2', payload1);
|
|
584
|
+
const payload2 = [{attribute: {ID: 0x0202, type: 0x10},
|
|
585
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
586
|
+
await endpoint.configureReporting('msCO2', payload2);
|
|
587
|
+
const payload3 = [{attribute: {ID: 0x0204, type: 0x10},
|
|
588
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
589
|
+
await endpoint.configureReporting('msCO2', payload3);
|
|
590
|
+
const payload4 = [{attribute: {ID: 0x0205, type: 0x21},
|
|
591
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
592
|
+
await endpoint.configureReporting('msCO2', payload4);
|
|
593
|
+
const payload5 = [{attribute: {ID: 0x0206, type: 0x10},
|
|
594
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
595
|
+
await endpoint.configureReporting('msCO2', payload5);
|
|
596
|
+
const payload6 = [{attribute: {ID: 0x0207, type: 0x21},
|
|
597
|
+
minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
598
|
+
await endpoint.configureReporting('msCO2', payload6);
|
|
599
|
+
const time = Math.round(((new Date()).getTime() - constants.OneJanuary2000) / 1000 + ((new Date())
|
|
600
|
+
.getTimezoneOffset() * -1) * 60);
|
|
601
|
+
const values = {time: time};
|
|
602
|
+
endpoint.write('genTime', values);
|
|
603
|
+
},
|
|
604
|
+
exposes: [e.co2(), e.temperature(), e.humidity(), e.illuminance(),
|
|
605
|
+
exposes.binary('auto_brightness', ea.STATE_SET, 'ON', 'OFF')
|
|
606
|
+
.withDescription('Enable or Disable Auto Brightness of the Display'),
|
|
607
|
+
exposes.binary('long_chart_period', ea.STATE_SET, 'ON', 'OFF')
|
|
608
|
+
.withDescription('The period of plotting the CO2 level(OFF - 1H | ON - 24H)'),
|
|
609
|
+
exposes.numeric('set_altitude', ea.STATE_SET).withUnit('meters')
|
|
610
|
+
.withDescription('Setting the altitude above sea level (for high accuracy of the CO2 sensor)')
|
|
611
|
+
.withValueMin(0).withValueMax(3000),
|
|
612
|
+
exposes.enum('local_time', ea.STATE_SET, ['set']).withDescription('Set date and time'),
|
|
613
|
+
exposes.numeric('temperature_offset', ea.STATE_SET).withUnit('°C').withDescription('Adjust temperature')
|
|
614
|
+
.withValueMin(-30).withValueMax(60),
|
|
615
|
+
exposes.numeric('humidity_offset', ea.STATE_SET).withUnit('%').withDescription('Adjust humidity')
|
|
616
|
+
.withValueMin(0).withValueMax(99),
|
|
617
|
+
exposes.binary('forced_recalibration', ea.STATE_SET, 'ON', 'OFF')
|
|
618
|
+
.withDescription('Start FRC (Perform Forced Recalibration of the CO2 Sensor)'),
|
|
619
|
+
exposes.binary('factory_reset_co2', ea.STATE_SET, 'ON', 'OFF').withDescription('Factory Reset CO2 sensor'),
|
|
620
|
+
exposes.numeric('manual_forced_recalibration', ea.STATE_SET).withUnit('ppm')
|
|
621
|
+
.withDescription('Start Manual FRC (Perform Forced Recalibration of the CO2 Sensor)')
|
|
622
|
+
.withValueMin(0).withValueMax(5000)],
|
|
623
|
+
},
|
|
447
624
|
];
|
package/devices/gledopto.js
CHANGED
|
@@ -348,7 +348,7 @@ module.exports = [
|
|
|
348
348
|
model: 'GL-S-004Z',
|
|
349
349
|
vendor: 'Gledopto',
|
|
350
350
|
description: 'Zigbee 4W MR16 Bulb 30deg RGB+CCT',
|
|
351
|
-
extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disableColorTempStartup: false}),
|
|
351
|
+
extend: gledoptoExtend.light_onoff_brightness_colortemp_color({disableColorTempStartup: false, colorTempRange: [155, 495]}),
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
zigbeeModel: ['GL-S-005Z'],
|
package/devices/immax.js
CHANGED
|
@@ -8,6 +8,16 @@ const e = exposes.presets;
|
|
|
8
8
|
const ea = exposes.access;
|
|
9
9
|
|
|
10
10
|
module.exports = [
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
zigbeeModel: ['Motion-Sensor-ZB3.0'],
|
|
14
|
+
model: '07043M',
|
|
15
|
+
vendor: 'Immax',
|
|
16
|
+
description: 'Motion sensor',
|
|
17
|
+
fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
|
|
18
|
+
toZigbee: [],
|
|
19
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
20
|
+
},
|
|
11
21
|
{
|
|
12
22
|
zigbeeModel: ['ZBT-CCTfilament-D0000'],
|
|
13
23
|
model: '07089L',
|
package/devices/lellki.js
CHANGED
|
@@ -42,7 +42,7 @@ module.exports = [
|
|
|
42
42
|
const endpoint = device.getEndpoint(1);
|
|
43
43
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
44
44
|
},
|
|
45
|
-
exposes: [e.switch(), exposes.enum('power_outage_memory', ea.
|
|
45
|
+
exposes: [e.switch(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
46
46
|
.withDescription('Recover state after power outage')],
|
|
47
47
|
},
|
|
48
48
|
{
|
|
@@ -102,7 +102,7 @@ module.exports = [
|
|
|
102
102
|
},
|
|
103
103
|
options: [exposes.options.measurement_poll_interval()],
|
|
104
104
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
105
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
105
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
106
106
|
.withDescription('Recover state after power outage')],
|
|
107
107
|
onEvent: tuya.onEventMeasurementPoll,
|
|
108
108
|
},
|
|
@@ -122,7 +122,7 @@ module.exports = [
|
|
|
122
122
|
},
|
|
123
123
|
options: [exposes.options.measurement_poll_interval()],
|
|
124
124
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
125
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
125
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
126
126
|
.withDescription('Recover state after power outage')],
|
|
127
127
|
onEvent: tuya.onEventMeasurementPoll,
|
|
128
128
|
},
|
|
@@ -146,7 +146,7 @@ module.exports = [
|
|
|
146
146
|
options: [exposes.options.measurement_poll_interval()],
|
|
147
147
|
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
|
|
148
148
|
e.switch().withEndpoint('l3'), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
149
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
149
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
150
150
|
.withDescription('Recover state after power outage')],
|
|
151
151
|
endpoint: (device) => {
|
|
152
152
|
return {l1: 1, l2: 2, l3: 3};
|
package/devices/linkind.js
CHANGED
|
@@ -68,12 +68,19 @@ module.exports = [
|
|
|
68
68
|
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
zigbeeModel: ['ZBT-CCTLight-C4700107'
|
|
71
|
+
zigbeeModel: ['ZBT-CCTLight-C4700107'],
|
|
72
72
|
model: 'ZL1000400-CCT-EU-2-V1A02',
|
|
73
73
|
vendor: 'Linkind',
|
|
74
74
|
description: 'Zigbee LED 5.4W C35 bulb E14, dimmable & tunable',
|
|
75
75
|
extend: extend.light_onoff_brightness_colortemp(),
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
zigbeeModel: ['ZBT-CCTLight-M3500107'],
|
|
79
|
+
model: 'ZL00030014',
|
|
80
|
+
vendor: 'Linkind',
|
|
81
|
+
description: 'Zigbee LED 4.8W GU10 bulb, dimmable & tunable',
|
|
82
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
83
|
+
},
|
|
77
84
|
{
|
|
78
85
|
zigbeeModel: ['ZBT-CCTLight-BR300107'],
|
|
79
86
|
model: 'ZL100050004',
|
package/devices/lonsonho.js
CHANGED
|
@@ -267,7 +267,7 @@ module.exports = [
|
|
|
267
267
|
exposes: [
|
|
268
268
|
e.light_brightness().withEndpoint('l1'),
|
|
269
269
|
e.light_brightness().withEndpoint('l2'),
|
|
270
|
-
exposes.enum('power_outage_memory', ea.
|
|
270
|
+
exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore']).withDescription('Recover state after power outage')
|
|
271
271
|
.withEndpoint('l1'),
|
|
272
272
|
exposes.presets.switch_type_2().withEndpoint('l1'),
|
|
273
273
|
exposes.presets.switch_type_2().withEndpoint('l2'),
|
package/devices/moes.js
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = [
|
|
|
22
22
|
fromZigbee: [fz.on_off, fz.tuya_switch_power_outage_memory, fz.ts011f_plug_child_mode],
|
|
23
23
|
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_child_mode],
|
|
24
24
|
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
|
|
25
|
-
exposes.enum('power_outage_memory', ea.
|
|
25
|
+
exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
26
26
|
.withDescription('Recover state after power outage'), e.child_lock()],
|
|
27
27
|
endpoint: (device) => {
|
|
28
28
|
return {'l1': 1, 'l2': 2};
|
package/devices/philips.js
CHANGED
|
@@ -55,6 +55,13 @@ module.exports = [
|
|
|
55
55
|
description: 'Hue White and Color Ambiance GU10 (Centura)',
|
|
56
56
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
zigbeeModel: ['929003045201_01', '929003045201_02', '929003045201_03'],
|
|
60
|
+
model: '929003045201',
|
|
61
|
+
vendor: 'Philips',
|
|
62
|
+
description: 'Hue White and Color Ambiance GU10 (Centura round white)',
|
|
63
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
64
|
+
},
|
|
58
65
|
{
|
|
59
66
|
zigbeeModel: ['929003047401'],
|
|
60
67
|
model: '929003047401',
|
|
@@ -426,6 +433,13 @@ module.exports = [
|
|
|
426
433
|
description: 'Hue Calla outdoor',
|
|
427
434
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
428
435
|
},
|
|
436
|
+
{
|
|
437
|
+
zigbeeModel: ['929003098601'],
|
|
438
|
+
model: '929003098601',
|
|
439
|
+
vendor: 'Philips',
|
|
440
|
+
description: 'Hue Calla outdoor Pedestal',
|
|
441
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
442
|
+
},
|
|
429
443
|
{
|
|
430
444
|
zigbeeModel: ['1742330P7'],
|
|
431
445
|
model: '1742330P7',
|
package/devices/tuya.js
CHANGED
|
@@ -440,7 +440,13 @@ module.exports = [
|
|
|
440
440
|
model: 'ZN231392',
|
|
441
441
|
vendor: 'TuYa',
|
|
442
442
|
description: 'Smart water/gas valve',
|
|
443
|
-
|
|
443
|
+
fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior]),
|
|
444
|
+
toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior]),
|
|
445
|
+
exposes: extend.switch().exposes.concat([e.power_on_behavior()]),
|
|
446
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
447
|
+
const endpoint = device.getEndpoint(1);
|
|
448
|
+
await endpoint.read('genOnOff', ['onOff', 'moesStartUpOnOff']);
|
|
449
|
+
},
|
|
444
450
|
},
|
|
445
451
|
{
|
|
446
452
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_1hwjutgo'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_lnggrqqi'}],
|
|
@@ -1557,8 +1563,9 @@ module.exports = [
|
|
|
1557
1563
|
description: '10A UK or 16A EU smart plug',
|
|
1558
1564
|
whiteLabel: [{vendor: 'BlitzWolf', model: 'BW-SHP13'}],
|
|
1559
1565
|
vendor: 'TuYa',
|
|
1560
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory
|
|
1561
|
-
|
|
1566
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
|
|
1567
|
+
fz.ts011f_plug_indicator_mode],
|
|
1568
|
+
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode],
|
|
1562
1569
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1563
1570
|
const endpoint = device.getEndpoint(1);
|
|
1564
1571
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
@@ -1570,21 +1577,31 @@ module.exports = [
|
|
|
1570
1577
|
try {
|
|
1571
1578
|
await reporting.currentSummDelivered(endpoint);
|
|
1572
1579
|
} catch (error) {/* fails for some https://github.com/Koenkk/zigbee2mqtt/issues/11179 */}
|
|
1580
|
+
await endpoint.read('genOnOff', ['onOff', 'moesStartUpOnOff', 'tuyaBacklightMode']);
|
|
1573
1581
|
},
|
|
1574
1582
|
options: [exposes.options.measurement_poll_interval()],
|
|
1575
1583
|
// This device doesn't support reporting correctly.
|
|
1576
1584
|
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/1270
|
|
1577
1585
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
1578
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
1579
|
-
.withDescription('Recover state after power outage')
|
|
1586
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
1587
|
+
.withDescription('Recover state after power outage'),
|
|
1588
|
+
exposes.enum('indicator_mode', ea.ALL, ['off', 'off/on', 'on/off']).withDescription('LED indicator mode')],
|
|
1580
1589
|
onEvent: tuya.onEventMeasurementPoll,
|
|
1581
1590
|
},
|
|
1582
1591
|
{
|
|
1583
1592
|
fingerprint: [{modelID: 'TS0111', manufacturerName: '_TYZB01_ymcdbl3u'}],
|
|
1584
1593
|
model: 'TS0111_valve',
|
|
1585
1594
|
vendor: 'TuYa',
|
|
1595
|
+
whiteLabel: [{vendor: 'TuYa', model: 'SM-AW713Z'}],
|
|
1586
1596
|
description: 'Smart water/gas valve',
|
|
1587
|
-
|
|
1597
|
+
fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.ts011f_plug_indicator_mode]),
|
|
1598
|
+
toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.ts011f_plug_indicator_mode]),
|
|
1599
|
+
exposes: extend.switch().exposes.concat([e.power_on_behavior(),
|
|
1600
|
+
exposes.enum('indicator_mode', ea.ALL, ['off', 'off/on', 'on/off', 'on']).withDescription('LED indicator mode')]),
|
|
1601
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1602
|
+
const endpoint = device.getEndpoint(1);
|
|
1603
|
+
await endpoint.read('genOnOff', ['onOff', 'moesStartUpOnOff', 'tuyaBacklightMode']);
|
|
1604
|
+
},
|
|
1588
1605
|
},
|
|
1589
1606
|
{
|
|
1590
1607
|
fingerprint: TS011Fplugs.map((manufacturerName) => {
|
|
@@ -1613,7 +1630,7 @@ module.exports = [
|
|
|
1613
1630
|
device.save();
|
|
1614
1631
|
},
|
|
1615
1632
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
1616
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
1633
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
1617
1634
|
.withDescription('Recover state after power outage'),
|
|
1618
1635
|
exposes.enum('indicator_mode', ea.ALL, ['off', 'off/on', 'on/off', 'on'])
|
|
1619
1636
|
.withDescription('Plug LED indicator mode'), e.child_lock()],
|
|
@@ -1634,7 +1651,7 @@ module.exports = [
|
|
|
1634
1651
|
const endpoint = device.getEndpoint(1);
|
|
1635
1652
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
1636
1653
|
},
|
|
1637
|
-
exposes: [e.switch(), exposes.enum('power_outage_memory', ea.
|
|
1654
|
+
exposes: [e.switch(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
1638
1655
|
.withDescription('Recover state after power outage'),
|
|
1639
1656
|
exposes.enum('indicator_mode', ea.ALL, ['off', 'off/on', 'on/off', 'on'])
|
|
1640
1657
|
.withDescription('Plug LED indicator mode'), e.child_lock()],
|
|
@@ -1665,7 +1682,7 @@ module.exports = [
|
|
|
1665
1682
|
},
|
|
1666
1683
|
options: [exposes.options.measurement_poll_interval()],
|
|
1667
1684
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
1668
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
1685
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
1669
1686
|
.withDescription('Recover state after power outage'),
|
|
1670
1687
|
exposes.enum('indicator_mode', ea.ALL, ['off', 'off/on', 'on/off', 'on'])
|
|
1671
1688
|
.withDescription('Plug LED indicator mode'), e.child_lock()],
|
|
@@ -2171,7 +2188,7 @@ module.exports = [
|
|
|
2171
2188
|
device.save();
|
|
2172
2189
|
},
|
|
2173
2190
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
2174
|
-
e.energy(), exposes.enum('power_outage_memory', ea.
|
|
2191
|
+
e.energy(), exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
2175
2192
|
.withDescription('Recover state after power outage'),
|
|
2176
2193
|
exposes.enum('indicator_mode', ea.STATE_SET, ['off', 'on_off', 'off_on'])
|
|
2177
2194
|
.withDescription('Relay LED indicator mode')],
|
|
@@ -2189,7 +2206,7 @@ module.exports = [
|
|
|
2189
2206
|
device.save();
|
|
2190
2207
|
},
|
|
2191
2208
|
exposes: [e.switch(),
|
|
2192
|
-
exposes.enum('power_outage_memory', ea.
|
|
2209
|
+
exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
2193
2210
|
.withDescription('Recover state after power outage'),
|
|
2194
2211
|
exposes.enum('indicator_mode', ea.STATE_SET, ['off', 'on_off', 'off_on'])
|
|
2195
2212
|
.withDescription('Relay LED indicator mode')],
|
package/devices/xiaomi.js
CHANGED
|
@@ -113,7 +113,21 @@ module.exports = [
|
|
|
113
113
|
model: 'ZNLDP13LM',
|
|
114
114
|
vendor: 'Xiaomi',
|
|
115
115
|
description: 'Aqara T1 smart LED bulb',
|
|
116
|
-
|
|
116
|
+
toZigbee: xiaomiExtend.light_onoff_brightness_colortemp({disableEffect: true, disablePowerOnBehavior: true}).toZigbee.concat([
|
|
117
|
+
tz.xiaomi_switch_power_outage_memory,
|
|
118
|
+
]),
|
|
119
|
+
fromZigbee: xiaomiExtend.light_onoff_brightness_colortemp({disableEffect: true, disablePowerOnBehavior: true}).fromZigbee.concat([
|
|
120
|
+
fz.aqara_opple,
|
|
121
|
+
]),
|
|
122
|
+
exposes: xiaomiExtend.light_onoff_brightness_colortemp({
|
|
123
|
+
disableEffect: true,
|
|
124
|
+
disablePowerOnBehavior: true,
|
|
125
|
+
colorTempRange: [153, 370],
|
|
126
|
+
}).exposes.concat([
|
|
127
|
+
e.power_outage_memory(),
|
|
128
|
+
e.device_temperature(),
|
|
129
|
+
e.power_outage_count(),
|
|
130
|
+
]),
|
|
117
131
|
ota: ota.zigbeeOTA,
|
|
118
132
|
},
|
|
119
133
|
{
|
package/devices/yale.js
CHANGED
|
@@ -10,7 +10,8 @@ const lockExtend = (meta) => {
|
|
|
10
10
|
fz.lock_user_status_response],
|
|
11
11
|
toZigbee: [tz.lock, tz.pincode_lock, tz.lock_userstatus],
|
|
12
12
|
meta: {pinCodeCount: 250, ...meta},
|
|
13
|
-
exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_source_user()
|
|
13
|
+
exposes: [e.lock(), e.battery(), e.pincode(), e.lock_action(), e.lock_action_source_name(), e.lock_action_source_user(),
|
|
14
|
+
e.lock_action_user()],
|
|
14
15
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
15
16
|
const endpoint = device.getEndpoint(1);
|
|
16
17
|
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
|
package/devices/zemismart.js
CHANGED
|
@@ -137,7 +137,7 @@ module.exports = [
|
|
|
137
137
|
fromZigbee: [fz.on_off, fz.tuya_switch_power_outage_memory],
|
|
138
138
|
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
|
|
139
139
|
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
|
|
140
|
-
exposes.enum('power_outage_memory', ea.
|
|
140
|
+
exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore'])
|
|
141
141
|
.withDescription('Recover state after power outage')],
|
|
142
142
|
endpoint: (device) => {
|
|
143
143
|
return {'l1': 1, 'l2': 2};
|
package/lib/exposes.js
CHANGED
|
@@ -574,6 +574,7 @@ module.exports = {
|
|
|
574
574
|
lock_action: () => new Enum('action', access.STATE, ['unknown', 'lock', 'unlock', 'lock_failure_invalid_pin_or_id', 'lock_failure_invalid_schedule', 'unlock_failure_invalid_pin_or_id', 'unlock_failure_invalid_schedule', 'one_touch_lock', 'key_lock', 'key_unlock', 'auto_lock', 'schedule_lock', 'schedule_unlock', 'manual_lock', 'manual_unlock', 'non_access_user_operational_event']).withDescription('Triggered action on the lock'),
|
|
575
575
|
lock_action_source_name: () => new Enum('action_source_name', access.STATE, ['keypad', 'rfid', 'manual', 'rf']).withDescription('Source of the triggered action on the lock'),
|
|
576
576
|
lock_action_source_user: () => new Numeric('action_source_user', access.STATE).withDescription('ID of user that triggered the action on the lock'),
|
|
577
|
+
lock_action_user: () => new Numeric('action_user', access.STATE).withDescription('ID of user that triggered the action on the lock'),
|
|
577
578
|
max_temperature: () => new Numeric('max_temperature', access.STATE_SET).withUnit('°C').withDescription('Maximum temperature').withValueMin(15).withValueMax(35),
|
|
578
579
|
max_temperature_limit: () => new Numeric('max_temperature_limit', access.STATE_SET).withUnit('°C').withDescription('Maximum temperature limit').withValueMin(0).withValueMax(35),
|
|
579
580
|
min_temperature: () => new Numeric('min_temperature', access.STATE_SET).withUnit('°C').withDescription('Minimum temperature').withValueMin(1).withValueMax(15),
|
package/lib/xiaomi.js
CHANGED
|
@@ -172,11 +172,25 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
172
172
|
case '5':
|
|
173
173
|
payload.power_outage_count = value - 1;
|
|
174
174
|
break;
|
|
175
|
+
case '8':
|
|
176
|
+
if (['ZNLDP13LM'].includes(model.model)) {
|
|
177
|
+
// We don't know what the value means for these devices.
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
case '9':
|
|
181
|
+
if (['ZNLDP13LM'].includes(model.model)) {
|
|
182
|
+
// We don't know what the value means for these devices.
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
175
185
|
case '10':
|
|
176
|
-
|
|
186
|
+
if (['ZNLDP13LM'].includes(model.model)) {
|
|
187
|
+
// We don't know what the value means for these devices.
|
|
188
|
+
} else {
|
|
189
|
+
payload.switch_type = {1: 'toggle', 2: 'momentary'}[value];
|
|
190
|
+
}
|
|
177
191
|
break;
|
|
178
192
|
case '11':
|
|
179
|
-
if (['JT-BZ-01AQ/A', 'QBKG25LM'].includes(model.model)) {
|
|
193
|
+
if (['JT-BZ-01AQ/A', 'QBKG25LM', 'ZNLDP13LM'].includes(model.model)) {
|
|
180
194
|
// We don't know what the value means for these devices.
|
|
181
195
|
// https://github.com/Koenkk/zigbee2mqtt/issues/12451
|
|
182
196
|
} else {
|
|
@@ -185,6 +199,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
185
199
|
payload.illuminance_lux = calibrateAndPrecisionRoundOptions(value, options, 'illuminance_lux');
|
|
186
200
|
}
|
|
187
201
|
break;
|
|
202
|
+
case '12':
|
|
203
|
+
if (['ZNLDP13LM'].includes(model.model)) {
|
|
204
|
+
// We don't know what the value means for these devices.
|
|
205
|
+
}
|
|
206
|
+
break;
|
|
188
207
|
case '100':
|
|
189
208
|
if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM', 'LLKZMK11LM', 'QBKG12LM', 'QBKG03LM', 'QBKG25LM']
|
|
190
209
|
.includes(model.model)) {
|
|
@@ -339,6 +358,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
339
358
|
payload.power = precisionRound(value, 2); // 0x98
|
|
340
359
|
}
|
|
341
360
|
break;
|
|
361
|
+
case '154':
|
|
362
|
+
if (['ZNLDP13LM'].includes(model.model)) {
|
|
363
|
+
// We don't know what the value means for these devices.
|
|
364
|
+
}
|
|
365
|
+
break;
|
|
342
366
|
case '159':
|
|
343
367
|
if (['JT-BZ-01AQ/A'].includes(model.model)) {
|
|
344
368
|
payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[value];
|