zigbee-herdsman-converters 14.0.599 → 14.0.602
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 +9 -11
- package/converters/toZigbee.js +21 -16
- package/devices/gledopto.js +8 -0
- package/devices/legrand.js +1 -1
- package/devices/nue_3a.js +1 -1
- package/devices/osram.js +3 -3
- package/devices/schneider_electric.js +2 -2
- package/devices/shinasystem.js +42 -1
- package/devices/tuya.js +11 -4
- package/devices/woox.js +4 -0
- package/devices/xiaomi.js +67 -55
- package/lib/extend.js +8 -6
- package/lib/utils.js +2 -2
- package/lib/xiaomi.js +12 -2
- package/package.json +2 -2
package/converters/fromZigbee.js
CHANGED
|
@@ -395,8 +395,7 @@ const converters = {
|
|
|
395
395
|
illuminance: {
|
|
396
396
|
cluster: 'msIlluminanceMeasurement',
|
|
397
397
|
type: ['attributeReport', 'readResponse'],
|
|
398
|
-
options: [exposes.options.
|
|
399
|
-
exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual')],
|
|
398
|
+
options: [exposes.options.calibration('illuminance', 'percentual'), exposes.options.calibration('illuminance_lux', 'percentual')],
|
|
400
399
|
convert: (model, msg, publish, options, meta) => {
|
|
401
400
|
// DEPRECATED: only return lux here (change illuminance_lux -> illuminance)
|
|
402
401
|
const illuminance = msg.data['measuredValue'];
|
|
@@ -5557,13 +5556,13 @@ const converters = {
|
|
|
5557
5556
|
result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
|
|
5558
5557
|
}
|
|
5559
5558
|
if (definition.exposes.find((e) => e.name === 'device_temperature')) {
|
|
5560
|
-
result.push(exposes.options.
|
|
5559
|
+
result.push(exposes.options.calibration('device_temperature'));
|
|
5561
5560
|
}
|
|
5562
5561
|
if (definition.exposes.find((e) => e.name === 'illuminance')) {
|
|
5563
|
-
result.push(exposes.options.
|
|
5562
|
+
result.push(exposes.options.calibration('illuminance', 'percentual'));
|
|
5564
5563
|
}
|
|
5565
5564
|
if (definition.exposes.find((e) => e.name === 'illuminance_lux')) {
|
|
5566
|
-
result.push(exposes.options.
|
|
5565
|
+
result.push(exposes.options.calibration('illuminance_lux', 'percentual'));
|
|
5567
5566
|
}
|
|
5568
5567
|
return result;
|
|
5569
5568
|
},
|
|
@@ -5581,7 +5580,7 @@ const converters = {
|
|
|
5581
5580
|
result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
|
|
5582
5581
|
}
|
|
5583
5582
|
if (definition.exposes.find((e) => e.name === 'device_temperature')) {
|
|
5584
|
-
result.push(exposes.options.
|
|
5583
|
+
result.push(exposes.options.calibration('device_temperature'));
|
|
5585
5584
|
}
|
|
5586
5585
|
return result;
|
|
5587
5586
|
},
|
|
@@ -5603,10 +5602,10 @@ const converters = {
|
|
|
5603
5602
|
result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
|
|
5604
5603
|
}
|
|
5605
5604
|
if (definition.exposes.find((e) => e.name === 'device_temperature')) {
|
|
5606
|
-
result.push(exposes.options.
|
|
5605
|
+
result.push(exposes.options.calibration('device_temperature'));
|
|
5607
5606
|
}
|
|
5608
5607
|
if (definition.exposes.find((e) => e.name === 'illuminance')) {
|
|
5609
|
-
result.push(exposes.options.
|
|
5608
|
+
result.push(exposes.options.calibration('illuminance', 'percentual'));
|
|
5610
5609
|
}
|
|
5611
5610
|
return result;
|
|
5612
5611
|
},
|
|
@@ -5686,8 +5685,7 @@ const converters = {
|
|
|
5686
5685
|
RTCGQ11LM_illuminance: {
|
|
5687
5686
|
cluster: 'msIlluminanceMeasurement',
|
|
5688
5687
|
type: ['attributeReport', 'readResponse'],
|
|
5689
|
-
options: [exposes.options.
|
|
5690
|
-
exposes.options.precision('illuminance_lux'), exposes.options.calibration('illuminance_lux', 'percentual')],
|
|
5688
|
+
options: [exposes.options.calibration('illuminance', 'percentual'), exposes.options.calibration('illuminance_lux', 'percentual')],
|
|
5691
5689
|
convert: (model, msg, publish, options, meta) => {
|
|
5692
5690
|
// also trigger movement, because there is no illuminance without movement
|
|
5693
5691
|
// https://github.com/Koenkk/zigbee-herdsman-converters/issues/1925
|
|
@@ -5707,7 +5705,7 @@ const converters = {
|
|
|
5707
5705
|
cluster: 'aqaraOpple',
|
|
5708
5706
|
type: ['attributeReport', 'readResponse'],
|
|
5709
5707
|
options: [exposes.options.occupancy_timeout_2(), exposes.options.no_occupancy_since_true(),
|
|
5710
|
-
exposes.options.
|
|
5708
|
+
exposes.options.calibration('illuminance', 'percentual')],
|
|
5711
5709
|
convert: (model, msg, publish, options, meta) => {
|
|
5712
5710
|
if (msg.data.hasOwnProperty('illuminance')) {
|
|
5713
5711
|
// The occupancy sensor only sends a message when motion detected.
|
package/converters/toZigbee.js
CHANGED
|
@@ -1674,7 +1674,7 @@ const converters = {
|
|
|
1674
1674
|
manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
|
|
1675
1675
|
reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
|
|
1676
1676
|
});
|
|
1677
|
-
return {state: {
|
|
1677
|
+
return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
|
|
1678
1678
|
} else if (postfix === 'right') {
|
|
1679
1679
|
channel = 2.0;
|
|
1680
1680
|
await entity.command('genLevelCtrl', 'moveToLevelWithOnOff', {level: oldstate, transtime: channel});
|
|
@@ -1683,21 +1683,21 @@ const converters = {
|
|
|
1683
1683
|
manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
|
|
1684
1684
|
reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
|
|
1685
1685
|
});
|
|
1686
|
-
return {state: {
|
|
1686
|
+
return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
|
|
1687
1687
|
} else if (postfix === 'bottom_right') {
|
|
1688
1688
|
await entity.write('genPowerCfg', (state === 'on') ? payloadOnBottomRight : payloadOffBottomRight,
|
|
1689
1689
|
{
|
|
1690
1690
|
manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
|
|
1691
1691
|
reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
|
|
1692
1692
|
});
|
|
1693
|
-
return {state: {
|
|
1693
|
+
return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
|
|
1694
1694
|
} else if (postfix === 'bottom_left') {
|
|
1695
1695
|
await entity.write('genPowerCfg', (state === 'on') ? payloadOnBottomLeft : payloadOffBottomLeft,
|
|
1696
1696
|
{
|
|
1697
1697
|
manufacturerCode: 0x1ad2, disableDefaultResponse: true, disableResponse: true,
|
|
1698
1698
|
reservedBits: 3, direction: 1, transactionSequenceNumber: 0xe9,
|
|
1699
1699
|
});
|
|
1700
|
-
return {state: {
|
|
1700
|
+
return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
|
|
1701
1701
|
}
|
|
1702
1702
|
return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
|
|
1703
1703
|
},
|
|
@@ -2669,7 +2669,7 @@ const converters = {
|
|
|
2669
2669
|
},
|
|
2670
2670
|
},
|
|
2671
2671
|
aqara_density: {
|
|
2672
|
-
key: ['gas_density', 'smoke_density'],
|
|
2672
|
+
key: ['gas_density', 'smoke_density', 'smoke_density_dbm'],
|
|
2673
2673
|
convertGet: async (entity, key, meta) => {
|
|
2674
2674
|
await entity.read('aqaraOpple', [0x013b], manufacturerOptions.xiaomi);
|
|
2675
2675
|
},
|
|
@@ -2677,8 +2677,8 @@ const converters = {
|
|
|
2677
2677
|
JTBZ01AQA_gas_sensitivity: {
|
|
2678
2678
|
key: ['gas_sensitivity'],
|
|
2679
2679
|
convertSet: async (entity, key, value, meta) => {
|
|
2680
|
-
value = value.
|
|
2681
|
-
const lookup = {'15%
|
|
2680
|
+
value = value.toUpperCase();
|
|
2681
|
+
const lookup = {'15%LEL': 1, '10%LEL': 2};
|
|
2682
2682
|
await entity.write('aqaraOpple', {0x010c: {value: lookup[value], type: 0x20}}, manufacturerOptions.xiaomi);
|
|
2683
2683
|
return {state: {gas_sensitivity: value}};
|
|
2684
2684
|
},
|
|
@@ -2692,19 +2692,24 @@ const converters = {
|
|
|
2692
2692
|
await entity.write('aqaraOpple', {0x0127: {value: true, type: 0x10}}, manufacturerOptions.xiaomi);
|
|
2693
2693
|
},
|
|
2694
2694
|
},
|
|
2695
|
-
|
|
2696
|
-
key: ['
|
|
2695
|
+
aqara_buzzer: {
|
|
2696
|
+
key: ['buzzer'],
|
|
2697
2697
|
convertSet: async (entity, key, value, meta) => {
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
await entity.write('aqaraOpple', {[`${attribute}`]: {value:
|
|
2701
|
-
|
|
2698
|
+
const attribute = ['JY-GZ-01AQ'].includes(meta.mapped.model) ? 0x013e : 0x013f;
|
|
2699
|
+
value = (value.toLowerCase() === 'alarm') ? 15361 : 15360;
|
|
2700
|
+
await entity.write('aqaraOpple', {[`${attribute}`]: {value: [`${value}`], type: 0x23}}, manufacturerOptions.xiaomi);
|
|
2701
|
+
value = (value === 15361) ? 0 : 1;
|
|
2702
|
+
await entity.write('aqaraOpple', {0x0126: {value: [`${value}`], type: 0x20}}, manufacturerOptions.xiaomi);
|
|
2702
2703
|
},
|
|
2703
2704
|
},
|
|
2704
|
-
|
|
2705
|
-
key: ['
|
|
2705
|
+
aqara_buzzer_manual: {
|
|
2706
|
+
key: ['buzzer_manual_alarm', 'buzzer_manual_mute'],
|
|
2706
2707
|
convertGet: async (entity, key, meta) => {
|
|
2707
|
-
|
|
2708
|
+
if (key === 'buzzer_manual_mute') {
|
|
2709
|
+
await entity.read('aqaraOpple', [0x0126], manufacturerOptions.xiaomi);
|
|
2710
|
+
} else if (key === 'buzzer_manual_alarm') {
|
|
2711
|
+
await entity.read('aqaraOpple', [0x013d], manufacturerOptions.xiaomi);
|
|
2712
|
+
}
|
|
2708
2713
|
},
|
|
2709
2714
|
},
|
|
2710
2715
|
JYGZ01AQ_heartbeat_indicator: {
|
package/devices/gledopto.js
CHANGED
|
@@ -482,6 +482,14 @@ module.exports = [
|
|
|
482
482
|
description: 'Zigbee 12W E26/E27 Bulb RGB+CCT (pro)',
|
|
483
483
|
extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
|
|
484
484
|
},
|
|
485
|
+
{
|
|
486
|
+
zigbeeModel: ['GL-D-002P'],
|
|
487
|
+
model: 'GL-D-002P',
|
|
488
|
+
vendor: 'Gledopto',
|
|
489
|
+
ota: ota.zigbeeOTA,
|
|
490
|
+
description: 'Zigbee 6W Downlight RGB+CCT (pro CRI>90)',
|
|
491
|
+
extend: gledoptoExtend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
|
|
492
|
+
},
|
|
485
493
|
{
|
|
486
494
|
zigbeeModel: ['GL-D-003Z'],
|
|
487
495
|
model: 'GL-D-003Z',
|
package/devices/legrand.js
CHANGED
|
@@ -202,7 +202,7 @@ module.exports = [
|
|
|
202
202
|
description: 'Power socket with power consumption monitoring',
|
|
203
203
|
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement],
|
|
204
204
|
toZigbee: [tz.on_off, tz.legrand_settingAlwaysEnableLed, tz.legrand_identify],
|
|
205
|
-
exposes: [e.switch(), e.action(['identify']), e.power()
|
|
205
|
+
exposes: [e.switch(), e.action(['identify']), e.power()],
|
|
206
206
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
207
207
|
const endpoint = device.getEndpoint(1);
|
|
208
208
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
package/devices/nue_3a.js
CHANGED
package/devices/osram.js
CHANGED
|
@@ -107,7 +107,7 @@ module.exports = [
|
|
|
107
107
|
model: 'AC03647',
|
|
108
108
|
vendor: 'OSRAM',
|
|
109
109
|
description: 'SMART+ LED CLASSIC E27 RGBW',
|
|
110
|
-
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 526]
|
|
110
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 526]}),
|
|
111
111
|
ota: ota.ledvance,
|
|
112
112
|
exposes: [e.light_brightness_colortemp_colorhs([153, 526]).removeFeature('color_temp_startup'), e.effect()],
|
|
113
113
|
},
|
|
@@ -260,7 +260,7 @@ module.exports = [
|
|
|
260
260
|
model: 'AC0363900NJ',
|
|
261
261
|
vendor: 'OSRAM',
|
|
262
262
|
description: 'Smart+ mini gardenpole RGBW',
|
|
263
|
-
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]
|
|
263
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
|
|
264
264
|
exposes: [e.light_brightness_colortemp_colorhs([153, 370]).removeFeature('color_temp_startup'), e.effect()],
|
|
265
265
|
ota: ota.ledvance,
|
|
266
266
|
},
|
|
@@ -285,7 +285,7 @@ module.exports = [
|
|
|
285
285
|
model: 'AC08559',
|
|
286
286
|
vendor: 'OSRAM',
|
|
287
287
|
description: 'SMART+ Spot GU10 Multicolor',
|
|
288
|
-
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 526]
|
|
288
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 526]}),
|
|
289
289
|
exposes: [e.light_brightness_colortemp_colorhs([153, 526]).removeFeature('color_temp_startup'), e.effect()],
|
|
290
290
|
ota: ota.ledvance,
|
|
291
291
|
},
|
|
@@ -255,8 +255,8 @@ module.exports = [
|
|
|
255
255
|
model: 'CCT5010-0001',
|
|
256
256
|
vendor: 'Schneider Electric',
|
|
257
257
|
description: 'Micro module dimmer',
|
|
258
|
-
fromZigbee: [
|
|
259
|
-
toZigbee: [
|
|
258
|
+
fromZigbee: [...extend.light_onoff_brightness().fromZigbee, fz.wiser_lighting_ballast_configuration],
|
|
259
|
+
toZigbee: [...extend.light_onoff_brightness().toZigbee, tz.ballast_config, tz.wiser_dimmer_mode],
|
|
260
260
|
exposes: [e.light_brightness().withLevelConfig(),
|
|
261
261
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
262
262
|
.withDescription('Specifies the minimum light output of the ballast'),
|
package/devices/shinasystem.js
CHANGED
|
@@ -52,7 +52,7 @@ module.exports = [
|
|
|
52
52
|
},
|
|
53
53
|
exposes: [e.battery(), e.battery_voltage(),
|
|
54
54
|
exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
|
|
55
|
-
exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(
|
|
55
|
+
exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(100).withDescription('People count')],
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
zigbeeModel: ['USM-300Z'],
|
|
@@ -390,4 +390,45 @@ module.exports = [
|
|
|
390
390
|
.withFeature(exposes.numeric('pin_code', ea.SET).withDescription('Pincode to set, set pincode(4 digit) to null to clear')),
|
|
391
391
|
],
|
|
392
392
|
},
|
|
393
|
+
{
|
|
394
|
+
zigbeeModel: ['DMS-300Z'],
|
|
395
|
+
model: 'DMS-300ZB',
|
|
396
|
+
vendor: 'ShinaSystem',
|
|
397
|
+
ota: ota.zigbeeOTA,
|
|
398
|
+
description: 'SiHAS dual motion sensor',
|
|
399
|
+
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
400
|
+
fromZigbee: [fz.battery, fz.occupancy, fz.occupancy_timeout],
|
|
401
|
+
toZigbee: [tz.occupancy_timeout],
|
|
402
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
403
|
+
const endpoint = device.getEndpoint(1);
|
|
404
|
+
const binds = ['genPowerCfg', 'msOccupancySensing'];
|
|
405
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
406
|
+
await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
|
|
407
|
+
await reporting.occupancy(endpoint, {min: 1, max: 600, change: 1});
|
|
408
|
+
await endpoint.read('msOccupancySensing', ['pirOToUDelay']);
|
|
409
|
+
},
|
|
410
|
+
exposes: [e.battery(), e.battery_voltage(), e.occupancy(),
|
|
411
|
+
exposes.numeric('occupancy_timeout', ea.ALL).withUnit('second').withValueMin(0).withValueMax(65535)],
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
zigbeeModel: ['ISM300Z3'],
|
|
415
|
+
model: 'ISM300Z3',
|
|
416
|
+
vendor: 'ShinaSystem',
|
|
417
|
+
ota: ota.zigbeeOTA,
|
|
418
|
+
description: 'SiHAS IOT smart inner switch 3 gang',
|
|
419
|
+
extend: extend.switch(),
|
|
420
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3')],
|
|
421
|
+
endpoint: (device) => {
|
|
422
|
+
return {l1: 1, l2: 2, l3: 3};
|
|
423
|
+
},
|
|
424
|
+
meta: {multiEndpoint: true},
|
|
425
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
426
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
427
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
428
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
429
|
+
await reporting.onOff(device.getEndpoint(1));
|
|
430
|
+
await reporting.onOff(device.getEndpoint(2));
|
|
431
|
+
await reporting.onOff(device.getEndpoint(3));
|
|
432
|
+
},
|
|
433
|
+
},
|
|
393
434
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -271,6 +271,13 @@ const tzLocal = {
|
|
|
271
271
|
};
|
|
272
272
|
|
|
273
273
|
const fzLocal = {
|
|
274
|
+
metering_skip_duplicate: {
|
|
275
|
+
...fz.metering,
|
|
276
|
+
convert: (model, msg, publish, options, meta) => {
|
|
277
|
+
if (utils.hasAlreadyProcessedMessage(msg)) return;
|
|
278
|
+
return fz.metering.convert(model, msg, publish, options, meta);
|
|
279
|
+
},
|
|
280
|
+
},
|
|
274
281
|
scenes_recall_scene_65029: {
|
|
275
282
|
cluster: '65029',
|
|
276
283
|
type: ['raw', 'attributeReport'],
|
|
@@ -1928,8 +1935,8 @@ module.exports = [
|
|
|
1928
1935
|
{vendor: 'BlitzWolf', model: 'BW-SHP15'}, {vendor: 'Nous', model: 'A1Z'}, {vendor: 'BlitzWolf', model: 'BW-SHP13'},
|
|
1929
1936
|
{vendor: 'MatSee Plus', model: 'PJ-ZSW01'}],
|
|
1930
1937
|
ota: ota.zigbeeOTA,
|
|
1931
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement,
|
|
1932
|
-
fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
|
1938
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
|
|
1939
|
+
fz.tuya_switch_power_outage_memory, fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
|
1933
1940
|
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
|
|
1934
1941
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1935
1942
|
const endpoint = device.getEndpoint(1);
|
|
@@ -1982,8 +1989,8 @@ module.exports = [
|
|
|
1982
1989
|
whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
|
|
1983
1990
|
{vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}],
|
|
1984
1991
|
ota: ota.zigbeeOTA,
|
|
1985
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement,
|
|
1986
|
-
fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
|
1992
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fzLocal.metering_skip_duplicate, fz.ignore_basic_report,
|
|
1993
|
+
fz.tuya_switch_power_outage_memory, fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
|
1987
1994
|
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
|
|
1988
1995
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1989
1996
|
const endpoint = device.getEndpoint(1);
|
package/devices/woox.js
CHANGED
|
@@ -106,6 +106,10 @@ module.exports = [
|
|
|
106
106
|
onEvent: tuya.onEventSetTime,
|
|
107
107
|
exposes: [e.switch(), e.battery()],
|
|
108
108
|
meta: {disableDefaultResponse: true},
|
|
109
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
110
|
+
const endpoint = device.getEndpoint(1);
|
|
111
|
+
await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
|
|
112
|
+
},
|
|
109
113
|
},
|
|
110
114
|
{
|
|
111
115
|
fingerprint: [{modelID: 'TS0505A', manufacturerName: '_TZ3000_keabpigv'}],
|
package/devices/xiaomi.js
CHANGED
|
@@ -48,7 +48,7 @@ module.exports = [
|
|
|
48
48
|
fromZigbee: [fz.ias_water_leak_alarm_1, fz.aqara_opple, fz.battery],
|
|
49
49
|
toZigbee: [],
|
|
50
50
|
exposes: [e.water_leak(), e.battery(), e.battery_low(), e.battery_voltage(), e.device_temperature(), e.power_outage_count(false)],
|
|
51
|
-
meta: {battery: {voltageToPercentage: '
|
|
51
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
52
52
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
53
53
|
const endpoint = device.getEndpoint(1);
|
|
54
54
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -62,7 +62,7 @@ module.exports = [
|
|
|
62
62
|
description: 'Aqara E1 door & window contact sensor',
|
|
63
63
|
fromZigbee: [fz.ias_contact_alarm_1, fz.aqara_opple, fz.battery],
|
|
64
64
|
toZigbee: [],
|
|
65
|
-
meta: {battery: {voltageToPercentage: '
|
|
65
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
66
66
|
exposes: [e.contact(), e.battery(), e.battery_low(), e.battery_voltage()],
|
|
67
67
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
68
68
|
const endpoint = device.getEndpoint(1);
|
|
@@ -78,7 +78,7 @@ module.exports = [
|
|
|
78
78
|
description: 'Aqara P1 door & window contact sensor',
|
|
79
79
|
fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
|
|
80
80
|
toZigbee: [],
|
|
81
|
-
meta: {battery: {voltageToPercentage: '
|
|
81
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
82
82
|
exposes: [e.contact(), e.battery(), e.battery_voltage()],
|
|
83
83
|
},
|
|
84
84
|
{
|
|
@@ -198,7 +198,7 @@ module.exports = [
|
|
|
198
198
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4040GL'}, {vendor: 'Xiaomi', model: 'YTC4006CN'},
|
|
199
199
|
{vendor: 'Xiaomi', model: 'YTC4017CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
|
|
200
200
|
description: 'MiJia wireless switch',
|
|
201
|
-
meta: {battery: {voltageToPercentage: '
|
|
201
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
202
202
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_WXKG01LM_action, fz.legacy.WXKG01LM_click],
|
|
203
203
|
exposes: [e.battery(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release', 'many']), e.battery_voltage(),
|
|
204
204
|
e.power_outage_count(false)],
|
|
@@ -209,7 +209,7 @@ module.exports = [
|
|
|
209
209
|
model: 'WXKG11LM',
|
|
210
210
|
vendor: 'Xiaomi',
|
|
211
211
|
description: 'Aqara wireless switch',
|
|
212
|
-
meta: {battery: {voltageToPercentage: '
|
|
212
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
213
213
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quadruple', 'hold', 'release']),
|
|
214
214
|
e.device_temperature(), e.power_outage_count()],
|
|
215
215
|
fromZigbee: [fz.xiaomi_multistate_action, fz.xiaomi_WXKG11LM_action, fz.xiaomi_basic,
|
|
@@ -221,7 +221,7 @@ module.exports = [
|
|
|
221
221
|
model: 'WXKG12LM',
|
|
222
222
|
vendor: 'Xiaomi',
|
|
223
223
|
description: 'Aqara wireless switch (with gyroscope)',
|
|
224
|
-
meta: {battery: {voltageToPercentage: '
|
|
224
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
225
225
|
exposes: [e.battery(), e.action(['single', 'double', 'hold', 'release', 'shake']), e.battery_voltage()],
|
|
226
226
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_multistate_action, fz.legacy.WXKG12LM_action_click_multistate],
|
|
227
227
|
toZigbee: [],
|
|
@@ -231,7 +231,7 @@ module.exports = [
|
|
|
231
231
|
model: 'WXKG03LM_rev1',
|
|
232
232
|
vendor: 'Xiaomi',
|
|
233
233
|
description: 'Aqara single key wireless wall switch (2016 model)',
|
|
234
|
-
meta: {battery: {voltageToPercentage: '
|
|
234
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
235
235
|
exposes: [e.battery(), e.action(['single']), e.battery_voltage()],
|
|
236
236
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG03LM_click],
|
|
237
237
|
toZigbee: [],
|
|
@@ -242,7 +242,7 @@ module.exports = [
|
|
|
242
242
|
model: 'WXKG03LM_rev2',
|
|
243
243
|
vendor: 'Xiaomi',
|
|
244
244
|
description: 'Aqara single key wireless wall switch (2018 model)',
|
|
245
|
-
meta: {battery: {voltageToPercentage: '
|
|
245
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
246
246
|
exposes: [e.battery(), e.action(['single', 'double', 'hold']), e.battery_voltage()],
|
|
247
247
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
|
|
248
248
|
fz.legacy.WXKG03LM_click, fz.legacy.xiaomi_action_click_multistate],
|
|
@@ -260,7 +260,7 @@ module.exports = [
|
|
|
260
260
|
e.action(['single', 'double', 'hold']),
|
|
261
261
|
e.battery_voltage()],
|
|
262
262
|
onEvent: preventReset,
|
|
263
|
-
meta: {battery: {voltageToPercentage: '
|
|
263
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
264
264
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
265
265
|
try {
|
|
266
266
|
const endpoint = device.endpoints[1];
|
|
@@ -275,7 +275,7 @@ module.exports = [
|
|
|
275
275
|
model: 'WXKG02LM_rev1',
|
|
276
276
|
vendor: 'Xiaomi',
|
|
277
277
|
description: 'Aqara double key wireless wall switch (2016 model)',
|
|
278
|
-
meta: {battery: {voltageToPercentage: '
|
|
278
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
279
279
|
exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both']), e.battery_voltage(), e.power_outage_count(false)],
|
|
280
280
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_basic, fz.legacy.WXKG02LM_click],
|
|
281
281
|
toZigbee: [],
|
|
@@ -286,7 +286,7 @@ module.exports = [
|
|
|
286
286
|
model: 'WXKG02LM_rev2',
|
|
287
287
|
vendor: 'Xiaomi',
|
|
288
288
|
description: 'Aqara double key wireless wall switch (2018 model)',
|
|
289
|
-
meta: {battery: {voltageToPercentage: '
|
|
289
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
290
290
|
exposes: [e.battery(), e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'double_both',
|
|
291
291
|
'hold_left', 'hold_right', 'hold_both']), e.battery_voltage()],
|
|
292
292
|
fromZigbee: [fz.xiaomi_on_off_action, fz.xiaomi_multistate_action, fz.xiaomi_basic,
|
|
@@ -603,7 +603,7 @@ module.exports = [
|
|
|
603
603
|
model: 'WXKG07LM',
|
|
604
604
|
vendor: 'Xiaomi',
|
|
605
605
|
description: 'Aqara D1 double key wireless wall switch',
|
|
606
|
-
meta: {battery: {voltageToPercentage: '
|
|
606
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
607
607
|
fromZigbee: [fz.xiaomi_basic, fz.legacy.xiaomi_on_off_action, fz.legacy.xiaomi_multistate_action],
|
|
608
608
|
toZigbee: [],
|
|
609
609
|
endpoint: (device) => {
|
|
@@ -885,7 +885,7 @@ module.exports = [
|
|
|
885
885
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4042GL'}, {vendor: 'Xiaomi', model: 'YTC4007CN'},
|
|
886
886
|
{vendor: 'Xiaomi', model: 'YTC4018CN'}],
|
|
887
887
|
description: 'MiJia temperature & humidity sensor',
|
|
888
|
-
meta: {battery: {voltageToPercentage: '
|
|
888
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
889
889
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity],
|
|
890
890
|
toZigbee: [],
|
|
891
891
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
@@ -895,7 +895,7 @@ module.exports = [
|
|
|
895
895
|
model: 'WSDCGQ11LM',
|
|
896
896
|
vendor: 'Xiaomi',
|
|
897
897
|
description: 'Aqara temperature, humidity and pressure sensor',
|
|
898
|
-
meta: {battery: {voltageToPercentage: '
|
|
898
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
899
899
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_temperature, fz.humidity, fz.pressure],
|
|
900
900
|
toZigbee: [],
|
|
901
901
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.battery_voltage()],
|
|
@@ -913,7 +913,7 @@ module.exports = [
|
|
|
913
913
|
toZigbee: [],
|
|
914
914
|
exposes: [e.temperature(), e.humidity(), e.pressure(), e.device_temperature(), e.battery(), e.battery_voltage(),
|
|
915
915
|
e.power_outage_count(false)],
|
|
916
|
-
meta: {battery: {voltageToPercentage: '
|
|
916
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
917
917
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
918
918
|
const endpoint = device.getEndpoint(1);
|
|
919
919
|
const binds = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement'];
|
|
@@ -929,7 +929,7 @@ module.exports = [
|
|
|
929
929
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4041GL'}, {vendor: 'Xiaomi', model: 'YTC4004CN'},
|
|
930
930
|
{vendor: 'Xiaomi', model: 'YTC4016CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
|
|
931
931
|
description: 'MiJia human body movement sensor',
|
|
932
|
-
meta: {battery: {voltageToPercentage: '
|
|
932
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
933
933
|
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout],
|
|
934
934
|
toZigbee: [],
|
|
935
935
|
exposes: [e.battery(), e.occupancy(), e.battery_voltage(), e.power_outage_count(false)],
|
|
@@ -939,7 +939,7 @@ module.exports = [
|
|
|
939
939
|
model: 'RTCGQ11LM',
|
|
940
940
|
vendor: 'Xiaomi',
|
|
941
941
|
description: 'Aqara human body movement and illuminance sensor',
|
|
942
|
-
meta: {battery: {voltageToPercentage: '
|
|
942
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
943
943
|
fromZigbee: [fz.xiaomi_basic, fz.occupancy_with_timeout, fz.RTCGQ11LM_illuminance],
|
|
944
944
|
toZigbee: [],
|
|
945
945
|
exposes: [e.battery(), e.occupancy(), e.device_temperature(), e.battery_voltage(), e.illuminance_lux().withProperty('illuminance'),
|
|
@@ -957,7 +957,7 @@ module.exports = [
|
|
|
957
957
|
exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
|
|
958
958
|
.withDescription('Time interval for detecting actions'),
|
|
959
959
|
e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
960
|
-
meta: {battery: {voltageToPercentage: '
|
|
960
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
961
961
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
962
962
|
const endpoint = device.getEndpoint(1);
|
|
963
963
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -976,7 +976,7 @@ module.exports = [
|
|
|
976
976
|
exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
|
|
977
977
|
.withDescription('Time interval for detecting actions'),
|
|
978
978
|
e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
979
|
-
meta: {battery: {voltageToPercentage: '
|
|
979
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
980
980
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
981
981
|
const endpoint = device.getEndpoint(1);
|
|
982
982
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -1004,7 +1004,7 @@ module.exports = [
|
|
|
1004
1004
|
'blue LED will blink once when motion is detected. ' +
|
|
1005
1005
|
'Press pairing button right before changing this otherwise it will fail.'),
|
|
1006
1006
|
e.device_temperature(), e.battery(), e.battery_voltage()],
|
|
1007
|
-
meta: {battery: {voltageToPercentage: '
|
|
1007
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1008
1008
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1009
1009
|
const endpoint = device.getEndpoint(1);
|
|
1010
1010
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -1026,7 +1026,7 @@ module.exports = [
|
|
|
1026
1026
|
exposes.numeric('detection_interval', ea.ALL).withValueMin(2).withValueMax(65535).withUnit('s')
|
|
1027
1027
|
.withDescription('Time interval for detecting actions'),
|
|
1028
1028
|
e.device_temperature(), e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
1029
|
-
meta: {battery: {voltageToPercentage: '
|
|
1029
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1030
1030
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1031
1031
|
const endpoint = device.getEndpoint(1);
|
|
1032
1032
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
@@ -1070,7 +1070,7 @@ module.exports = [
|
|
|
1070
1070
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4039GL'}, {vendor: 'Xiaomi', model: 'YTC4005CN'},
|
|
1071
1071
|
{vendor: 'Xiaomi', model: 'YTC4015CN'}, {vendor: 'Xiaomi', model: 'ZHTZ02LM'}],
|
|
1072
1072
|
description: 'MiJia door & window contact sensor',
|
|
1073
|
-
meta: {battery: {voltageToPercentage: '
|
|
1073
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1074
1074
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
|
|
1075
1075
|
toZigbee: [],
|
|
1076
1076
|
exposes: [e.battery(), e.contact(), e.battery_voltage(), e.power_outage_count(false)],
|
|
@@ -1080,7 +1080,7 @@ module.exports = [
|
|
|
1080
1080
|
model: 'MCCGQ11LM',
|
|
1081
1081
|
vendor: 'Xiaomi',
|
|
1082
1082
|
description: 'Aqara door & window contact sensor',
|
|
1083
|
-
meta: {battery: {voltageToPercentage: '
|
|
1083
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1084
1084
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_contact],
|
|
1085
1085
|
toZigbee: [],
|
|
1086
1086
|
exposes: [e.battery(), e.contact(), e.device_temperature(), e.battery_voltage(), e.power_outage_count(false)],
|
|
@@ -1094,7 +1094,7 @@ module.exports = [
|
|
|
1094
1094
|
model: 'SJCGQ11LM',
|
|
1095
1095
|
vendor: 'Xiaomi',
|
|
1096
1096
|
description: 'Aqara water leak sensor',
|
|
1097
|
-
meta: {battery: {voltageToPercentage: '
|
|
1097
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1098
1098
|
fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
|
|
1099
1099
|
toZigbee: [],
|
|
1100
1100
|
exposes: [e.battery(), e.water_leak(), e.battery_low(), e.battery_voltage(), e.device_temperature(), e.power_outage_count(false)],
|
|
@@ -1104,7 +1104,7 @@ module.exports = [
|
|
|
1104
1104
|
model: 'SJCGQ12LM',
|
|
1105
1105
|
vendor: 'Xiaomi',
|
|
1106
1106
|
description: 'Aqara T1 water leak sensor',
|
|
1107
|
-
meta: {battery: {voltageToPercentage: '
|
|
1107
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1108
1108
|
fromZigbee: [fz.xiaomi_basic, fz.ias_water_leak_alarm_1],
|
|
1109
1109
|
toZigbee: [],
|
|
1110
1110
|
exposes: [e.battery(), e.water_leak(), e.battery_low(), e.tamper(), e.battery_voltage()],
|
|
@@ -1115,7 +1115,7 @@ module.exports = [
|
|
|
1115
1115
|
model: 'MFKZQ01LM',
|
|
1116
1116
|
vendor: 'Xiaomi',
|
|
1117
1117
|
description: 'Mi/Aqara smart home cube',
|
|
1118
|
-
meta: {battery: {voltageToPercentage: '
|
|
1118
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1119
1119
|
fromZigbee: [fz.xiaomi_basic, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog],
|
|
1120
1120
|
exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'), e.device_temperature(), e.power_outage_count(false),
|
|
1121
1121
|
e.cube_side('action_from_side'), e.cube_side('action_side'), e.cube_side('action_to_side'), e.cube_side('side'),
|
|
@@ -1276,7 +1276,7 @@ module.exports = [
|
|
|
1276
1276
|
description: 'MiJia Honeywell smoke detector',
|
|
1277
1277
|
vendor: 'Xiaomi',
|
|
1278
1278
|
whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4020RT'}],
|
|
1279
|
-
meta: {battery: {voltageToPercentage: '
|
|
1279
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1280
1280
|
fromZigbee: [fz.xiaomi_basic, fz.JTYJGD01LMBW_smoke],
|
|
1281
1281
|
toZigbee: [tz.JTQJBF01LMBW_JTYJGD01LMBW_sensitivity, tz.JTQJBF01LMBW_JTYJGD01LMBW_selfest],
|
|
1282
1282
|
exposes: [
|
|
@@ -1305,8 +1305,8 @@ module.exports = [
|
|
|
1305
1305
|
vendor: 'Xiaomi',
|
|
1306
1306
|
description: 'Aqara smart natural gas detector',
|
|
1307
1307
|
fromZigbee: [fz.aqara_opple],
|
|
1308
|
-
toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.JTBZ01AQA_gas_sensitivity, tz.aqara_selftest, tz.
|
|
1309
|
-
tz.
|
|
1308
|
+
toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.JTBZ01AQA_gas_sensitivity, tz.aqara_selftest, tz.aqara_buzzer,
|
|
1309
|
+
tz.aqara_buzzer_manual, tz.aqara_linkage_alarm, tz.JTBZ01AQA_state, tz.aqara_power_outage_count],
|
|
1310
1310
|
exposes: [e.gas().withAccess(ea.STATE_GET),
|
|
1311
1311
|
exposes.numeric('gas_density', ea.STATE_GET).withUnit('%LEL').withDescription('Value of gas concentration'),
|
|
1312
1312
|
exposes.enum('gas_sensitivity', ea.ALL, ['10%LEL', '15%LEL']).withDescription('Gas concentration value at which ' +
|
|
@@ -1314,11 +1314,16 @@ module.exports = [
|
|
|
1314
1314
|
exposes.enum('selftest', ea.SET, ['']).withDescription('Starts the self-test process (checking the indicator ' +
|
|
1315
1315
|
'light and buzzer work properly)'),
|
|
1316
1316
|
exposes.binary('test', ea.STATE, true, false).withDescription('Self-test in progress'),
|
|
1317
|
-
exposes.enum('
|
|
1318
|
-
'
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1317
|
+
exposes.enum('buzzer', ea.SET, ['mute', 'alarm']).withDescription('The buzzer can be muted and alarmed manually. ' +
|
|
1318
|
+
'During a gas alarm, the buzzer can be manually muted for 10 minutes ("mute"), but cannot be unmuted manually ' +
|
|
1319
|
+
'before this timeout expires. The buzzer cannot be pre-muted, as this function only works during a gas alarm. ' +
|
|
1320
|
+
'During the absence of a gas alarm, the buzzer can be manually alarmed ("alarm") and disalarmed ("mute")'),
|
|
1321
|
+
exposes.binary('buzzer_manual_alarm', ea.STATE_GET, true, false).withDescription('Buzzer alarmed (manually)'),
|
|
1322
|
+
exposes.binary('buzzer_manual_mute', ea.STATE_GET, true, false).withDescription('Buzzer muted (manually)'),
|
|
1323
|
+
exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a gas ' +
|
|
1324
|
+
'alarm has occurred, then "linkage_alarm_state"=true, and when the gas alarm has ended or the buzzer has ' +
|
|
1325
|
+
'been manually muted, then "linkage_alarm_state"=false'),
|
|
1326
|
+
exposes.binary('linkage_alarm_state', ea.STATE, true, false).withDescription('"linkage_alarm" is triggered'),
|
|
1322
1327
|
exposes.binary('state', ea.STATE_GET, 'preparation', 'work').withDescription('"Preparation" or "work" ' +
|
|
1323
1328
|
'(measurement of the gas concentration value and triggering of an alarm are only performed in the "work" state)'),
|
|
1324
1329
|
e.power_outage_count().withAccess(ea.STATE_GET)],
|
|
@@ -1326,6 +1331,7 @@ module.exports = [
|
|
|
1326
1331
|
const endpoint = device.getEndpoint(1);
|
|
1327
1332
|
await endpoint.read('aqaraOpple', [0x013a], {manufacturerCode: 0x115f});
|
|
1328
1333
|
await endpoint.read('aqaraOpple', [0x013b], {manufacturerCode: 0x115f});
|
|
1334
|
+
await endpoint.read('aqaraOpple', [0x013d], {manufacturerCode: 0x115f});
|
|
1329
1335
|
await endpoint.read('aqaraOpple', [0x0126], {manufacturerCode: 0x115f});
|
|
1330
1336
|
await endpoint.read('aqaraOpple', [0x0139], {manufacturerCode: 0x115f});
|
|
1331
1337
|
await endpoint.read('aqaraOpple', [0x010c], {manufacturerCode: 0x115f});
|
|
@@ -1340,29 +1346,35 @@ module.exports = [
|
|
|
1340
1346
|
vendor: 'Xiaomi',
|
|
1341
1347
|
description: 'Aqara smart smoke detector',
|
|
1342
1348
|
fromZigbee: [fz.aqara_opple, fz.battery],
|
|
1343
|
-
toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.aqara_selftest, tz.
|
|
1349
|
+
toZigbee: [tz.aqara_alarm, tz.aqara_density, tz.aqara_selftest, tz.aqara_buzzer, tz.aqara_buzzer_manual,
|
|
1344
1350
|
tz.JYGZ01AQ_heartbeat_indicator, tz.aqara_linkage_alarm],
|
|
1345
1351
|
exposes: [e.smoke().withAccess(ea.STATE_GET),
|
|
1346
1352
|
exposes.numeric('smoke_density', ea.STATE_GET).withDescription('Value of smoke concentration'),
|
|
1347
|
-
exposes.numeric('smoke_density_dbm', ea.
|
|
1353
|
+
exposes.numeric('smoke_density_dbm', ea.STATE_GET).withUnit('dB/m').withDescription('Value of smoke concentration in dB/m'),
|
|
1348
1354
|
exposes.enum('selftest', ea.SET, ['']).withDescription('Starts the self-test process (checking the indicator ' +
|
|
1349
1355
|
'light and buzzer work properly)'),
|
|
1350
1356
|
exposes.binary('test', ea.STATE, true, false).withDescription('Self-test in progress'),
|
|
1351
|
-
exposes.enum('
|
|
1352
|
-
'
|
|
1353
|
-
|
|
1357
|
+
exposes.enum('buzzer', ea.SET, ['mute', 'alarm']).withDescription('The buzzer can be muted and alarmed manually. ' +
|
|
1358
|
+
'During a smoke alarm, the buzzer can be manually muted for 80 seconds ("mute") and unmuted ("alarm"). ' +
|
|
1359
|
+
'The buzzer cannot be pre-muted, as this function only works during a smoke alarm. ' +
|
|
1360
|
+
'During the absence of a smoke alarm, the buzzer can be manually alarmed ("alarm") and disalarmed ("mute")'),
|
|
1361
|
+
exposes.binary('buzzer_manual_alarm', ea.STATE_GET, true, false).withDescription('Buzzer alarmed (manually)'),
|
|
1362
|
+
exposes.binary('buzzer_manual_mute', ea.STATE_GET, true, false).withDescription('Buzzer muted (manually)'),
|
|
1354
1363
|
exposes.binary('heartbeat_indicator', ea.ALL, true, false).withDescription('When this option is enabled then in ' +
|
|
1355
1364
|
'the normal monitoring state, the green indicator light flashes every 60 seconds'),
|
|
1356
1365
|
exposes.binary('linkage_alarm', ea.ALL, true, false).withDescription('When this option is enabled and a smoke ' +
|
|
1357
|
-
'
|
|
1366
|
+
'alarm has occurred, then "linkage_alarm_state"=true, and when the smoke alarm has ended or the buzzer has ' +
|
|
1367
|
+
'been manually muted, then "linkage_alarm_state"=false'),
|
|
1368
|
+
exposes.binary('linkage_alarm_state', ea.STATE, true, false).withDescription('"linkage_alarm" is triggered'),
|
|
1358
1369
|
e.battery(), e.battery_voltage(), e.power_outage_count(false)],
|
|
1359
|
-
meta: {battery: {voltageToPercentage: '
|
|
1370
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1360
1371
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1361
1372
|
const endpoint = device.getEndpoint(1);
|
|
1362
1373
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
1363
1374
|
await endpoint.read('aqaraOpple', [0x013a], {manufacturerCode: 0x115f});
|
|
1364
1375
|
await endpoint.read('aqaraOpple', [0x013b], {manufacturerCode: 0x115f});
|
|
1365
1376
|
await endpoint.read('aqaraOpple', [0x013c], {manufacturerCode: 0x115f});
|
|
1377
|
+
await endpoint.read('aqaraOpple', [0x013d], {manufacturerCode: 0x115f});
|
|
1366
1378
|
await endpoint.read('aqaraOpple', [0x0126], {manufacturerCode: 0x115f});
|
|
1367
1379
|
await endpoint.read('aqaraOpple', [0x014b], {manufacturerCode: 0x115f});
|
|
1368
1380
|
},
|
|
@@ -1382,7 +1394,7 @@ module.exports = [
|
|
|
1382
1394
|
model: 'DJT11LM',
|
|
1383
1395
|
vendor: 'Xiaomi',
|
|
1384
1396
|
description: 'Aqara vibration sensor',
|
|
1385
|
-
meta: {battery: {voltageToPercentage: '
|
|
1397
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1386
1398
|
fromZigbee: [fz.xiaomi_basic, fz.DJT11LM_vibration],
|
|
1387
1399
|
toZigbee: [tz.DJT11LM_vibration_sensitivity],
|
|
1388
1400
|
exposes: [
|
|
@@ -1608,7 +1620,7 @@ module.exports = [
|
|
|
1608
1620
|
]), exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
1609
1621
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
1610
1622
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1611
|
-
meta: {battery: {voltageToPercentage: '
|
|
1623
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1612
1624
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1613
1625
|
const endpoint = device.getEndpoint(1);
|
|
1614
1626
|
await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
|
|
@@ -1630,7 +1642,7 @@ module.exports = [
|
|
|
1630
1642
|
]), exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
1631
1643
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
1632
1644
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1633
|
-
meta: {battery: {voltageToPercentage: '
|
|
1645
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1634
1646
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1635
1647
|
const endpoint = device.getEndpoint(1);
|
|
1636
1648
|
await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
|
|
@@ -1657,7 +1669,7 @@ module.exports = [
|
|
|
1657
1669
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)'),
|
|
1658
1670
|
e.power_outage_count(false)],
|
|
1659
1671
|
toZigbee: [tz.aqara_opple_operation_mode],
|
|
1660
|
-
meta: {battery: {voltageToPercentage: '
|
|
1672
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1661
1673
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1662
1674
|
const endpoint = device.getEndpoint(1);
|
|
1663
1675
|
await endpoint.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f});
|
|
@@ -1674,7 +1686,7 @@ module.exports = [
|
|
|
1674
1686
|
description: 'MiJia light intensity sensor',
|
|
1675
1687
|
fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
|
|
1676
1688
|
toZigbee: [],
|
|
1677
|
-
meta: {battery: {voltageToPercentage: '
|
|
1689
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1678
1690
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1679
1691
|
const endpoint = device.getEndpoint(1);
|
|
1680
1692
|
await reporting.bind(endpoint, coordinatorEndpoint, ['msIlluminanceMeasurement']);
|
|
@@ -1831,7 +1843,7 @@ module.exports = [
|
|
|
1831
1843
|
description: 'Aqara wireless remote switch H1 (double rocker)',
|
|
1832
1844
|
fromZigbee: [fz.battery, fz.xiaomi_multistate_action, fz.aqara_opple, fz.command_toggle],
|
|
1833
1845
|
toZigbee: [tz.xiaomi_switch_click_mode, tz.aqara_opple_operation_mode],
|
|
1834
|
-
meta: {battery: {voltageToPercentage: '
|
|
1846
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}, multiEndpoint: true},
|
|
1835
1847
|
exposes: [
|
|
1836
1848
|
e.battery(), e.battery_voltage(), e.action([
|
|
1837
1849
|
'single_left', 'single_right', 'single_both',
|
|
@@ -1920,7 +1932,7 @@ module.exports = [
|
|
|
1920
1932
|
description: 'Aqara TVOC air quality monitor',
|
|
1921
1933
|
fromZigbee: [fz.xiaomi_tvoc, fz.battery, fz.temperature, fz.humidity, fz.aqara_opple],
|
|
1922
1934
|
toZigbee: [],
|
|
1923
|
-
meta: {battery: {voltageToPercentage: '
|
|
1935
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
1924
1936
|
exposes: [e.temperature(), e.humidity(), e.voc(), e.device_temperature(), e.battery(), e.battery_voltage()],
|
|
1925
1937
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1926
1938
|
const endpoint = device.getEndpoint(1);
|
|
@@ -1999,7 +2011,7 @@ module.exports = [
|
|
|
1999
2011
|
model: 'WXKG13LM',
|
|
2000
2012
|
vendor: 'Xiaomi',
|
|
2001
2013
|
description: 'Aqara T1 wireless mini switch',
|
|
2002
|
-
meta: {battery: {voltageToPercentage: '
|
|
2014
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2003
2015
|
fromZigbee: [fz.battery, fz.aqara_opple_multistate, fz.aqara_opple],
|
|
2004
2016
|
toZigbee: [],
|
|
2005
2017
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'quintuple', 'hold', 'release', 'many'])],
|
|
@@ -2015,7 +2027,7 @@ module.exports = [
|
|
|
2015
2027
|
description: 'Aqara T1 light intensity sensor',
|
|
2016
2028
|
fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
|
|
2017
2029
|
toZigbee: [tz.GZCGQ11LM_detection_period],
|
|
2018
|
-
meta: {battery: {voltageToPercentage: '
|
|
2030
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2019
2031
|
exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux(),
|
|
2020
2032
|
exposes.numeric('detection_period', exposes.access.ALL).withValueMin(1).withValueMax(59).withUnit('s')
|
|
2021
2033
|
.withDescription('Time interval in seconds to report after light changes')],
|
|
@@ -2054,7 +2066,7 @@ module.exports = [
|
|
|
2054
2066
|
description: 'Aqara T1 door & window contact sensor',
|
|
2055
2067
|
fromZigbee: [fz.xiaomi_contact, fz.aqara_opple],
|
|
2056
2068
|
toZigbee: [],
|
|
2057
|
-
meta: {battery: {voltageToPercentage: '
|
|
2069
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2058
2070
|
exposes: [e.contact(), e.battery(), e.battery_voltage()],
|
|
2059
2071
|
},
|
|
2060
2072
|
{
|
|
@@ -2078,7 +2090,7 @@ module.exports = [
|
|
|
2078
2090
|
model: 'ZNXNKG02LM',
|
|
2079
2091
|
vendor: 'Xiaomi',
|
|
2080
2092
|
description: 'Aqara knob H1 (wireless)',
|
|
2081
|
-
meta: {battery: {voltageToPercentage: '
|
|
2093
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2082
2094
|
exposes: [e.battery(), e.battery_voltage(),
|
|
2083
2095
|
e.action(['single', 'double', 'hold', 'release', 'start_rotating', 'rotation', 'stop_rotating']),
|
|
2084
2096
|
exposes.enum('operation_mode', ea.ALL, ['event', 'command']).withDescription('Button mode'),
|
|
@@ -2101,7 +2113,7 @@ module.exports = [
|
|
|
2101
2113
|
model: 'WXKG16LM',
|
|
2102
2114
|
vendor: 'Xiaomi',
|
|
2103
2115
|
description: 'Aqara wireless remote switch E1 (single rocker)',
|
|
2104
|
-
meta: {battery: {voltageToPercentage: '
|
|
2116
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2105
2117
|
fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
2106
2118
|
toZigbee: [tz.xiaomi_switch_click_mode],
|
|
2107
2119
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
|
|
@@ -2117,7 +2129,7 @@ module.exports = [
|
|
|
2117
2129
|
model: 'WXKG17LM',
|
|
2118
2130
|
vendor: 'Xiaomi',
|
|
2119
2131
|
description: 'Aqara E1 double key wireless switch',
|
|
2120
|
-
meta: {battery: {voltageToPercentage: '
|
|
2132
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2121
2133
|
exposes: [e.battery(), e.battery_voltage(),
|
|
2122
2134
|
e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'hold_left', 'hold_right']),
|
|
2123
2135
|
// eslint-disable-next-line max-len
|
|
@@ -2145,7 +2157,7 @@ module.exports = [
|
|
|
2145
2157
|
'multi: supports more events like double and hold'),
|
|
2146
2158
|
exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
2147
2159
|
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
2148
|
-
meta: {battery: {voltageToPercentage: '
|
|
2160
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2149
2161
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2150
2162
|
const endpoint1 = device.getEndpoint(1);
|
|
2151
2163
|
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
package/lib/extend.js
CHANGED
|
@@ -125,17 +125,19 @@ const extend = {
|
|
|
125
125
|
...extend.light_onoff_brightness(options),
|
|
126
126
|
toZigbee: extend.light_onoff_brightness(options).toZigbee.concat([tz.ledvance_commands]),
|
|
127
127
|
}),
|
|
128
|
-
light_onoff_brightness_colortemp: (options={
|
|
129
|
-
...extend.light_onoff_brightness_colortemp(options),
|
|
130
|
-
toZigbee: extend.light_onoff_brightness_colortemp(options)
|
|
128
|
+
light_onoff_brightness_colortemp: (options={}) => ({
|
|
129
|
+
...extend.light_onoff_brightness_colortemp({disableColorTempStartup: true, ...options}),
|
|
130
|
+
toZigbee: extend.light_onoff_brightness_colortemp({disableColorTempStartup: true, ...options})
|
|
131
|
+
.toZigbee.concat([tz.ledvance_commands]),
|
|
131
132
|
}),
|
|
132
133
|
light_onoff_brightness_color: (options={}) => ({
|
|
133
134
|
...extend.light_onoff_brightness_color({supportsHS: true, ...options}),
|
|
134
135
|
toZigbee: extend.light_onoff_brightness_color({supportsHS: true, ...options}).toZigbee.concat([tz.ledvance_commands]),
|
|
135
136
|
}),
|
|
136
|
-
light_onoff_brightness_colortemp_color: (options={
|
|
137
|
-
...extend.light_onoff_brightness_colortemp_color({supportsHS: true, ...options}),
|
|
138
|
-
toZigbee: extend.light_onoff_brightness_colortemp_color({supportsHS: true, ...options})
|
|
137
|
+
light_onoff_brightness_colortemp_color: (options={}) => ({
|
|
138
|
+
...extend.light_onoff_brightness_colortemp_color({supportsHS: true, disableColorTempStartup: true, ...options}),
|
|
139
|
+
toZigbee: extend.light_onoff_brightness_colortemp_color({supportsHS: true, disableColorTempStartup: true, ...options})
|
|
140
|
+
.toZigbee.concat([tz.ledvance_commands]),
|
|
139
141
|
}),
|
|
140
142
|
};
|
|
141
143
|
}
|
package/lib/utils.js
CHANGED
|
@@ -166,8 +166,8 @@ function batteryVoltageToPercentage(voltage, option) {
|
|
|
166
166
|
percentage = 0;
|
|
167
167
|
}
|
|
168
168
|
percentage = Math.round(percentage);
|
|
169
|
-
} else if (option === '
|
|
170
|
-
percentage = toPercentage(voltage, 2850,
|
|
169
|
+
} else if (option === '3V_2850_3000') {
|
|
170
|
+
percentage = toPercentage(voltage, 2850, 3000);
|
|
171
171
|
} else if (option === '4LR6AA1_5v') {
|
|
172
172
|
percentage = toPercentage(voltage, 3000, 4200);
|
|
173
173
|
} else if (option === '3V_add 1V') {
|
package/lib/xiaomi.js
CHANGED
|
@@ -392,7 +392,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
392
392
|
break;
|
|
393
393
|
case '163':
|
|
394
394
|
if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
|
|
395
|
-
payload.
|
|
395
|
+
payload.buzzer_manual_mute = value === 1;
|
|
396
396
|
}
|
|
397
397
|
break;
|
|
398
398
|
case '164':
|
|
@@ -437,7 +437,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
437
437
|
break;
|
|
438
438
|
case '294':
|
|
439
439
|
if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
|
|
440
|
-
payload.
|
|
440
|
+
payload.buzzer_manual_mute = value === 1;
|
|
441
441
|
}
|
|
442
442
|
break;
|
|
443
443
|
case '295':
|
|
@@ -471,6 +471,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
471
471
|
payload.heartbeat_indicator = value === 1;
|
|
472
472
|
}
|
|
473
473
|
break;
|
|
474
|
+
case '317':
|
|
475
|
+
if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
|
|
476
|
+
payload.buzzer_manual_alarm = value === 1;
|
|
477
|
+
}
|
|
478
|
+
break;
|
|
474
479
|
case '322':
|
|
475
480
|
if (['RTCZCGQ11LM'].includes(model.model)) {
|
|
476
481
|
payload.presence = {0: false, 1: true, 255: null}[value];
|
|
@@ -497,6 +502,11 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
497
502
|
payload.linkage_alarm = value === 1;
|
|
498
503
|
}
|
|
499
504
|
break;
|
|
505
|
+
case '332':
|
|
506
|
+
if (['JT-BZ-01AQ/A', 'JY-GZ-01AQ'].includes(model.model)) {
|
|
507
|
+
payload.linkage_alarm_state = value === 1;
|
|
508
|
+
}
|
|
509
|
+
break;
|
|
500
510
|
case '338':
|
|
501
511
|
if (['RTCGQ14LM'].includes(model.model)) {
|
|
502
512
|
payload.trigger_indicator = value === 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.602",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
39
|
"https-proxy-agent": "^5.0.1",
|
|
40
40
|
"tar-stream": "^2.2.0",
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
41
|
+
"zigbee-herdsman": "^0.14.48"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|