zigbee-herdsman-converters 14.0.343 → 14.0.347
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 +97 -60
- package/converters/toZigbee.js +41 -10
- package/devices/bitron.js +1 -1
- package/devices/centralite.js +2 -2
- package/devices/custom_devices_diy.js +42 -0
- package/devices/danfoss.js +10 -4
- package/devices/ecozy.js +1 -1
- package/devices/elko.js +1 -1
- package/devices/eurotronic.js +1 -1
- package/devices/hgkg.js +1 -1
- package/devices/hive.js +14 -0
- package/devices/iluminize.js +12 -0
- package/devices/leviton.js +1 -1
- package/devices/lidl.js +24 -2
- package/devices/moes.js +2 -2
- package/devices/neo.js +3 -3
- package/devices/nous.js +40 -0
- package/devices/osram.js +58 -4
- package/devices/philips.js +10 -1
- package/devices/robb.js +22 -0
- package/devices/saswell.js +1 -1
- package/devices/schneider_electric.js +37 -1
- package/devices/schwaiger.js +7 -0
- package/devices/sinope.js +2 -2
- package/devices/sonoff.js +1 -1
- package/devices/tuya.js +45 -18
- package/devices/xiaomi.js +4 -2
- package/devices/zen.js +1 -1
- package/lib/legacy.js +1 -1
- package/lib/tuya.js +57 -44
- package/npm-shrinkwrap.json +576 -579
- package/package.json +2 -2
package/converters/fromZigbee.js
CHANGED
|
@@ -652,6 +652,18 @@ const converters = {
|
|
|
652
652
|
return payload;
|
|
653
653
|
},
|
|
654
654
|
},
|
|
655
|
+
EKO09738_metering: {
|
|
656
|
+
/**
|
|
657
|
+
* Elko EKO09738 and EKO09716 reports power in mW, scale to W
|
|
658
|
+
*/
|
|
659
|
+
cluster: 'seMetering',
|
|
660
|
+
type: ['attributeReport', 'readResponse'],
|
|
661
|
+
convert: (model, msg, publish, options, meta) => {
|
|
662
|
+
const result = converters.metering.convert(model, msg, publish, options, meta);
|
|
663
|
+
result.power /= 1000;
|
|
664
|
+
return result;
|
|
665
|
+
},
|
|
666
|
+
},
|
|
655
667
|
develco_metering: {
|
|
656
668
|
cluster: 'seMetering',
|
|
657
669
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -1644,7 +1656,7 @@ const converters = {
|
|
|
1644
1656
|
},
|
|
1645
1657
|
moes_105_dimmer: {
|
|
1646
1658
|
cluster: 'manuSpecificTuya',
|
|
1647
|
-
type: ['
|
|
1659
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
1648
1660
|
convert: (model, msg, publish, options, meta) => {
|
|
1649
1661
|
const multiEndpoint = model.meta && model.meta.multiEndpoint;
|
|
1650
1662
|
const dp = msg.data.dp;
|
|
@@ -1738,7 +1750,7 @@ const converters = {
|
|
|
1738
1750
|
},
|
|
1739
1751
|
tuya_temperature_humidity_sensor: {
|
|
1740
1752
|
cluster: 'manuSpecificTuya',
|
|
1741
|
-
type: ['
|
|
1753
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
1742
1754
|
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
1743
1755
|
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
1744
1756
|
convert: (model, msg, publish, options, meta) => {
|
|
@@ -1757,9 +1769,40 @@ const converters = {
|
|
|
1757
1769
|
}
|
|
1758
1770
|
},
|
|
1759
1771
|
},
|
|
1772
|
+
nous_lcd_temperature_humidity_sensor: {
|
|
1773
|
+
cluster: 'manuSpecificTuya',
|
|
1774
|
+
type: ['commandGetData'],
|
|
1775
|
+
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
1776
|
+
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
1777
|
+
convert: (model, msg, publish, options, meta) => {
|
|
1778
|
+
const dp = msg.data.dp;
|
|
1779
|
+
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
1780
|
+
switch (dp) {
|
|
1781
|
+
case tuya.dataPoints.nousTemperature:
|
|
1782
|
+
return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1783
|
+
case tuya.dataPoints.nousHumidity:
|
|
1784
|
+
return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
|
|
1785
|
+
case tuya.dataPoints.nousBattery:
|
|
1786
|
+
return {battery: value};
|
|
1787
|
+
case tuya.dataPoints.nousTempUnitConvert:
|
|
1788
|
+
return {temperature_unit_convert: {0x00: '°C', 0x01: '°F'}[value]};
|
|
1789
|
+
case tuya.dataPoints.nousMaxTemp:
|
|
1790
|
+
return {max_temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1791
|
+
case tuya.dataPoints.nousMinTemp:
|
|
1792
|
+
return {min_temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1793
|
+
case tuya.dataPoints.nousTempAlarm:
|
|
1794
|
+
return {temperature_alarm: {0x00: 'canceled', 0x01: 'lower_alarm', 0x02: 'upper_alarm'}[value]};
|
|
1795
|
+
case tuya.dataPoints.nousTempSensitivity:
|
|
1796
|
+
return {temperature_sensitivity: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1797
|
+
default:
|
|
1798
|
+
meta.logger.warn(`zigbee-herdsman-converters:nous_lcd_temperature_humidity_sensor: NOT RECOGNIZED ` +
|
|
1799
|
+
`DP #${dp} with data ${JSON.stringify(msg.data)}`);
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
},
|
|
1760
1803
|
tuya_illuminance_temperature_humidity_sensor: {
|
|
1761
1804
|
cluster: 'manuSpecificTuya',
|
|
1762
|
-
type: ['
|
|
1805
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
1763
1806
|
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
1764
1807
|
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
1765
1808
|
convert: (model, msg, publish, options, meta) => {
|
|
@@ -1811,7 +1854,7 @@ const converters = {
|
|
|
1811
1854
|
},
|
|
1812
1855
|
tuya_thermostat_weekly_schedule: {
|
|
1813
1856
|
cluster: 'manuSpecificTuya',
|
|
1814
|
-
type: ['
|
|
1857
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
1815
1858
|
convert: (model, msg, publish, options, meta) => {
|
|
1816
1859
|
const dp = msg.data.dp;
|
|
1817
1860
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -1860,7 +1903,7 @@ const converters = {
|
|
|
1860
1903
|
},
|
|
1861
1904
|
hy_thermostat: {
|
|
1862
1905
|
cluster: 'manuSpecificTuya',
|
|
1863
|
-
type: ['
|
|
1906
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
1864
1907
|
convert: (model, msg, publish, options, meta) => {
|
|
1865
1908
|
const dp = msg.data.dp;
|
|
1866
1909
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -1990,7 +2033,7 @@ const converters = {
|
|
|
1990
2033
|
},
|
|
1991
2034
|
tuya_cover: {
|
|
1992
2035
|
cluster: 'manuSpecificTuya',
|
|
1993
|
-
type: ['
|
|
2036
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
1994
2037
|
options: [exposes.options.invert_cover()],
|
|
1995
2038
|
convert: (model, msg, publish, options, meta) => {
|
|
1996
2039
|
// Protocol description
|
|
@@ -2313,7 +2356,7 @@ const converters = {
|
|
|
2313
2356
|
},
|
|
2314
2357
|
neo_nas_pd07: {
|
|
2315
2358
|
cluster: 'manuSpecificTuya',
|
|
2316
|
-
type: ['
|
|
2359
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
2317
2360
|
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
2318
2361
|
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
2319
2362
|
convert: (model, msg, publish, options, meta) => {
|
|
@@ -2339,7 +2382,7 @@ const converters = {
|
|
|
2339
2382
|
},
|
|
2340
2383
|
neo_t_h_alarm: {
|
|
2341
2384
|
cluster: 'manuSpecificTuya',
|
|
2342
|
-
type: ['
|
|
2385
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
2343
2386
|
convert: (model, msg, publish, options, meta) => {
|
|
2344
2387
|
const dp = msg.data.dp;
|
|
2345
2388
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -2484,7 +2527,7 @@ const converters = {
|
|
|
2484
2527
|
},
|
|
2485
2528
|
tuya_water_leak: {
|
|
2486
2529
|
cluster: 'manuSpecificTuya',
|
|
2487
|
-
type: '
|
|
2530
|
+
type: 'commandDataReport',
|
|
2488
2531
|
convert: (model, msg, publish, options, meta) => {
|
|
2489
2532
|
if (msg.data.dp === tuya.dataPoints.waterLeak) {
|
|
2490
2533
|
return {water_leak: tuya.getDataValue(msg.data.datatype, msg.data.data)};
|
|
@@ -2727,25 +2770,6 @@ const converters = {
|
|
|
2727
2770
|
}
|
|
2728
2771
|
},
|
|
2729
2772
|
},
|
|
2730
|
-
hy_set_time_request: {
|
|
2731
|
-
cluster: 'manuSpecificTuya',
|
|
2732
|
-
type: ['commandSetTimeRequest'],
|
|
2733
|
-
convert: async (model, msg, publish, options, meta) => {
|
|
2734
|
-
const OneJanuary2000 = new Date('January 01, 2000 00:00:00 UTC+00:00').getTime();
|
|
2735
|
-
const currentTime = new Date().getTime();
|
|
2736
|
-
const utcTime = Math.round((currentTime - OneJanuary2000) / 1000);
|
|
2737
|
-
const localTime = Math.round(currentTime / 1000) - (new Date()).getTimezoneOffset() * 60;
|
|
2738
|
-
const endpoint = msg.endpoint;
|
|
2739
|
-
const payload = {
|
|
2740
|
-
payloadSize: 8,
|
|
2741
|
-
payload: [
|
|
2742
|
-
...tuya.convertDecimalValueTo4ByteHexArray(utcTime),
|
|
2743
|
-
...tuya.convertDecimalValueTo4ByteHexArray(localTime),
|
|
2744
|
-
],
|
|
2745
|
-
};
|
|
2746
|
-
await endpoint.command('manuSpecificTuya', 'setTime', payload, {});
|
|
2747
|
-
},
|
|
2748
|
-
},
|
|
2749
2773
|
ptvo_switch_uart: {
|
|
2750
2774
|
cluster: 'genMultistateValue',
|
|
2751
2775
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -2867,7 +2891,7 @@ const converters = {
|
|
|
2867
2891
|
},
|
|
2868
2892
|
silvercrest_smart_led_string: {
|
|
2869
2893
|
cluster: 'manuSpecificTuya',
|
|
2870
|
-
type: ['
|
|
2894
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
2871
2895
|
convert: (model, msg, publish, options, meta) => {
|
|
2872
2896
|
const dp = msg.data.dp;
|
|
2873
2897
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -3092,6 +3116,9 @@ const converters = {
|
|
|
3092
3116
|
result[postfixWithEndpointName('external_measured_room_sensor', msg, model)] =
|
|
3093
3117
|
msg.data['danfossExternalMeasuredRoomSensor'];
|
|
3094
3118
|
}
|
|
3119
|
+
if (msg.data.hasOwnProperty('danfossRadiatorCovered')) {
|
|
3120
|
+
result[postfixWithEndpointName('radiator_covered', msg, model)] = (msg.data['danfossRadiatorCovered'] === 1);
|
|
3121
|
+
}
|
|
3095
3122
|
if (msg.data.hasOwnProperty('danfossViewingDirection')) {
|
|
3096
3123
|
result[postfixWithEndpointName('viewing_direction', msg, model)] = (msg.data['danfossViewingDirection'] === 1);
|
|
3097
3124
|
}
|
|
@@ -3487,7 +3514,7 @@ const converters = {
|
|
|
3487
3514
|
},
|
|
3488
3515
|
moes_thermostat: {
|
|
3489
3516
|
cluster: 'manuSpecificTuya',
|
|
3490
|
-
type: ['
|
|
3517
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
3491
3518
|
convert: (model, msg, publish, options, meta) => {
|
|
3492
3519
|
const dp = msg.data.dp;
|
|
3493
3520
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -3560,7 +3587,7 @@ const converters = {
|
|
|
3560
3587
|
},
|
|
3561
3588
|
moesS_thermostat: {
|
|
3562
3589
|
cluster: 'manuSpecificTuya',
|
|
3563
|
-
type: ['
|
|
3590
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
3564
3591
|
convert: (model, msg, publish, options, meta) => {
|
|
3565
3592
|
const dp = msg.data.dp; // First we get the data point ID
|
|
3566
3593
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -3620,7 +3647,7 @@ const converters = {
|
|
|
3620
3647
|
},
|
|
3621
3648
|
tvtwo_thermostat: {
|
|
3622
3649
|
cluster: 'manuSpecificTuya',
|
|
3623
|
-
type: ['
|
|
3650
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
3624
3651
|
convert: (model, msg, publish, options, meta) => {
|
|
3625
3652
|
const dp = msg.data.dp;
|
|
3626
3653
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -3771,7 +3798,7 @@ const converters = {
|
|
|
3771
3798
|
},
|
|
3772
3799
|
haozee_thermostat: {
|
|
3773
3800
|
cluster: 'manuSpecificTuya',
|
|
3774
|
-
type: ['
|
|
3801
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
3775
3802
|
convert: (model, msg, publish, options, meta) => {
|
|
3776
3803
|
const dp = msg.data.dp; // First we get the data point ID
|
|
3777
3804
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -3886,7 +3913,7 @@ const converters = {
|
|
|
3886
3913
|
},
|
|
3887
3914
|
tuya_air_quality: {
|
|
3888
3915
|
cluster: 'manuSpecificTuya',
|
|
3889
|
-
type: ['
|
|
3916
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
3890
3917
|
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
3891
3918
|
exposes.options.precision('humidity'), exposes.options.calibration('humidity'),
|
|
3892
3919
|
exposes.options.precision('co2'), exposes.options.calibration('co2'),
|
|
@@ -3915,7 +3942,7 @@ const converters = {
|
|
|
3915
3942
|
},
|
|
3916
3943
|
saswell_thermostat: {
|
|
3917
3944
|
cluster: 'manuSpecificTuya',
|
|
3918
|
-
type: ['
|
|
3945
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
3919
3946
|
convert: (model, msg, publish, options, meta) => {
|
|
3920
3947
|
const dp = msg.data.dp;
|
|
3921
3948
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -4036,7 +4063,7 @@ const converters = {
|
|
|
4036
4063
|
},
|
|
4037
4064
|
etop_thermostat: {
|
|
4038
4065
|
cluster: 'manuSpecificTuya',
|
|
4039
|
-
type: ['
|
|
4066
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
4040
4067
|
convert: (model, msg, publish, options, meta) => {
|
|
4041
4068
|
const dp = msg.data.dp;
|
|
4042
4069
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -4085,7 +4112,7 @@ const converters = {
|
|
|
4085
4112
|
},
|
|
4086
4113
|
tuya_thermostat: {
|
|
4087
4114
|
cluster: 'manuSpecificTuya',
|
|
4088
|
-
type: ['
|
|
4115
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
4089
4116
|
convert: (model, msg, publish, options, meta) => {
|
|
4090
4117
|
const dp = msg.data.dp;
|
|
4091
4118
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -4191,7 +4218,7 @@ const converters = {
|
|
|
4191
4218
|
},
|
|
4192
4219
|
tuya_dimmer: {
|
|
4193
4220
|
cluster: 'manuSpecificTuya',
|
|
4194
|
-
type: ['
|
|
4221
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
4195
4222
|
convert: (model, msg, publish, options, meta) => {
|
|
4196
4223
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
4197
4224
|
if (msg.data.dp === tuya.dataPoints.state) {
|
|
@@ -4208,7 +4235,7 @@ const converters = {
|
|
|
4208
4235
|
},
|
|
4209
4236
|
tuya_data_point_dump: {
|
|
4210
4237
|
cluster: 'manuSpecificTuya',
|
|
4211
|
-
type: ['
|
|
4238
|
+
type: ['commandDataResponse', 'commandDataReport', 'commandActiveStatusReport'],
|
|
4212
4239
|
convert: (model, msg, publis, options, meta) => {
|
|
4213
4240
|
// Don't use in production!
|
|
4214
4241
|
// Used in: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_tuya_devices.html
|
|
@@ -4222,8 +4249,7 @@ const converters = {
|
|
|
4222
4249
|
let dataStr =
|
|
4223
4250
|
Date.now().toString() + ' ' +
|
|
4224
4251
|
meta.device.ieeeAddr + ' ' +
|
|
4225
|
-
getHex(msg.data.
|
|
4226
|
-
getHex(msg.data.transid) + ' ' +
|
|
4252
|
+
getHex(msg.data.seq) + ' ' +
|
|
4227
4253
|
getHex(msg.data.dp) + ' ' +
|
|
4228
4254
|
getHex(msg.data.datatype) + ' ' +
|
|
4229
4255
|
getHex(msg.data.fn);
|
|
@@ -4274,7 +4300,7 @@ const converters = {
|
|
|
4274
4300
|
},
|
|
4275
4301
|
blitzwolf_occupancy_with_timeout: {
|
|
4276
4302
|
cluster: 'manuSpecificTuya',
|
|
4277
|
-
type: '
|
|
4303
|
+
type: 'commandDataResponse',
|
|
4278
4304
|
convert: (model, msg, publish, options, meta) => {
|
|
4279
4305
|
msg.data.occupancy = msg.data.dp === tuya.dataPoints.occupancy ? 1 : 0;
|
|
4280
4306
|
return converters.occupancy_with_timeout.convert(model, msg, publish, options, meta);
|
|
@@ -4568,7 +4594,7 @@ const converters = {
|
|
|
4568
4594
|
},
|
|
4569
4595
|
frankever_valve: {
|
|
4570
4596
|
cluster: 'manuSpecificTuya',
|
|
4571
|
-
type: ['
|
|
4597
|
+
type: ['commandDataResponse', 'commandDataReport', 'commandActiveStatusReport'],
|
|
4572
4598
|
convert: (model, msg, publish, options, meta) => {
|
|
4573
4599
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
4574
4600
|
const dp = msg.data.dp;
|
|
@@ -4591,7 +4617,7 @@ const converters = {
|
|
|
4591
4617
|
},
|
|
4592
4618
|
tuya_smoke: {
|
|
4593
4619
|
cluster: 'manuSpecificTuya',
|
|
4594
|
-
type: ['
|
|
4620
|
+
type: ['commandDataResponse'],
|
|
4595
4621
|
convert: (model, msg, publish, options, meta) => {
|
|
4596
4622
|
const dp = msg.data.dp;
|
|
4597
4623
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -4605,7 +4631,7 @@ const converters = {
|
|
|
4605
4631
|
},
|
|
4606
4632
|
tuya_woox_smoke: {
|
|
4607
4633
|
cluster: 'manuSpecificTuya',
|
|
4608
|
-
type: ['
|
|
4634
|
+
type: ['commandDataResponse'],
|
|
4609
4635
|
convert: (model, msg, publish, options, meta) => {
|
|
4610
4636
|
const dp = msg.data.dp;
|
|
4611
4637
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -4623,7 +4649,7 @@ const converters = {
|
|
|
4623
4649
|
},
|
|
4624
4650
|
tuya_switch: {
|
|
4625
4651
|
cluster: 'manuSpecificTuya',
|
|
4626
|
-
type: ['
|
|
4652
|
+
type: ['commandDataReport', 'commandDataResponse', 'commandActiveStatusReport'],
|
|
4627
4653
|
convert: (model, msg, publish, options, meta) => {
|
|
4628
4654
|
const multiEndpoint = model.meta && model.meta.multiEndpoint;
|
|
4629
4655
|
const dp = msg.data.dp;
|
|
@@ -4643,7 +4669,7 @@ const converters = {
|
|
|
4643
4669
|
},
|
|
4644
4670
|
tuya_dinrail_switch: {
|
|
4645
4671
|
cluster: 'manuSpecificTuya',
|
|
4646
|
-
type: ['
|
|
4672
|
+
type: ['commandDataReport', 'commandDataResponse', 'commandActiveStatusReport'],
|
|
4647
4673
|
convert: (model, msg, publish, options, meta) => {
|
|
4648
4674
|
const dp = msg.data.dp;
|
|
4649
4675
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -4975,8 +5001,19 @@ const converters = {
|
|
|
4975
5001
|
payload.voltage = value;
|
|
4976
5002
|
payload.battery = batteryVoltageToPercentage(value, '3V_2100');
|
|
4977
5003
|
} else if (index === 3) payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
|
|
4978
|
-
else if (index === 100)
|
|
4979
|
-
|
|
5004
|
+
else if (index === 100) {
|
|
5005
|
+
if (['QBKG19LM', 'QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
|
|
5006
|
+
const mapping = model.model === 'QBCZ15LM' ? 'relay' : 'left';
|
|
5007
|
+
payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
|
|
5008
|
+
} else {
|
|
5009
|
+
payload.state = value === 1 ? 'ON' : 'OFF';
|
|
5010
|
+
}
|
|
5011
|
+
} else if (index === 101) {
|
|
5012
|
+
if (['QBKG19LM', 'QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
|
|
5013
|
+
const mapping = model.model === 'QBCZ15LM' ? 'usb' : 'right';
|
|
5014
|
+
payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
|
|
5015
|
+
}
|
|
5016
|
+
} else if (index === 149) {
|
|
4980
5017
|
payload.energy = precisionRound(value, 2); // 0x95
|
|
4981
5018
|
// Consumption is deprecated
|
|
4982
5019
|
payload.consumption = payload.energy;
|
|
@@ -5997,7 +6034,7 @@ const converters = {
|
|
|
5997
6034
|
},
|
|
5998
6035
|
javis_microwave_sensor: {
|
|
5999
6036
|
cluster: 'manuSpecificTuya',
|
|
6000
|
-
type: ['
|
|
6037
|
+
type: ['commandDataReport', 'commandDataResponse'],
|
|
6001
6038
|
convert: (model, msg, publish, options, meta) => {
|
|
6002
6039
|
const dp = msg.data.dp;
|
|
6003
6040
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -6204,7 +6241,7 @@ const converters = {
|
|
|
6204
6241
|
},
|
|
6205
6242
|
ZVG1: {
|
|
6206
6243
|
cluster: 'manuSpecificTuya',
|
|
6207
|
-
type: '
|
|
6244
|
+
type: 'commandDataResponse',
|
|
6208
6245
|
convert: (model, msg, publish, options, meta) => {
|
|
6209
6246
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
6210
6247
|
const dp = msg.data.dp;
|
|
@@ -6768,7 +6805,7 @@ const converters = {
|
|
|
6768
6805
|
},
|
|
6769
6806
|
SLUXZB: {
|
|
6770
6807
|
cluster: 'manuSpecificTuya',
|
|
6771
|
-
type: ['
|
|
6808
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
6772
6809
|
convert: (model, msg, publish, options, meta) => {
|
|
6773
6810
|
const dp = msg.data.dp;
|
|
6774
6811
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -6851,7 +6888,7 @@ const converters = {
|
|
|
6851
6888
|
},
|
|
6852
6889
|
tuya_gas: {
|
|
6853
6890
|
cluster: 'manuSpecificTuya',
|
|
6854
|
-
type: ['
|
|
6891
|
+
type: ['commandDataResponse'],
|
|
6855
6892
|
convert: (model, msg, publish, options, meta) => {
|
|
6856
6893
|
const dp = msg.data.dp;
|
|
6857
6894
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -7221,7 +7258,7 @@ const converters = {
|
|
|
7221
7258
|
},
|
|
7222
7259
|
tuya_motion_sensor: {
|
|
7223
7260
|
cluster: 'manuSpecificTuya',
|
|
7224
|
-
type: ['
|
|
7261
|
+
type: ['commandDataResponse'],
|
|
7225
7262
|
convert: (model, msg, publish, options, meta) => {
|
|
7226
7263
|
const dp = msg.data.dp;
|
|
7227
7264
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -7269,15 +7306,15 @@ const converters = {
|
|
|
7269
7306
|
},
|
|
7270
7307
|
tuya_radar_sensor: {
|
|
7271
7308
|
cluster: 'manuSpecificTuya',
|
|
7272
|
-
type: ['
|
|
7309
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
7273
7310
|
convert: (model, msg, publish, options, meta) => {
|
|
7274
7311
|
const dp = msg.data.dp;
|
|
7275
7312
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
7276
7313
|
switch (dp) {
|
|
7277
7314
|
case tuya.dataPoints.trsPresenceState:
|
|
7278
|
-
return {presence: {0:
|
|
7315
|
+
return {presence: {0: false, 1: true}[value]};
|
|
7279
7316
|
case tuya.dataPoints.trsMotionState:
|
|
7280
|
-
return {motion: {1:
|
|
7317
|
+
return {motion: {1: false, 2: true}[value]};
|
|
7281
7318
|
case tuya.dataPoints.trsMotionSpeed:
|
|
7282
7319
|
return {motion_speed: value};
|
|
7283
7320
|
case tuya.dataPoints.trsMotionDirection:
|
|
@@ -7293,7 +7330,7 @@ const converters = {
|
|
|
7293
7330
|
},
|
|
7294
7331
|
moes_thermostat_tv: {
|
|
7295
7332
|
cluster: 'manuSpecificTuya',
|
|
7296
|
-
type: ['
|
|
7333
|
+
type: ['commandDataResponse', 'commandDataReport', 'raw'],
|
|
7297
7334
|
convert: (model, msg, publish, options, meta) => {
|
|
7298
7335
|
const dp = msg.data.dp;
|
|
7299
7336
|
let value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -7402,7 +7439,7 @@ const converters = {
|
|
|
7402
7439
|
},
|
|
7403
7440
|
hoch_din: {
|
|
7404
7441
|
cluster: 'manuSpecificTuya',
|
|
7405
|
-
type: ['
|
|
7442
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
7406
7443
|
convert: (model, msg, publish, options, meta) => {
|
|
7407
7444
|
const dp = msg.data.dp;
|
|
7408
7445
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
@@ -7703,7 +7740,7 @@ const converters = {
|
|
|
7703
7740
|
},
|
|
7704
7741
|
ignore_tuya_set_time: {
|
|
7705
7742
|
cluster: 'manuSpecificTuya',
|
|
7706
|
-
type: ['
|
|
7743
|
+
type: ['commandMcuSyncTime'],
|
|
7707
7744
|
convert: (model, msg, publish, options, meta) => null,
|
|
7708
7745
|
},
|
|
7709
7746
|
// #endregion
|
package/converters/toZigbee.js
CHANGED
|
@@ -2467,6 +2467,16 @@ const converters = {
|
|
|
2467
2467
|
await entity.read('hvacThermostat', ['danfossExternalMeasuredRoomSensor'], manufacturerOptions.danfoss);
|
|
2468
2468
|
},
|
|
2469
2469
|
},
|
|
2470
|
+
danfoss_radiator_covered: {
|
|
2471
|
+
key: ['radiator_covered'],
|
|
2472
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2473
|
+
await entity.write('hvacThermostat', {'danfossRadiatorCovered': value}, manufacturerOptions.danfoss);
|
|
2474
|
+
return {readAfterWriteTime: 200, state: {'radiator_covered': value}};
|
|
2475
|
+
},
|
|
2476
|
+
convertGet: async (entity, key, meta) => {
|
|
2477
|
+
await entity.read('hvacThermostat', ['danfossRadiatorCovered'], manufacturerOptions.danfoss);
|
|
2478
|
+
},
|
|
2479
|
+
},
|
|
2470
2480
|
danfoss_viewing_direction: {
|
|
2471
2481
|
key: ['viewing_direction'],
|
|
2472
2482
|
convertSet: async (entity, key, value, meta) => {
|
|
@@ -3155,7 +3165,7 @@ const converters = {
|
|
|
3155
3165
|
key: ['state'],
|
|
3156
3166
|
convertSet: async (entity, key, value, meta) => {
|
|
3157
3167
|
// Always use same transid as tuya_dimmer_level (https://github.com/Koenkk/zigbee2mqtt/issues/6366)
|
|
3158
|
-
await tuya.sendDataPointBool(entity, tuya.dataPoints.state, value === 'ON', '
|
|
3168
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.state, value === 'ON', 'dataRequest', 1);
|
|
3159
3169
|
},
|
|
3160
3170
|
},
|
|
3161
3171
|
tuya_dimmer_level: {
|
|
@@ -3194,7 +3204,7 @@ const converters = {
|
|
|
3194
3204
|
}
|
|
3195
3205
|
}
|
|
3196
3206
|
// Always use same transid as tuya_dimmer_state (https://github.com/Koenkk/zigbee2mqtt/issues/6366)
|
|
3197
|
-
await tuya.sendDataPointValue(entity, dp, newValue, '
|
|
3207
|
+
await tuya.sendDataPointValue(entity, dp, newValue, 'dataRequest', 1);
|
|
3198
3208
|
},
|
|
3199
3209
|
},
|
|
3200
3210
|
tuya_switch_state: {
|
|
@@ -3239,7 +3249,7 @@ const converters = {
|
|
|
3239
3249
|
convertSet: async (entity, key, value, meta) => {
|
|
3240
3250
|
// input to multiple of 10 with max value of 100
|
|
3241
3251
|
const thresh = Math.abs(Math.min(10 * (Math.floor(value / 10)), 100));
|
|
3242
|
-
await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTreshold, thresh, '
|
|
3252
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTreshold, thresh, 'dataRequest', 1);
|
|
3243
3253
|
return {state: {threshold: value}};
|
|
3244
3254
|
},
|
|
3245
3255
|
},
|
|
@@ -3249,7 +3259,7 @@ const converters = {
|
|
|
3249
3259
|
// input in minutes with maximum of 600 minutes (equals 10 hours)
|
|
3250
3260
|
const timer = 60 * Math.abs(Math.min(value, 600));
|
|
3251
3261
|
// sendTuyaDataPoint* functions take care of converting the data to proper format
|
|
3252
|
-
await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTimer, timer, '
|
|
3262
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTimer, timer, 'dataRequest', 1);
|
|
3253
3263
|
return {state: {timer: value}};
|
|
3254
3264
|
},
|
|
3255
3265
|
},
|
|
@@ -3318,7 +3328,7 @@ const converters = {
|
|
|
3318
3328
|
// input in minutes with maximum of 600 minutes (equals 10 hours)
|
|
3319
3329
|
const timer = 60 * Math.abs(Math.min(value, 600));
|
|
3320
3330
|
// sendTuyaDataPoint* functions take care of converting the data to proper format
|
|
3321
|
-
await tuya.sendDataPointValue(entity, 11, timer, '
|
|
3331
|
+
await tuya.sendDataPointValue(entity, 11, timer, 'dataRequest', 1);
|
|
3322
3332
|
return {state: {timer: value}};
|
|
3323
3333
|
},
|
|
3324
3334
|
},
|
|
@@ -3328,7 +3338,7 @@ const converters = {
|
|
|
3328
3338
|
let timerState = 2;
|
|
3329
3339
|
if (value === 'disabled') timerState = 0;
|
|
3330
3340
|
else if (value === 'active') timerState = 1;
|
|
3331
|
-
await tuya.sendDataPointValue(entity, 11, timerState, '
|
|
3341
|
+
await tuya.sendDataPointValue(entity, 11, timerState, 'dataRequest', 1);
|
|
3332
3342
|
return {state: {timer_state: value}};
|
|
3333
3343
|
},
|
|
3334
3344
|
},
|
|
@@ -4973,6 +4983,27 @@ const converters = {
|
|
|
4973
4983
|
}
|
|
4974
4984
|
},
|
|
4975
4985
|
},
|
|
4986
|
+
nous_lcd_temperature_humidity_sensor: {
|
|
4987
|
+
key: ['min_temperature', 'max_temperature', 'temperature_sensitivity', 'temperature_unit_convert'],
|
|
4988
|
+
convertSet: async (entity, key, value, meta) => {
|
|
4989
|
+
switch (key) {
|
|
4990
|
+
case 'temperature_unit_convert':
|
|
4991
|
+
await tuya.sendDataPointEnum(entity, tuya.dataPoints.nousTempUnitConvert, ['°C', '°F'].indexOf(value));
|
|
4992
|
+
break;
|
|
4993
|
+
case 'min_temperature':
|
|
4994
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMinTemp, Math.round(value * 10));
|
|
4995
|
+
break;
|
|
4996
|
+
case 'max_temperature':
|
|
4997
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMaxTemp, Math.round(value * 10));
|
|
4998
|
+
break;
|
|
4999
|
+
case 'temperature_sensitivity':
|
|
5000
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousTempSensitivity, Math.round(value * 10));
|
|
5001
|
+
break;
|
|
5002
|
+
default: // Unknown key
|
|
5003
|
+
meta.logger.warn(`Unhandled key ${key}`);
|
|
5004
|
+
}
|
|
5005
|
+
},
|
|
5006
|
+
},
|
|
4976
5007
|
heiman_ir_remote: {
|
|
4977
5008
|
key: ['send_key', 'create', 'learn', 'delete', 'get_list'],
|
|
4978
5009
|
convertSet: async (entity, key, value, meta) => {
|
|
@@ -6110,18 +6141,18 @@ const converters = {
|
|
|
6110
6141
|
|
|
6111
6142
|
switch (key) {
|
|
6112
6143
|
case 'state':
|
|
6113
|
-
await tuya.sendDataPointBool(entity, stateKeyId, value === 'ON', '
|
|
6144
|
+
await tuya.sendDataPointBool(entity, stateKeyId, value === 'ON', 'dataRequest', 1);
|
|
6114
6145
|
break;
|
|
6115
6146
|
|
|
6116
6147
|
case 'brightness':
|
|
6117
6148
|
if (value >= 0 && value <= 254) {
|
|
6118
6149
|
const newValue = utils.mapNumberRange(value, 0, 254, 0, 1000);
|
|
6119
6150
|
if (newValue === 0) {
|
|
6120
|
-
await tuya.sendDataPointBool(entity, stateKeyId, false, '
|
|
6151
|
+
await tuya.sendDataPointBool(entity, stateKeyId, false, 'dataRequest', 1);
|
|
6121
6152
|
} else {
|
|
6122
|
-
await tuya.sendDataPointBool(entity, stateKeyId, true, '
|
|
6153
|
+
await tuya.sendDataPointBool(entity, stateKeyId, true, 'dataRequest', 1);
|
|
6123
6154
|
}
|
|
6124
|
-
await tuya.sendDataPointValue(entity, brightnessKeyId, newValue, '
|
|
6155
|
+
await tuya.sendDataPointValue(entity, brightnessKeyId, newValue, 'dataRequest', 1);
|
|
6125
6156
|
break;
|
|
6126
6157
|
} else {
|
|
6127
6158
|
throw new Error('Dimmer brightness is out of range 0..254');
|
package/devices/bitron.js
CHANGED
|
@@ -190,7 +190,7 @@ module.exports = [
|
|
|
190
190
|
tz.thermostat_running_state, tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode],
|
|
191
191
|
exposes: [e.battery(), exposes.climate().withSetpoint('occupied_heating_setpoint', 7, 30, 0.5).withLocalTemperature()
|
|
192
192
|
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat', 'cool'])
|
|
193
|
-
.withLocalTemperatureCalibration(-
|
|
193
|
+
.withLocalTemperatureCalibration(-30, 30, 0.1), e.keypad_lockout()],
|
|
194
194
|
meta: {battery: {voltageToPercentage: '3V_2500_3200'}},
|
|
195
195
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
196
196
|
const endpoint = device.getEndpoint(1);
|
package/devices/centralite.js
CHANGED
|
@@ -175,7 +175,7 @@ module.exports = [
|
|
|
175
175
|
.withSystemMode(['off', 'heat', 'cool', 'emergency_heating'])
|
|
176
176
|
.withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
|
|
177
177
|
.withSetpoint('occupied_cooling_setpoint', 10, 30, 1)
|
|
178
|
-
.withLocalTemperatureCalibration(-
|
|
178
|
+
.withLocalTemperatureCalibration(-30, 30, 0.1)],
|
|
179
179
|
meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
|
|
180
180
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
181
181
|
const endpoint = device.getEndpoint(1);
|
|
@@ -201,7 +201,7 @@ module.exports = [
|
|
|
201
201
|
.withSystemMode(['off', 'heat', 'cool', 'emergency_heating'])
|
|
202
202
|
.withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
|
|
203
203
|
.withSetpoint('occupied_cooling_setpoint', 10, 30, 1)
|
|
204
|
-
.withLocalTemperatureCalibration(-
|
|
204
|
+
.withLocalTemperatureCalibration(-30, 30, 0.1)],
|
|
205
205
|
meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
|
|
206
206
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
207
207
|
const endpoint = device.getEndpoint(1);
|
|
@@ -290,4 +290,46 @@ module.exports = [
|
|
|
290
290
|
},
|
|
291
291
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
|
|
292
292
|
},
|
|
293
|
+
{
|
|
294
|
+
zigbeeModel: ['EFEKTA_THP'],
|
|
295
|
+
model: 'EFEKTA_THP',
|
|
296
|
+
vendor: 'Custom devices (DiY)',
|
|
297
|
+
description: '[DIY temperature, humidity and atmospheric pressure sensor, long battery life](http://efektalab.com/eON_THP)',
|
|
298
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.battery],
|
|
299
|
+
toZigbee: [tz.factory_reset],
|
|
300
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
301
|
+
const endpoint = device.getEndpoint(1);
|
|
302
|
+
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
303
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement']);
|
|
304
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
305
|
+
await reporting.batteryVoltage(endpoint, overides);
|
|
306
|
+
await reporting.batteryPercentageRemaining(endpoint, overides);
|
|
307
|
+
await reporting.temperature(endpoint, overides);
|
|
308
|
+
await reporting.humidity(endpoint, overides);
|
|
309
|
+
await reporting.pressureExtended(endpoint, overides);
|
|
310
|
+
await endpoint.read('msPressureMeasurement', ['scale']);
|
|
311
|
+
},
|
|
312
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
zigbeeModel: ['EFEKTA_PWS_Max'],
|
|
316
|
+
model: 'EFEKTA_PWS_Max',
|
|
317
|
+
vendor: 'Custom devices (DiY)',
|
|
318
|
+
description: '[Plant watering sensor EFEKTA PWS max](http://efektalab.com/PWS_Max)',
|
|
319
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.illuminance, fz.soil_moisture, fz.battery],
|
|
320
|
+
toZigbee: [tz.factory_reset],
|
|
321
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
322
|
+
const firstEndpoint = device.getEndpoint(1);
|
|
323
|
+
await reporting.bind(firstEndpoint, coordinatorEndpoint, [
|
|
324
|
+
'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msIlluminanceMeasurement', 'msSoilMoisture']);
|
|
325
|
+
const overides = {min: 0, max: 21600, change: 0};
|
|
326
|
+
await reporting.batteryVoltage(firstEndpoint, overides);
|
|
327
|
+
await reporting.batteryPercentageRemaining(firstEndpoint, overides);
|
|
328
|
+
await reporting.temperature(firstEndpoint, overides);
|
|
329
|
+
await reporting.humidity(firstEndpoint, overides);
|
|
330
|
+
await reporting.illuminance(firstEndpoint, overides);
|
|
331
|
+
await reporting.soil_moisture(firstEndpoint, overides);
|
|
332
|
+
},
|
|
333
|
+
exposes: [e.soil_moisture(), e.battery(), e.illuminance(), e.temperature(), e.humidity()],
|
|
334
|
+
},
|
|
293
335
|
];
|