zigbee-herdsman-converters 14.0.391 → 14.0.392
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 +25 -1
- package/converters/toZigbee.js +29 -0
- package/devices/lg.js +18 -0
- package/devices/neo.js +23 -0
- package/devices/philips.js +19 -1
- package/devices/sercomm.js +16 -0
- package/devices/tuya.js +3 -1
- package/devices/xiaomi.js +21 -2
- package/lib/tuya.js +11 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -2498,6 +2498,29 @@ const converters = {
|
|
|
2498
2498
|
}
|
|
2499
2499
|
},
|
|
2500
2500
|
},
|
|
2501
|
+
neo_alarm: {
|
|
2502
|
+
cluster: 'manuSpecificTuya',
|
|
2503
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
2504
|
+
convert: (model, msg, publish, options, meta) => {
|
|
2505
|
+
const dp = msg.data.dp;
|
|
2506
|
+
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
2507
|
+
|
|
2508
|
+
switch (dp) {
|
|
2509
|
+
case tuya.dataPoints.neoAOAlarm: // 0x13 [TRUE,FALSE]
|
|
2510
|
+
return {alarm: value};
|
|
2511
|
+
case tuya.dataPoints.neoAODuration: // 0x7 [0,0,0,10] duration alarm in second
|
|
2512
|
+
return {duration: value};
|
|
2513
|
+
case tuya.dataPoints.neoAOBattPerc: // 0x15 [0,0,0,100] battery percentage
|
|
2514
|
+
return {battpercentage: value};
|
|
2515
|
+
case tuya.dataPoints.neoAOMelody: // 0x21 [5] Melody
|
|
2516
|
+
return {melody: value};
|
|
2517
|
+
case tuya.dataPoints.neoAOVolume: // 0x5 [0]/[1]/[2] Volume 0-max, 2-low
|
|
2518
|
+
return {volume: {2: 'low', 1: 'medium', 0: 'high'}[value]};
|
|
2519
|
+
default: // Unknown code
|
|
2520
|
+
meta.logger.warn(`Unhandled DP #${dp}: ${JSON.stringify(msg.data)}`);
|
|
2521
|
+
}
|
|
2522
|
+
},
|
|
2523
|
+
},
|
|
2501
2524
|
terncy_contact: {
|
|
2502
2525
|
cluster: 'genBinaryInput',
|
|
2503
2526
|
type: 'attributeReport',
|
|
@@ -5268,6 +5291,7 @@ const converters = {
|
|
|
5268
5291
|
payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[msg.data['268']];
|
|
5269
5292
|
}
|
|
5270
5293
|
}
|
|
5294
|
+
if (msg.data.hasOwnProperty('293')) payload.click_mode = {1: 'fast', 2: 'multi'}[msg.data['293']];
|
|
5271
5295
|
if (msg.data.hasOwnProperty('294')) payload.mute = msg.data['294'] === 1; // JT-BZ-01AQ/A
|
|
5272
5296
|
if (msg.data.hasOwnProperty('295')) payload.test = msg.data['295'] === 1; // JT-BZ-01AQ/A
|
|
5273
5297
|
if (msg.data.hasOwnProperty('313')) payload.state = msg.data['313'] === 1 ? 'preparation' : 'work'; // JT-BZ-01AQ/A
|
|
@@ -7694,7 +7718,7 @@ const converters = {
|
|
|
7694
7718
|
result = {tumble_switch: {false: 'OFF', true: 'ON'}[value]};
|
|
7695
7719
|
break;
|
|
7696
7720
|
case tuya.dataPoints.trsfFallDownStatus:
|
|
7697
|
-
result = {fall_down_status:
|
|
7721
|
+
result = {fall_down_status: tuya.tuyaRadar.fallDown[value]};
|
|
7698
7722
|
break;
|
|
7699
7723
|
case tuya.dataPoints.trsfStaticDwellAlarm:
|
|
7700
7724
|
result = {static_dwell_alarm: value};
|
package/converters/toZigbee.js
CHANGED
|
@@ -5074,6 +5074,32 @@ const converters = {
|
|
|
5074
5074
|
}
|
|
5075
5075
|
},
|
|
5076
5076
|
},
|
|
5077
|
+
neo_alarm: {
|
|
5078
|
+
key: [
|
|
5079
|
+
'alarm', 'melody', 'volume', 'duration',
|
|
5080
|
+
],
|
|
5081
|
+
convertSet: async (entity, key, value, meta) => {
|
|
5082
|
+
switch (key) {
|
|
5083
|
+
case 'alarm':
|
|
5084
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.neoAOAlarm, value);
|
|
5085
|
+
break;
|
|
5086
|
+
case 'melody':
|
|
5087
|
+
await tuya.sendDataPointEnum(entity, tuya.dataPoints.neoAOMelody, parseInt(value, 10));
|
|
5088
|
+
break;
|
|
5089
|
+
case 'volume':
|
|
5090
|
+
await tuya.sendDataPointEnum(
|
|
5091
|
+
entity,
|
|
5092
|
+
tuya.dataPoints.neoAOVolume,
|
|
5093
|
+
{'low': 2, 'medium': 1, 'high': 0}[value]);
|
|
5094
|
+
break;
|
|
5095
|
+
case 'duration':
|
|
5096
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.neoAODuration, value);
|
|
5097
|
+
break;
|
|
5098
|
+
default: // Unknown key
|
|
5099
|
+
throw new Error(`Unhandled key ${key}`);
|
|
5100
|
+
}
|
|
5101
|
+
},
|
|
5102
|
+
},
|
|
5077
5103
|
nous_lcd_temperature_humidity_sensor: {
|
|
5078
5104
|
key: ['min_temperature', 'max_temperature', 'temperature_sensitivity', 'temperature_unit_convert'],
|
|
5079
5105
|
convertSet: async (entity, key, value, meta) => {
|
|
@@ -6548,6 +6574,9 @@ const converters = {
|
|
|
6548
6574
|
await entity.write('aqaraOpple', {0x0125: {value: lookupState[value], type: 0x20}}, manufacturerOptions.xiaomi);
|
|
6549
6575
|
return {state: {click_mode: value}};
|
|
6550
6576
|
},
|
|
6577
|
+
convertGet: async (entity, key, meta) => {
|
|
6578
|
+
await entity.read('aqaraOpple', [0x125], manufacturerOptions.xiaomi);
|
|
6579
|
+
},
|
|
6551
6580
|
},
|
|
6552
6581
|
tuya_light_wz5: {
|
|
6553
6582
|
key: ['color', 'color_temp', 'brightness', 'white_brightness'],
|
package/devices/lg.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const extend = require('../lib/extend');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
zigbeeModel: ['B1027EB0Z01'],
|
|
6
|
+
model: 'B1027EB0Z01',
|
|
7
|
+
vendor: 'LG Electronics',
|
|
8
|
+
description: 'Smart bulb 1',
|
|
9
|
+
extend: extend.light_onoff_brightness(),
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
zigbeeModel: ['B1027EB0Z02'],
|
|
13
|
+
model: 'B1027EB0Z02',
|
|
14
|
+
vendor: 'LG Electronics',
|
|
15
|
+
description: 'Smart bulb 2',
|
|
16
|
+
extend: extend.light_onoff_brightness(),
|
|
17
|
+
},
|
|
18
|
+
];
|
package/devices/neo.js
CHANGED
|
@@ -34,6 +34,29 @@ module.exports = [
|
|
|
34
34
|
await endpoint.command('manuSpecificTuya', 'mcuVersionRequest', {'seq': 0x0002});
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_t1blo2bj'}],
|
|
39
|
+
zigbeeModel: ['1blo2bj'],
|
|
40
|
+
model: 'NAS-AB02B2',
|
|
41
|
+
vendor: 'Neo',
|
|
42
|
+
description: 'Alarm',
|
|
43
|
+
fromZigbee: [fz.neo_alarm, fz.ignore_basic_report],
|
|
44
|
+
toZigbee: [tz.neo_alarm],
|
|
45
|
+
exposes: [
|
|
46
|
+
e.battery_low(),
|
|
47
|
+
exposes.binary('alarm', ea.STATE_SET, true, false),
|
|
48
|
+
exposes.enum('melody', ea.STATE_SET, Array.from(Array(18).keys()).map((x)=>(x+1).toString())),
|
|
49
|
+
exposes.numeric('duration', ea.STATE_SET).withUnit('second').withValueMin(0).withValueMax(1800),
|
|
50
|
+
exposes.enum('volume', ea.STATE_SET, ['low', 'medium', 'high']),
|
|
51
|
+
exposes.numeric('battpercentage', ea.STATE).withUnit('%'),
|
|
52
|
+
],
|
|
53
|
+
onEvent: tuya.onEventSetLocalTime,
|
|
54
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
55
|
+
const endpoint = device.getEndpoint(1);
|
|
56
|
+
await endpoint.command('manuSpecificTuya', 'dataQuery', {});
|
|
57
|
+
await endpoint.command('manuSpecificTuya', 'mcuVersionRequest', {'seq': 0x0002});
|
|
58
|
+
},
|
|
59
|
+
},
|
|
37
60
|
{
|
|
38
61
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_7hfcudw5'}],
|
|
39
62
|
model: 'NAS-PD07',
|
package/devices/philips.js
CHANGED
|
@@ -66,7 +66,7 @@ module.exports = [
|
|
|
66
66
|
ota: ota.zigbeeOTA,
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
zigbeeModel: ['915005996401'],
|
|
69
|
+
zigbeeModel: ['915005996401', '915005996501'],
|
|
70
70
|
model: '915005996401',
|
|
71
71
|
vendor: 'Philips',
|
|
72
72
|
description: 'Hue white ambiance ceiling light Enrave S with Bluetooth',
|
|
@@ -494,6 +494,15 @@ module.exports = [
|
|
|
494
494
|
extend: hueExtend.light_onoff_brightness(),
|
|
495
495
|
ota: ota.zigbeeOTA,
|
|
496
496
|
},
|
|
497
|
+
{
|
|
498
|
+
zigbeeModel: ['1746630V7'],
|
|
499
|
+
model: '1746630V7',
|
|
500
|
+
vendor: 'Philips',
|
|
501
|
+
description: 'Amarant linear outdoor light',
|
|
502
|
+
meta: {turnsOffAtBrightness1: true},
|
|
503
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
504
|
+
ota: ota.zigbeeOTA,
|
|
505
|
+
},
|
|
497
506
|
{
|
|
498
507
|
zigbeeModel: ['LCC001'],
|
|
499
508
|
model: '4090531P7',
|
|
@@ -2627,4 +2636,13 @@ module.exports = [
|
|
|
2627
2636
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2628
2637
|
ota: ota.zigbeeOTA,
|
|
2629
2638
|
},
|
|
2639
|
+
{
|
|
2640
|
+
zigbeeModel: ['929003045001_01', '929003045001_02', '929003045001_03'],
|
|
2641
|
+
model: '9290019533',
|
|
2642
|
+
vendor: 'Philips',
|
|
2643
|
+
description: 'Hue white ambiance GU10 with Bluetooth',
|
|
2644
|
+
meta: {turnsOffAtBrightness1: true},
|
|
2645
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2646
|
+
ota: ota.zigbeeOTA,
|
|
2647
|
+
},
|
|
2630
2648
|
];
|
package/devices/sercomm.js
CHANGED
|
@@ -37,6 +37,22 @@ module.exports = [
|
|
|
37
37
|
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000000, multiplier: 1});
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
zigbeeModel: ['SZ-ESW02'],
|
|
42
|
+
model: 'SZ-ESW02',
|
|
43
|
+
vendor: 'Sercomm',
|
|
44
|
+
description: 'Telstra smart plug 2',
|
|
45
|
+
fromZigbee: [fz.on_off, fz.metering],
|
|
46
|
+
exposes: [e.switch(), e.power()],
|
|
47
|
+
toZigbee: [tz.on_off],
|
|
48
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
49
|
+
const endpoint = device.getEndpoint(1);
|
|
50
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
51
|
+
await reporting.onOff(endpoint);
|
|
52
|
+
await reporting.instantaneousDemand(endpoint);
|
|
53
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000000, multiplier: 1});
|
|
54
|
+
},
|
|
55
|
+
},
|
|
40
56
|
{
|
|
41
57
|
zigbeeModel: ['XHS2-SE'],
|
|
42
58
|
model: 'XHS2-SE',
|
package/devices/tuya.js
CHANGED
|
@@ -839,6 +839,7 @@ module.exports = [
|
|
|
839
839
|
{modelID: 'TS0601', manufacturerName: '_TZE200_sbordckq'},
|
|
840
840
|
{modelID: 'TS0601', manufacturerName: '_TZE200_fctwhugx'},
|
|
841
841
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zah67ekd'},
|
|
842
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_hsgrhjpf'},
|
|
842
843
|
// Window pushers:
|
|
843
844
|
{modelID: 'TS0601', manufacturerName: '_TZE200_g5wdnuow'},
|
|
844
845
|
// Tubular motors:
|
|
@@ -1755,7 +1756,8 @@ module.exports = [
|
|
|
1755
1756
|
.withDescription('fall sensitivity of the radar'),
|
|
1756
1757
|
exposes.numeric('tumble_alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
|
|
1757
1758
|
.withUnit('min').withDescription('tumble alarm time'),
|
|
1758
|
-
exposes.
|
|
1759
|
+
exposes.enum('fall_down_status', ea.STATE, Object.values(tuya.tuyaRadar.fallDown))
|
|
1760
|
+
.withDescription('fall down status'),
|
|
1759
1761
|
exposes.text('static_dwell_alarm', ea.STATE).withDescription('static dwell alarm'),
|
|
1760
1762
|
],
|
|
1761
1763
|
configure: async (device, coordinatorEndpoint, logger) => {
|
package/devices/xiaomi.js
CHANGED
|
@@ -1837,7 +1837,7 @@ module.exports = [
|
|
|
1837
1837
|
fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
1838
1838
|
toZigbee: [tz.xiaomi_switch_click_mode],
|
|
1839
1839
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
|
|
1840
|
-
exposes.enum('click_mode', ea.
|
|
1840
|
+
exposes.enum('click_mode', ea.ALL, ['fast', 'multi'])
|
|
1841
1841
|
.withDescription('Click mode, fast: only supports single click which will be send immediately after clicking.' +
|
|
1842
1842
|
'multi: supports more events like double and hold')],
|
|
1843
1843
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -1853,7 +1853,7 @@ module.exports = [
|
|
|
1853
1853
|
exposes: [e.battery(), e.battery_voltage(),
|
|
1854
1854
|
e.action(['single_left', 'single_right', 'single_both', 'double_left', 'double_right', 'hold_left', 'hold_right']),
|
|
1855
1855
|
// eslint-disable-next-line max-len
|
|
1856
|
-
exposes.enum('click_mode', ea.
|
|
1856
|
+
exposes.enum('click_mode', ea.ALL, ['fast', 'multi']).withDescription('Click mode, fast: only supports single click which will be send immediately after clicking, multi: supports more events like double and hold'),
|
|
1857
1857
|
],
|
|
1858
1858
|
fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
1859
1859
|
toZigbee: [tz.xiaomi_switch_click_mode],
|
|
@@ -1864,4 +1864,23 @@ module.exports = [
|
|
|
1864
1864
|
await endpoint1.write('aqaraOpple', {0x0125: {value: 0x02, type: 0x20}}, {manufacturerCode: 0x115f});
|
|
1865
1865
|
},
|
|
1866
1866
|
},
|
|
1867
|
+
{
|
|
1868
|
+
zigbeeModel: ['lumi.remote.b18ac1'],
|
|
1869
|
+
model: 'WXKG14LM',
|
|
1870
|
+
vendor: 'Xiaomi',
|
|
1871
|
+
description: 'Aqara wireless remote switch H1 (single rocker)',
|
|
1872
|
+
fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
1873
|
+
toZigbee: [tz.xiaomi_switch_click_mode, tz.aqara_opple_operation_mode],
|
|
1874
|
+
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'triple', 'hold']),
|
|
1875
|
+
exposes.enum('click_mode', ea.ALL, ['fast', 'multi'])
|
|
1876
|
+
.withDescription('Click mode, fast: only supports single click which will be send immediately after clicking.' +
|
|
1877
|
+
'multi: supports more events like double and hold'),
|
|
1878
|
+
exposes.enum('operation_mode', ea.ALL, ['command', 'event'])
|
|
1879
|
+
.withDescription('Operation mode, select "command" to enable bindings (wake up the device before changing modes!)')],
|
|
1880
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1881
|
+
const endpoint1 = device.getEndpoint(1);
|
|
1882
|
+
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
1883
|
+
await endpoint1.read('aqaraOpple', [0x0125], {manufacturerCode: 0x115f});
|
|
1884
|
+
},
|
|
1885
|
+
},
|
|
1867
1886
|
];
|
package/lib/tuya.js
CHANGED
|
@@ -314,6 +314,12 @@ const dataPoints = {
|
|
|
314
314
|
neoHumidityAlarm: 114,
|
|
315
315
|
neoUnknown3: 115,
|
|
316
316
|
neoVolume: 116,
|
|
317
|
+
// Neo AlarmOnly
|
|
318
|
+
neoAOBattPerc: 15,
|
|
319
|
+
neoAOMelody: 21,
|
|
320
|
+
neoAODuration: 7,
|
|
321
|
+
neoAOAlarm: 13,
|
|
322
|
+
neoAOVolume: 5,
|
|
317
323
|
// Saswell TRV
|
|
318
324
|
saswellHeating: 3,
|
|
319
325
|
saswellWindowDetection: 8,
|
|
@@ -644,6 +650,11 @@ const tuyaRadar = {
|
|
|
644
650
|
1: 'moving_forward',
|
|
645
651
|
2: 'moving_backward',
|
|
646
652
|
},
|
|
653
|
+
fallDown: {
|
|
654
|
+
0: 'none',
|
|
655
|
+
1: 'maybe_fall',
|
|
656
|
+
2: 'fall',
|
|
657
|
+
},
|
|
647
658
|
};
|
|
648
659
|
|
|
649
660
|
// Motion sensor lookups
|
package/npm-shrinkwrap.json
CHANGED