zigbee-herdsman-converters 15.0.103 → 15.0.105
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 +2 -1
- package/converters/toZigbee.js +6 -0
- package/devices/develco.js +3 -2
- package/devices/profalux.js +1 -0
- package/devices/shinasystem.js +5 -1
- package/devices/skydance.js +1 -1
- package/devices/tuya.js +10 -6
- package/devices/xiaomi.js +34 -0
- package/lib/exposes.js +1 -0
- package/lib/philips.js +1 -1
- package/lib/reporting.js +5 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -778,6 +778,7 @@ const converters = {
|
|
|
778
778
|
{key: 'activePowerPhB', name: 'power_phase_b', factor: 'acPower'},
|
|
779
779
|
{key: 'activePowerPhC', name: 'power_phase_c', factor: 'acPower'},
|
|
780
780
|
{key: 'apparentPower', name: 'power_apparent', factor: 'acPower'},
|
|
781
|
+
{key: 'reactivePower', name: 'power_reactive', factor: 'acPower'},
|
|
781
782
|
{key: 'rmsCurrent', name: 'current', factor: 'acCurrent'},
|
|
782
783
|
{key: 'rmsCurrentPhB', name: 'current_phase_b', factor: 'acCurrent'},
|
|
783
784
|
{key: 'rmsCurrentPhC', name: 'current_phase_c', factor: 'acCurrent'},
|
|
@@ -5379,7 +5380,7 @@ const converters = {
|
|
|
5379
5380
|
if (['QBKG39LM', 'QBKG41LM', 'WS-EUK02', 'WS-EUK04', 'QBKG20LM', 'QBKG28LM', 'QBKG31LM'].includes(model.model)) {
|
|
5380
5381
|
buttonLookup = {41: 'left', 42: 'right', 51: 'both'};
|
|
5381
5382
|
}
|
|
5382
|
-
if (['QBKG25LM', 'QBKG26LM', 'QBKG29LM', 'QBKG34LM', 'ZNQBKG31LM'].includes(model.model)) {
|
|
5383
|
+
if (['QBKG25LM', 'QBKG26LM', 'QBKG29LM', 'QBKG34LM', 'ZNQBKG31LM', 'ZNQBKG26LM'].includes(model.model)) {
|
|
5383
5384
|
buttonLookup = {
|
|
5384
5385
|
41: 'left', 42: 'center', 43: 'right',
|
|
5385
5386
|
51: 'left_center', 52: 'left_right', 53: 'center_right',
|
package/converters/toZigbee.js
CHANGED
|
@@ -1654,6 +1654,12 @@ const converters = {
|
|
|
1654
1654
|
await entity.read('haElectricalMeasurement', ['acFrequency']);
|
|
1655
1655
|
},
|
|
1656
1656
|
},
|
|
1657
|
+
electrical_measurement_power_reactive: {
|
|
1658
|
+
key: ['power_reactive'],
|
|
1659
|
+
convertGet: async (entity, key, meta) => {
|
|
1660
|
+
await entity.read('haElectricalMeasurement', ['reactivePower']);
|
|
1661
|
+
},
|
|
1662
|
+
},
|
|
1657
1663
|
powerfactor: {
|
|
1658
1664
|
key: ['power_factor'],
|
|
1659
1665
|
convertGet: async (entity, key, meta) => {
|
package/devices/develco.js
CHANGED
|
@@ -292,13 +292,14 @@ module.exports = [
|
|
|
292
292
|
description: 'Power plug',
|
|
293
293
|
fromZigbee: [fz.on_off, develco.fz.electrical_measurement, develco.fz.metering],
|
|
294
294
|
toZigbee: [tz.on_off],
|
|
295
|
-
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.ac_frequency()],
|
|
295
|
+
exposes: [e.switch(), e.power(), e.power_reactive(), e.current(), e.voltage(), e.energy(), e.ac_frequency()],
|
|
296
296
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
297
297
|
const endpoint = device.getEndpoint(2);
|
|
298
298
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
299
299
|
await reporting.onOff(endpoint);
|
|
300
|
-
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
300
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint, true);
|
|
301
301
|
await reporting.activePower(endpoint);
|
|
302
|
+
await reporting.reactivePower(endpoint);
|
|
302
303
|
await reporting.rmsCurrent(endpoint);
|
|
303
304
|
await reporting.rmsVoltage(endpoint);
|
|
304
305
|
await reporting.readMeteringMultiplierDivisor(endpoint);
|
package/devices/profalux.js
CHANGED
|
@@ -20,6 +20,7 @@ module.exports = [
|
|
|
20
20
|
zigbeeModel: [
|
|
21
21
|
'MOT-C1Z06C\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000',
|
|
22
22
|
'MOT-C1Z10F\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000',
|
|
23
|
+
'MOT-C1Z06F\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000',
|
|
23
24
|
],
|
|
24
25
|
fingerprint: [{manufId: 4368, endpoints: [{ID: 1, profileID: 260, deviceID: 512,
|
|
25
26
|
inputClusters: [0, 3, 4, 5, 6, 8, 10, 21, 256, 64544, 64545], outputClusters: [3, 64544]}]}],
|
package/devices/shinasystem.js
CHANGED
|
@@ -522,6 +522,7 @@ module.exports = [
|
|
|
522
522
|
zigbeeModel: ['SBM300ZB4'],
|
|
523
523
|
model: 'SBM300ZB4',
|
|
524
524
|
vendor: 'ShinaSystem',
|
|
525
|
+
ota: ota.zigbeeOTA,
|
|
525
526
|
description: 'SiHAS remote control 4 button',
|
|
526
527
|
fromZigbee: [fz.sihas_action, fz.battery],
|
|
527
528
|
toZigbee: [],
|
|
@@ -541,6 +542,7 @@ module.exports = [
|
|
|
541
542
|
zigbeeModel: ['SBM300ZC1'],
|
|
542
543
|
model: 'SBM300ZC1',
|
|
543
544
|
vendor: 'ShinaSystem',
|
|
545
|
+
ota: ota.zigbeeOTA,
|
|
544
546
|
description: 'SiHAS remote control',
|
|
545
547
|
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
546
548
|
fromZigbee: [fz.battery, fz.sihas_action],
|
|
@@ -556,6 +558,7 @@ module.exports = [
|
|
|
556
558
|
zigbeeModel: ['SBM300ZC2'],
|
|
557
559
|
model: 'SBM300ZC2',
|
|
558
560
|
vendor: 'ShinaSystem',
|
|
561
|
+
ota: ota.zigbeeOTA,
|
|
559
562
|
description: 'SiHAS remote control 2 button',
|
|
560
563
|
fromZigbee: [fz.sihas_action, fz.battery],
|
|
561
564
|
toZigbee: [],
|
|
@@ -572,6 +575,7 @@ module.exports = [
|
|
|
572
575
|
zigbeeModel: ['SBM300ZC3'],
|
|
573
576
|
model: 'SBM300ZC3',
|
|
574
577
|
vendor: 'ShinaSystem',
|
|
578
|
+
ota: ota.zigbeeOTA,
|
|
575
579
|
description: 'SiHAS remote control 3 button',
|
|
576
580
|
fromZigbee: [fz.sihas_action, fz.battery],
|
|
577
581
|
toZigbee: [],
|
|
@@ -590,6 +594,7 @@ module.exports = [
|
|
|
590
594
|
zigbeeModel: ['SBM300ZC4'],
|
|
591
595
|
model: 'SBM300ZC4',
|
|
592
596
|
vendor: 'ShinaSystem',
|
|
597
|
+
ota: ota.zigbeeOTA,
|
|
593
598
|
description: 'SiHAS remote control 4 button',
|
|
594
599
|
fromZigbee: [fz.sihas_action, fz.battery],
|
|
595
600
|
toZigbee: [],
|
|
@@ -747,7 +752,6 @@ module.exports = [
|
|
|
747
752
|
zigbeeModel: ['ISM300Z3'],
|
|
748
753
|
model: 'ISM300Z3',
|
|
749
754
|
vendor: 'ShinaSystem',
|
|
750
|
-
ota: ota.zigbeeOTA,
|
|
751
755
|
description: 'SiHAS IOT smart inner switch 3 gang',
|
|
752
756
|
fromZigbee: [fzLocal.ISM300Z3_on_off],
|
|
753
757
|
toZigbee: [tzLocal.ISM300Z3_on_off, tzLocal.ISM300Z3_rf_pairing],
|
package/devices/skydance.js
CHANGED
|
@@ -11,7 +11,7 @@ module.exports = [
|
|
|
11
11
|
{modelID: 'TS0601', manufacturerName: '_TZE200_6qoazbre'},
|
|
12
12
|
{modelID: 'TS0601', manufacturerName: '_TZE200_fcooykb4'},
|
|
13
13
|
],
|
|
14
|
-
model: '
|
|
14
|
+
model: 'WZ5_dim_1',
|
|
15
15
|
vendor: 'Skydance',
|
|
16
16
|
description: 'Zigbee & RF 5 in 1 LED controller (DIM mode)',
|
|
17
17
|
fromZigbee: [fz.tuya_light_wz5],
|
package/devices/tuya.js
CHANGED
|
@@ -899,15 +899,18 @@ const fzLocal = {
|
|
|
899
899
|
convert: (model, msg, publish, options, meta) => {
|
|
900
900
|
const result = fz.electrical_measurement.convert(model, msg, publish, options, meta);
|
|
901
901
|
|
|
902
|
-
//
|
|
902
|
+
// Wait 5 seconds before reporting a 0 value as this could be an invalid measurement.
|
|
903
903
|
// https://github.com/Koenkk/zigbee2mqtt/issues/16709#issuecomment-1509599046
|
|
904
904
|
if (['_TZ3000_gvn91tmx', '_TZ3000_amdymr7l'].includes(meta.device.manufacturerName)) {
|
|
905
905
|
for (const key of ['power', 'current', 'voltage']) {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
906
|
+
if (key in result) {
|
|
907
|
+
const value = result[key];
|
|
908
|
+
clearTimeout(globalStore.getValue(msg.endpoint, key));
|
|
909
|
+
if (value === 0) {
|
|
910
|
+
globalStore.putValue(msg.endpoint, key, setTimeout(() => publish({[key]: value}), 5 * 1000));
|
|
911
|
+
delete result[key];
|
|
912
|
+
}
|
|
909
913
|
}
|
|
910
|
-
globalStore.putValue(msg.endpoint, key, value);
|
|
911
914
|
}
|
|
912
915
|
}
|
|
913
916
|
return result;
|
|
@@ -1287,6 +1290,7 @@ module.exports = [
|
|
|
1287
1290
|
tuya.whitelabel('Lidl', 'HG08008', 'Livarno Home LED ceiling light', ['_TZ3210_p9ao60da']),
|
|
1288
1291
|
tuya.whitelabel('Lidl', 'HG08007', 'Livarno Home outdoor LED band', ['_TZ3210_zbabx9wh']),
|
|
1289
1292
|
tuya.whitelabel('Lidl', '399629_2110', 'Livarno Lux Ceiling Panel RGB+CCT', ['_TZ3210_c0s1xloa']),
|
|
1293
|
+
tuya.whitelabel('Skydance', 'WZ5_dim_2', 'Zigbee & RF 5 in 1 LED controller (DIM mode)', ['_TZB210_3zfp8mki']),
|
|
1290
1294
|
],
|
|
1291
1295
|
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
1292
1296
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -1923,6 +1927,7 @@ module.exports = [
|
|
|
1923
1927
|
{
|
|
1924
1928
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_kyfqmmyl'},
|
|
1925
1929
|
{modelID: 'TS0601', manufacturerName: '_TZE200_2hf7x9n3'},
|
|
1930
|
+
{modelID: 'TS0601', manufacturerName: '_TZE204_atpwqgml'},
|
|
1926
1931
|
{modelID: 'TS0601', manufacturerName: '_TZE200_bynnczcb'},
|
|
1927
1932
|
{modelID: 'TS0601', manufacturerName: '_TZE200_atpwqgml'}],
|
|
1928
1933
|
model: 'TS0601_switch_3_gang',
|
|
@@ -2523,7 +2528,6 @@ module.exports = [
|
|
|
2523
2528
|
{modelID: 'TS0601', manufacturerName: '_TZE200_3ylew7b4'},
|
|
2524
2529
|
{modelID: 'TS0601', manufacturerName: '_TZE200_llm0epxg'},
|
|
2525
2530
|
{modelID: 'TS0601', manufacturerName: '_TZE200_n1aauwb4'},
|
|
2526
|
-
{modelID: 'TS0601', manufacturerName: '_TZE204_sxm7l9xa'},
|
|
2527
2531
|
{modelID: 'TS0601', manufacturerName: '_TZE200_xu4a5rhj'},
|
|
2528
2532
|
{modelID: 'TS0601', manufacturerName: '_TZE204_r0jdjrvi'},
|
|
2529
2533
|
],
|
package/devices/xiaomi.js
CHANGED
|
@@ -3246,4 +3246,38 @@ module.exports = [
|
|
|
3246
3246
|
},
|
|
3247
3247
|
ota: ota.zigbeeOTA,
|
|
3248
3248
|
},
|
|
3249
|
+
{
|
|
3250
|
+
zigbeeModel: ['lumi.switch.acn031'],
|
|
3251
|
+
model: 'ZNQBKG26LM',
|
|
3252
|
+
vendor: 'Xiaomi',
|
|
3253
|
+
description: 'Aqara smart wall switch H1M (with neutral, triple rocker)',
|
|
3254
|
+
fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.aqara_opple, fz.xiaomi_power],
|
|
3255
|
+
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.aqara_switch_mode_switch,
|
|
3256
|
+
tz.xiaomi_flip_indicator_light],
|
|
3257
|
+
endpoint: (device) => {
|
|
3258
|
+
return {'left': 1, 'center': 2, 'right': 3};
|
|
3259
|
+
},
|
|
3260
|
+
meta: {multiEndpoint: true},
|
|
3261
|
+
exposes: [
|
|
3262
|
+
e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right'),
|
|
3263
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
3264
|
+
.withDescription('Decoupled mode for left button')
|
|
3265
|
+
.withEndpoint('left'),
|
|
3266
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
3267
|
+
.withDescription('Decoupled mode for center button')
|
|
3268
|
+
.withEndpoint('center'),
|
|
3269
|
+
exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
|
|
3270
|
+
.withDescription('Decoupled mode for right button')
|
|
3271
|
+
.withEndpoint('right'),
|
|
3272
|
+
e.action(['single_left', 'double_left', 'single_center', 'double_center', 'single_right', 'double_right',
|
|
3273
|
+
'single_left_center', 'double_left_center', 'single_left_right', 'double_left_right',
|
|
3274
|
+
'single_center_right', 'double_center_right', 'single_all', 'double_all']),
|
|
3275
|
+
e.device_temperature(), e.flip_indicator_light(),
|
|
3276
|
+
],
|
|
3277
|
+
onEvent: preventReset,
|
|
3278
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3279
|
+
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
3280
|
+
},
|
|
3281
|
+
ota: ota.zigbeeOTA,
|
|
3282
|
+
},
|
|
3249
3283
|
];
|
package/lib/exposes.js
CHANGED
|
@@ -626,6 +626,7 @@ module.exports = {
|
|
|
626
626
|
power_on_behavior: (values=['off', 'previous', 'on']) => new Enum('power_on_behavior', access.ALL, values).withDescription('Controls the behavior when the device is powered on after power loss'),
|
|
627
627
|
power_outage_count: (resetsWhenPairing = true) => new Numeric('power_outage_count', access.STATE).withDescription('Number of power outages' + (resetsWhenPairing ? ' (since last pairing)' : '')),
|
|
628
628
|
power_outage_memory: () => new Binary('power_outage_memory', access.ALL, true, false).withDescription('Enable/disable the power outage memory, this recovers the on/off mode after power failure'),
|
|
629
|
+
power_reactive: () => new Numeric('power_reactive', access.STATE).withUnit('VAR').withDescription('Instantaneous measured reactive power'),
|
|
629
630
|
presence: () => new Binary('presence', access.STATE, true, false).withDescription('Indicates whether the device detected presence'),
|
|
630
631
|
pressure: () => new Numeric('pressure', access.STATE).withUnit('hPa').withDescription('The measured atmospheric pressure'),
|
|
631
632
|
programming_operation_mode: () => new Enum('programming_operation_mode', access.ALL, ['setpoint', 'schedule', 'schedule_with_preheat', 'eco']).withDescription('Controls how programming affects the thermostat. Possible values: setpoint (only use specified setpoint), schedule (follow programmed setpoint schedule), schedule_with_preheat (follow programmed setpoint schedule with pre-heating). Changing this value does not clear programmed schedules.'),
|
package/lib/philips.js
CHANGED
|
@@ -52,7 +52,7 @@ const knownEffects = {
|
|
|
52
52
|
|
|
53
53
|
const extend = {
|
|
54
54
|
light_onoff_brightness: (options={}) => {
|
|
55
|
-
options = {disableHueEffects:
|
|
55
|
+
options = {disableHueEffects: false, ...options};
|
|
56
56
|
if (!options.disableHueEffects) options.disableEffect = true;
|
|
57
57
|
const result = extendDontUse.light_onoff_brightness(options);
|
|
58
58
|
result['ota'] = ota.zigbeeOTA;
|
package/lib/reporting.js
CHANGED
|
@@ -25,7 +25,7 @@ async function readEletricalMeasurementMultiplierDivisors(endpoint, readFrequenc
|
|
|
25
25
|
// Split into three chunks, some devices fail to respond when reading too much attributes at once.
|
|
26
26
|
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier']);
|
|
27
27
|
await endpoint.read('haElectricalMeasurement', ['acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor']);
|
|
28
|
-
// Only read frequency multiplier/
|
|
28
|
+
// Only read frequency multiplier/divisor when enabled as not all devices support this.
|
|
29
29
|
if (readFrequencyAttrs) {
|
|
30
30
|
await endpoint.read('haElectricalMeasurement', ['acFrequencyDivisor', 'acFrequencyMultiplier']);
|
|
31
31
|
}
|
|
@@ -203,6 +203,10 @@ module.exports = {
|
|
|
203
203
|
const p = payload('activePower', 5, repInterval.HOUR, 1, overrides);
|
|
204
204
|
await endpoint.configureReporting('haElectricalMeasurement', p);
|
|
205
205
|
},
|
|
206
|
+
reactivePower: async (endpoint, overrides) => {
|
|
207
|
+
const p = payload('reactivePower', 5, repInterval.HOUR, 1, overrides);
|
|
208
|
+
await endpoint.configureReporting('haElectricalMeasurement', p);
|
|
209
|
+
},
|
|
206
210
|
apparentPower: async (endpoint, overrides) => {
|
|
207
211
|
const p = payload('apparentPower', 5, repInterval.HOUR, 1, overrides);
|
|
208
212
|
await endpoint.configureReporting('haElectricalMeasurement', p);
|