zigbee-herdsman-converters 15.0.111 → 15.0.113
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 +7 -3
- package/devices/ewelink.js +1 -1
- package/devices/ge.js +6 -1
- package/devices/legrand.js +8 -4
- package/devices/tuya.js +74 -30
- package/devices/xiaomi.js +19 -20
- package/lib/ota/common.js +1 -1
- package/lib/xiaomi.js +2 -0
- package/package.json +3 -3
package/converters/fromZigbee.js
CHANGED
|
@@ -5264,16 +5264,20 @@ const converters = {
|
|
|
5264
5264
|
return payload;
|
|
5265
5265
|
},
|
|
5266
5266
|
},
|
|
5267
|
-
|
|
5267
|
+
legrand_greenpower_254: {
|
|
5268
5268
|
cluster: 'greenPower',
|
|
5269
5269
|
type: ['commandNotification', 'commandCommisioningNotification'],
|
|
5270
5270
|
convert: (model, msg, publish, options, meta) => {
|
|
5271
5271
|
const commandID = msg.data.commandID;
|
|
5272
5272
|
if (hasAlreadyProcessedMessage(msg, model, msg.data.frameCounter, `${msg.device.ieeeAddr}_${commandID}`)) return;
|
|
5273
5273
|
if (commandID === 224) return;
|
|
5274
|
-
const lookup = {
|
|
5274
|
+
const lookup = {
|
|
5275
|
+
0x10: 'home_arrival', 0x11: 'home_departure', // ZLGP14
|
|
5276
|
+
0x12: 'daytime_day', 0x13: 'daytime_night', // ZLGP16, yes these commandIDs are lower than ZLGP15s'
|
|
5277
|
+
0x14: 'press_1', 0x15: 'press_2', 0x16: 'press_3', 0x17: 'press_4', // ZLGP15
|
|
5278
|
+
};
|
|
5275
5279
|
if (!lookup.hasOwnProperty(commandID)) {
|
|
5276
|
-
meta.logger.error(`
|
|
5280
|
+
meta.logger.error(`GreenPower_254: missing command '${commandID}'`);
|
|
5277
5281
|
} else {
|
|
5278
5282
|
return {action: lookup[commandID]};
|
|
5279
5283
|
}
|
package/devices/ewelink.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports = [
|
|
|
82
82
|
model: 'ZB-SW01',
|
|
83
83
|
vendor: 'eWeLink',
|
|
84
84
|
description: 'Smart light switch - 1 gang',
|
|
85
|
-
extend: extend.switch(),
|
|
85
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
86
86
|
fromZigbee: [fz.on_off_skip_duplicate_transaction],
|
|
87
87
|
onEvent: async (type, data, device) => {
|
|
88
88
|
device.skipDefaultResponse = true;
|
package/devices/ge.js
CHANGED
|
@@ -78,12 +78,17 @@ module.exports = [
|
|
|
78
78
|
model: '45857GE',
|
|
79
79
|
vendor: 'GE',
|
|
80
80
|
description: 'ZigBee in-wall smart dimmer',
|
|
81
|
+
exposes: extend.light_onoff_brightness({noConfigure: true}).exposes.concat([e.energy(), e.power()]),
|
|
82
|
+
fromZigbee: extend.light_onoff_brightness({noConfigure: true}).fromZigbee.concat([fz.metering]),
|
|
81
83
|
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
82
84
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
83
85
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
84
86
|
const endpoint = device.getEndpoint(1);
|
|
85
|
-
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
87
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
86
88
|
await reporting.onOff(endpoint);
|
|
89
|
+
await reporting.instantaneousDemand(endpoint);
|
|
90
|
+
await reporting.currentSummDelivered(endpoint);
|
|
91
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 10000, multiplier: 1});
|
|
87
92
|
},
|
|
88
93
|
},
|
|
89
94
|
{
|
package/devices/legrand.js
CHANGED
|
@@ -385,12 +385,16 @@ module.exports = [
|
|
|
385
385
|
},
|
|
386
386
|
{
|
|
387
387
|
fingerprint: [{modelID: 'GreenPower_254', ieeeAddr: /^0x00000000005.....$/}],
|
|
388
|
-
model: 'ZLGP15',
|
|
388
|
+
model: 'ZLGP14/ZLGP15/ZLGP16',
|
|
389
389
|
vendor: 'Legrand',
|
|
390
|
-
description: 'Wireless and batteryless 4
|
|
391
|
-
fromZigbee: [fz.
|
|
390
|
+
description: 'Wireless and batteryless scenario switch (home arrival/departure, 1-4 switches, daytime day/night)',
|
|
391
|
+
fromZigbee: [fz.legrand_greenpower_254],
|
|
392
392
|
toZigbee: [],
|
|
393
|
-
exposes: [e.action([
|
|
393
|
+
exposes: [e.action([
|
|
394
|
+
'home_arrival', 'home_departure', // ZLGP14
|
|
395
|
+
'press_1', 'press_2', 'press_3', 'press_4', // ZLGP15
|
|
396
|
+
'daytime_day', 'daytime_night', // ZLGP16
|
|
397
|
+
])],
|
|
394
398
|
},
|
|
395
399
|
{
|
|
396
400
|
fingerprint: [{modelID: 'GreenPower_2', ieeeAddr: /^0x00000000005.....$/}],
|
package/devices/tuya.js
CHANGED
|
@@ -901,7 +901,7 @@ const fzLocal = {
|
|
|
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
|
-
if (['_TZ3000_gvn91tmx', '_TZ3000_amdymr7l', '_TZ3000_typdpbpg', '_TZ3000_hdopuwv6'].includes(meta.device.manufacturerName)) {
|
|
904
|
+
if (result && ['_TZ3000_gvn91tmx', '_TZ3000_amdymr7l', '_TZ3000_typdpbpg', '_TZ3000_hdopuwv6'].includes(meta.device.manufacturerName)) {
|
|
905
905
|
for (const key of ['power', 'current', 'voltage']) {
|
|
906
906
|
if (key in result) {
|
|
907
907
|
const value = result[key];
|
|
@@ -1089,7 +1089,7 @@ module.exports = [
|
|
|
1089
1089
|
description: 'Smart air house keeper',
|
|
1090
1090
|
fromZigbee: [fz.tuya_air_quality],
|
|
1091
1091
|
toZigbee: [],
|
|
1092
|
-
exposes: [e.temperature(), e.humidity(), e.co2(), e.voc().withUnit('ppm'), e.formaldehyd().withUnit('
|
|
1092
|
+
exposes: [e.temperature(), e.humidity(), e.co2(), e.voc().withUnit('ppm'), e.formaldehyd().withUnit('µg/m³'),
|
|
1093
1093
|
e.pm25().withValueMin(0).withValueMax(999).withValueStep(1)],
|
|
1094
1094
|
},
|
|
1095
1095
|
{
|
|
@@ -1259,8 +1259,8 @@ module.exports = [
|
|
|
1259
1259
|
model: 'TS0505B_1',
|
|
1260
1260
|
vendor: 'TuYa',
|
|
1261
1261
|
description: 'Zigbee RGB+CCT light',
|
|
1262
|
-
whiteLabel: [{vendor: 'Mercator
|
|
1263
|
-
{vendor: 'TuYa', model: 'A5C-21F7-01'}, {vendor: 'Mercator
|
|
1262
|
+
whiteLabel: [{vendor: 'Mercator Ikuü', model: 'SMD4106W-RGB-ZB'},
|
|
1263
|
+
{vendor: 'TuYa', model: 'A5C-21F7-01'}, {vendor: 'Mercator Ikuü', model: 'S9E27LED9W-RGB-Z'},
|
|
1264
1264
|
{vendor: 'Aldi', model: 'L122CB63H11A9.0W', description: 'LIGHTWAY smart home LED-lamp - bulb'},
|
|
1265
1265
|
{vendor: 'Lidl', model: '14153706L', description: 'Livarno smart LED ceiling light'},
|
|
1266
1266
|
{vendor: 'Zemismart', model: 'LXZB-ZB-09A', description: 'Zemismart LED Surface Mounted Downlight 9W RGBW'},
|
|
@@ -1389,7 +1389,6 @@ module.exports = [
|
|
|
1389
1389
|
},
|
|
1390
1390
|
whiteLabel: [
|
|
1391
1391
|
{vendor: 'Linkoze', model: 'LKMSZ001'},
|
|
1392
|
-
tuya.whitelabel('TuYa', '809WZT', 'Motion sensor', ['_TZ3040_bb6xaihh']),
|
|
1393
1392
|
],
|
|
1394
1393
|
},
|
|
1395
1394
|
{
|
|
@@ -1410,6 +1409,9 @@ module.exports = [
|
|
|
1410
1409
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
1411
1410
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
1412
1411
|
},
|
|
1412
|
+
whiteLabel: [
|
|
1413
|
+
tuya.whitelabel('TuYa', '809WZT', 'Motion sensor', ['_TZ3040_bb6xaihh']),
|
|
1414
|
+
],
|
|
1413
1415
|
},
|
|
1414
1416
|
{
|
|
1415
1417
|
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_dr6sduka'},
|
|
@@ -1441,7 +1443,7 @@ module.exports = [
|
|
|
1441
1443
|
model: 'TS0202',
|
|
1442
1444
|
vendor: 'TuYa',
|
|
1443
1445
|
description: 'Motion sensor',
|
|
1444
|
-
whiteLabel: [{vendor: 'Mercator
|
|
1446
|
+
whiteLabel: [{vendor: 'Mercator Ikuü', model: 'SMA02P'},
|
|
1445
1447
|
{vendor: 'TuYa', model: 'TY-ZPR06'},
|
|
1446
1448
|
{vendor: 'Tesla Smart', model: 'TS0202'},
|
|
1447
1449
|
tuya.whitelabel('MiBoxer', 'PIR1-ZB', 'PIR sensor', ['_TZ3040_wqmtjsyk']),
|
|
@@ -1525,13 +1527,20 @@ module.exports = [
|
|
|
1525
1527
|
exposes: [e.water_leak(), e.battery_low(), e.battery()],
|
|
1526
1528
|
},
|
|
1527
1529
|
{
|
|
1528
|
-
fingerprint: tuya.fingerprint('TS0101', ['_TYZB01_ijihzffk', '_TZ3210_tfxwxklq']),
|
|
1530
|
+
fingerprint: tuya.fingerprint('TS0101', ['_TYZB01_ijihzffk', '_TZ3210_tfxwxklq', '_TZ3210_2dfy6tol']),
|
|
1529
1531
|
model: 'TS0101',
|
|
1530
1532
|
vendor: 'TuYa',
|
|
1531
1533
|
description: 'Zigbee Socket',
|
|
1532
|
-
whiteLabel: [
|
|
1534
|
+
whiteLabel: [
|
|
1535
|
+
{vendor: 'Larkkey', model: 'PS080'}, {vendor: 'Mercator', model: 'SPBS01G'},
|
|
1536
|
+
tuya.whitelabel('Mercator', 'SISW01', 'Ikuü inline switch', ['_TZ3210_2dfy6tol']),
|
|
1537
|
+
],
|
|
1533
1538
|
extend: tuya.extend.switch(),
|
|
1534
|
-
|
|
1539
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1540
|
+
const endpoint = device.getEndpoint(1);
|
|
1541
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
1542
|
+
await reporting.onOff(endpoint);
|
|
1543
|
+
},
|
|
1535
1544
|
},
|
|
1536
1545
|
{
|
|
1537
1546
|
fingerprint: [{modelID: 'TS0108', manufacturerName: '_TYZB01_7yidyqxd'}],
|
|
@@ -1581,7 +1590,7 @@ module.exports = [
|
|
|
1581
1590
|
{vendor: 'Earda', model: 'EDM-1ZAA-EU'},
|
|
1582
1591
|
{vendor: 'Earda', model: 'EDM-1ZAB-EU'},
|
|
1583
1592
|
{vendor: 'Earda', model: 'EDM-1ZBA-EU'},
|
|
1584
|
-
{vendor: 'Mercator
|
|
1593
|
+
{vendor: 'Mercator Ikuü', model: 'SSWD01'},
|
|
1585
1594
|
{vendor: 'Moes', model: 'ZS-USD'},
|
|
1586
1595
|
{vendor: 'Moes', model: 'EDM-1ZBB-EU'},
|
|
1587
1596
|
],
|
|
@@ -2018,8 +2027,8 @@ module.exports = [
|
|
|
2018
2027
|
vendor: 'TuYa',
|
|
2019
2028
|
description: 'Light controller',
|
|
2020
2029
|
whiteLabel: [
|
|
2021
|
-
{vendor: 'Mercator
|
|
2022
|
-
{vendor: 'Mercator
|
|
2030
|
+
{vendor: 'Mercator Ikuü', model: 'SMI7040', description: 'Ford Batten Light'},
|
|
2031
|
+
{vendor: 'Mercator Ikuü', model: 'SMD9300', description: 'Donovan Panel Light'},
|
|
2023
2032
|
tuya.whitelabel('Aldi', 'F122SB62H22A4.5W', 'LIGHTWAY smart home LED-lamp - filament', ['_TZ3000_g1glzzfk']),
|
|
2024
2033
|
tuya.whitelabel('Miboxer', 'FUT035Z', 'Dual white LED controller', ['_TZ3210_frm6149r', '_TZ3210_jtifm80b', '_TZ3210_xwqng7ol']),
|
|
2025
2034
|
tuya.whitelabel('Lidl', '14156408L', 'Livarno Lux smart LED ceiling light', ['_TZ3210_c2iwpxf1']),
|
|
@@ -2279,7 +2288,7 @@ module.exports = [
|
|
|
2279
2288
|
},
|
|
2280
2289
|
{
|
|
2281
2290
|
fingerprint: tuya.fingerprint('TS0001', ['_TZ3000_xkap8wtb', '_TZ3000_qnejhcsu', '_TZ3000_x3ewpzyr',
|
|
2282
|
-
'_TZ3000_mkhkxx1p', '_TZ3000_tgddllx4']),
|
|
2291
|
+
'_TZ3000_mkhkxx1p', '_TZ3000_tgddllx4', '_TZ3000_kqvb5akv']),
|
|
2283
2292
|
model: 'TS0001_power',
|
|
2284
2293
|
description: 'Switch with power monitoring',
|
|
2285
2294
|
vendor: 'TuYa',
|
|
@@ -2516,6 +2525,7 @@ module.exports = [
|
|
|
2516
2525
|
{modelID: 'TS0601', manufacturerName: '_TZE200_cf1sl3tj'},
|
|
2517
2526
|
{modelID: 'TS0601', manufacturerName: '_TZE200_b2u1drdv'},
|
|
2518
2527
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ol5jlkkr'},
|
|
2528
|
+
{modelID: 'TS0601', manufacturerName: '_TZE204_guvc7pdy'},
|
|
2519
2529
|
// Roller blinds:
|
|
2520
2530
|
{modelID: 'TS0601', manufacturerName: '_TZE200_fctwhugx'},
|
|
2521
2531
|
{modelID: 'TS0601', manufacturerName: '_TZE200_hsgrhjpf'},
|
|
@@ -2552,6 +2562,7 @@ module.exports = [
|
|
|
2552
2562
|
{vendor: 'Zemismart', model: 'BCM500DS-TYZ', description: 'Curtain motor'},
|
|
2553
2563
|
{vendor: 'A-OK', model: 'AM25', description: 'Tubular motor'},
|
|
2554
2564
|
{vendor: 'Alutech', model: 'AM/R-Sm', description: 'Tubular motor'},
|
|
2565
|
+
tuya.whitelabel('Shenzhen Golden Security Technology', 'GM46', 'Curtain motor', ['_TZE204_guvc7pdy']),
|
|
2555
2566
|
tuya.whitelabel('Zemismart', 'ZM85EL-2Z', 'Roman Rod I type U curtains track', ['_TZE200_cf1sl3tj']),
|
|
2556
2567
|
],
|
|
2557
2568
|
fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
|
|
@@ -2667,7 +2678,7 @@ module.exports = [
|
|
|
2667
2678
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
2668
2679
|
e.auto_lock(), e.away_mode(), e.away_preset_days(), e.boost_time(), e.comfort_temperature(), e.eco_temperature(), e.force(),
|
|
2669
2680
|
e.max_temperature().withValueMin(16).withValueMax(70), e.min_temperature(), e.away_preset_temperature(),
|
|
2670
|
-
exposes.composite('programming_mode', 'programming_mode', ea.STATE).withDescription('Schedule MODE
|
|
2681
|
+
exposes.composite('programming_mode', 'programming_mode', ea.STATE).withDescription('Schedule MODE â± - In this mode, ' +
|
|
2671
2682
|
'the device executes a preset week programming temperature time and temperature.')
|
|
2672
2683
|
.withFeature(e.week())
|
|
2673
2684
|
.withFeature(exposes.text('workdays_schedule', ea.STATE_SET))
|
|
@@ -2780,9 +2791,9 @@ module.exports = [
|
|
|
2780
2791
|
' by switching the heating off. To achieve this, the valve is closed fully. To activate the '+
|
|
2781
2792
|
'heating stop, the device display "HS", press the pair button to cancel.'),
|
|
2782
2793
|
tuya.exposes.frostProtection('When Anti-Freezing function is activated, the temperature in the house is kept '+
|
|
2783
|
-
'at 8
|
|
2794
|
+
'at 8 °C, the device display "AF".press the pair button to cancel.'),
|
|
2784
2795
|
exposes.numeric('boost_timeset_countdown', ea.STATE_SET).withUnit('second').withDescription('Setting '+
|
|
2785
|
-
'minimum 0 - maximum 465 seconds boost time. The boost (
|
|
2796
|
+
'minimum 0 - maximum 465 seconds boost time. The boost (â¨) function is activated. The remaining '+
|
|
2786
2797
|
'time for the function will be counted down in seconds ( 465 to 0 ).').withValueMin(0).withValueMax(465),
|
|
2787
2798
|
e.holiday_temperature().withValueMin(5).withValueMax(30),
|
|
2788
2799
|
exposes.text('holiday_start_stop', ea.STATE_SET).withDescription('The holiday mode will automatically start ' +
|
|
@@ -2919,7 +2930,7 @@ module.exports = [
|
|
|
2919
2930
|
'two weeks. It will run for 30 seconds per time with the screen displaying "Ad", then return to its normal working state ' +
|
|
2920
2931
|
'again.'),
|
|
2921
2932
|
exposes.binary('frost_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('When the room temperature is lower than ' +
|
|
2922
|
-
'5
|
|
2933
|
+
'5 °C, the valve opens; when the temperature rises to 8 °C, the valve closes.'),
|
|
2923
2934
|
exposes.numeric('error', ea.STATE).withDescription('If NTC is damaged, "Er" will be on the TRV display.'),
|
|
2924
2935
|
],
|
|
2925
2936
|
meta: {
|
|
@@ -3009,9 +3020,9 @@ module.exports = [
|
|
|
3009
3020
|
.withLocalTemperature(ea.STATE).withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
|
|
3010
3021
|
.withLocalTemperatureCalibration(-30, 30, 0.1, ea.STATE_SET)
|
|
3011
3022
|
.withPreset(['auto', 'manual', 'off', 'on'],
|
|
3012
|
-
'MANUAL MODE
|
|
3023
|
+
'MANUAL MODE â - In this mode, the device executes manual temperature setting. ' +
|
|
3013
3024
|
'When the set temperature is lower than the "minimum temperature", the valve is closed (forced closed). ' +
|
|
3014
|
-
'AUTO MODE
|
|
3025
|
+
'AUTO MODE â± - In this mode, the device executes a preset week programming temperature time and temperature. ' +
|
|
3015
3026
|
'ON - In this mode, the thermostat stays open ' +
|
|
3016
3027
|
'OFF - In this mode, the thermostat stays closed')
|
|
3017
3028
|
.withSystemMode(['auto', 'heat', 'off'], ea.STATE)
|
|
@@ -3019,7 +3030,7 @@ module.exports = [
|
|
|
3019
3030
|
...tuya.exposes.scheduleAllDays(ea.STATE_SET, 'HH:MM/C HH:MM/C HH:MM/C HH:MM/C'),
|
|
3020
3031
|
exposes.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF')
|
|
3021
3032
|
.withDescription('Boost Heating: press and hold "+" for 3 seconds, ' +
|
|
3022
|
-
'the device will enter the boost heating mode, and the
|
|
3033
|
+
'the device will enter the boost heating mode, and the â·âµâ will flash. The countdown will be displayed in the APP'),
|
|
3023
3034
|
exposes.numeric('boost_time', ea.STATE_SET).withUnit('min').withDescription('Countdown in minutes')
|
|
3024
3035
|
.withValueMin(0).withValueMax(1000),
|
|
3025
3036
|
],
|
|
@@ -3601,7 +3612,7 @@ module.exports = [
|
|
|
3601
3612
|
{vendor: 'Vrey', model: 'VR-X712U-0013'},
|
|
3602
3613
|
{vendor: 'TUYATEC', model: 'GDKES-01TZXD'},
|
|
3603
3614
|
{vendor: 'Lonsonho', model: 'QS-Zigbee-S05-L', description: '1 gang smart switch module without neutral wire'},
|
|
3604
|
-
{vendor: 'Mercator
|
|
3615
|
+
{vendor: 'Mercator Ikuü', model: 'SSW01'},
|
|
3605
3616
|
],
|
|
3606
3617
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3607
3618
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
@@ -3729,7 +3740,7 @@ module.exports = [
|
|
|
3729
3740
|
return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4};
|
|
3730
3741
|
},
|
|
3731
3742
|
whiteLabel: [{vendor: 'TUYATEC', model: 'GDKES-04TZXD'}, {vendor: 'Vizo', model: 'VZ-222S'},
|
|
3732
|
-
{vendor: 'MakeGood', model: 'MG-ZG04W/B/G'}, {vendor: 'Mercator
|
|
3743
|
+
{vendor: 'MakeGood', model: 'MG-ZG04W/B/G'}, {vendor: 'Mercator Ikuü', model: 'SSW04'}],
|
|
3733
3744
|
meta: {multiEndpoint: true},
|
|
3734
3745
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3735
3746
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
@@ -3971,13 +3982,13 @@ module.exports = [
|
|
|
3971
3982
|
.withDescription('Antifreeze function'),
|
|
3972
3983
|
exposes.binary('factory_reset', ea.STATE_SET, 'ON', 'OFF')
|
|
3973
3984
|
.withDescription('Resets all settings to default. Doesn\'t unpair device.'),
|
|
3974
|
-
exposes.numeric('heating_temp_limit', ea.STATE_SET).withUnit('
|
|
3985
|
+
exposes.numeric('heating_temp_limit', ea.STATE_SET).withUnit('°C').withValueMax(60)
|
|
3975
3986
|
.withValueMin(5).withValueStep(1).withPreset('default', 35, 'Default value')
|
|
3976
3987
|
.withDescription('Heating temperature limit'),
|
|
3977
|
-
exposes.numeric('deadzone_temperature', ea.STATE_SET).withUnit('
|
|
3988
|
+
exposes.numeric('deadzone_temperature', ea.STATE_SET).withUnit('°C').withValueMax(9.5)
|
|
3978
3989
|
.withValueMin(0.5).withValueStep(0.5).withPreset('default', 1, 'Default value')
|
|
3979
3990
|
.withDescription('The delta between local_temperature and current_heating_setpoint to trigger Heat'),
|
|
3980
|
-
exposes.numeric('upper_temp', ea.STATE_SET).withUnit('
|
|
3991
|
+
exposes.numeric('upper_temp', ea.STATE_SET).withUnit('°C').withValueMax(95)
|
|
3981
3992
|
.withValueMin(35).withValueStep(1).withPreset('default', 60, 'Default value'),
|
|
3982
3993
|
],
|
|
3983
3994
|
onEvent: tuya.onEventSetTime,
|
|
@@ -4102,9 +4113,9 @@ module.exports = [
|
|
|
4102
4113
|
'msTemperatureMeasurement', 'msIlluminanceMeasurement', 'msRelativeHumidity', 'manuSpecificTuya_2']);
|
|
4103
4114
|
},
|
|
4104
4115
|
exposes: [e.temperature(), e.humidity(), e.battery(), e.illuminance(), e.illuminance_lux(),
|
|
4105
|
-
exposes.numeric('alarm_temperature_max', ea.STATE_SET).withUnit('
|
|
4116
|
+
exposes.numeric('alarm_temperature_max', ea.STATE_SET).withUnit('°C').withDescription('Alarm temperature max')
|
|
4106
4117
|
.withValueMin(-20).withValueMax(80),
|
|
4107
|
-
exposes.numeric('alarm_temperature_min', ea.STATE_SET).withUnit('
|
|
4118
|
+
exposes.numeric('alarm_temperature_min', ea.STATE_SET).withUnit('°C').withDescription('Alarm temperature min')
|
|
4108
4119
|
.withValueMin(-20).withValueMax(80),
|
|
4109
4120
|
exposes.numeric('alarm_humidity_max', ea.STATE_SET).withUnit('%').withDescription('Alarm humidity max')
|
|
4110
4121
|
.withValueMin(0).withValueMax(100),
|
|
@@ -4141,7 +4152,7 @@ module.exports = [
|
|
|
4141
4152
|
],
|
|
4142
4153
|
},
|
|
4143
4154
|
{
|
|
4144
|
-
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lu01t0zl', '_TZE200_vrfecyku']),
|
|
4155
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lu01t0zl', '_TZE200_vrfecyku', '_TZE200_ypprdwsl']),
|
|
4145
4156
|
model: 'MIR-HE200-TY',
|
|
4146
4157
|
vendor: 'TuYa',
|
|
4147
4158
|
description: 'Human presence sensor with fall function',
|
|
@@ -4440,9 +4451,9 @@ module.exports = [
|
|
|
4440
4451
|
exposes.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
|
|
4441
4452
|
exposes.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
|
|
4442
4453
|
.withDescription('Temperature alarm status'),
|
|
4443
|
-
exposes.numeric('max_temperature', ea.STATE_SET).withUnit('
|
|
4454
|
+
exposes.numeric('max_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
|
|
4444
4455
|
.withDescription('Alarm temperature max'),
|
|
4445
|
-
exposes.numeric('min_temperature', ea.STATE_SET).withUnit('
|
|
4456
|
+
exposes.numeric('min_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
|
|
4446
4457
|
.withDescription('Alarm temperature min'),
|
|
4447
4458
|
exposes.enum('humidity_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
|
|
4448
4459
|
.withDescription('Humidity alarm status'),
|
|
@@ -5129,4 +5140,37 @@ module.exports = [
|
|
|
5129
5140
|
tuya.whitelabel('Homeetec', '37022173', 'Curtain/blind switch with 2 Gang switch', ['_TZE200_5nldle7w']),
|
|
5130
5141
|
],
|
|
5131
5142
|
},
|
|
5143
|
+
{
|
|
5144
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_bcusnqt8'}],
|
|
5145
|
+
model: 'SPM01',
|
|
5146
|
+
vendor: 'TuYa',
|
|
5147
|
+
description: 'Smart energy monitor for 1P+N system',
|
|
5148
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
5149
|
+
toZigbee: [tuya.tz.datapoints],
|
|
5150
|
+
configure: tuya.configureMagicPacket,
|
|
5151
|
+
exposes: [e.voltage(), e.power(), e.current(),
|
|
5152
|
+
// Change the description according to the specifications of the device
|
|
5153
|
+
e.energy().withDescription('Total forward active energy'),
|
|
5154
|
+
e.produced_energy().withDescription('Total reverse active energy'),
|
|
5155
|
+
],
|
|
5156
|
+
meta: {
|
|
5157
|
+
tuyaDatapoints: [
|
|
5158
|
+
[1, 'energy', tuya.valueConverter.divideBy100],
|
|
5159
|
+
[2, 'produced_energy', tuya.valueConverter.divideBy100],
|
|
5160
|
+
[6, null, {
|
|
5161
|
+
from: (v) => {
|
|
5162
|
+
return {
|
|
5163
|
+
voltage: v.readUint16BE(0)/10,
|
|
5164
|
+
current: ((v.readUint8(2)<<16)+(v.readUint8(3)<<8)+v.readUint8(4))/1000,
|
|
5165
|
+
power: ((v.readUint8(5)<<16)+(v.readUint8(6)<<8)+v.readUint8(7)),
|
|
5166
|
+
};
|
|
5167
|
+
},
|
|
5168
|
+
}],
|
|
5169
|
+
[6, 'voltage', tuya.valueConverter.raw],
|
|
5170
|
+
[6, 'current', tuya.valueConverter.raw],
|
|
5171
|
+
[6, 'power', tuya.valueConverter.raw],
|
|
5172
|
+
// [9,'',tuya.valueConverter.raw] // Unknown / datatype=5 (bitmap)
|
|
5173
|
+
],
|
|
5174
|
+
},
|
|
5175
|
+
},
|
|
5132
5176
|
];
|
package/devices/xiaomi.js
CHANGED
|
@@ -10,7 +10,7 @@ const ea = exposes.access;
|
|
|
10
10
|
const globalStore = require('../lib/store');
|
|
11
11
|
const xiaomi = require('../lib/xiaomi');
|
|
12
12
|
const utils = require('../lib/utils');
|
|
13
|
-
const {
|
|
13
|
+
const {printNumbersAsHexSequence} = utils;
|
|
14
14
|
const {fp1, manufacturerCode, trv} = xiaomi;
|
|
15
15
|
|
|
16
16
|
const xiaomiExtend = {
|
|
@@ -35,12 +35,11 @@ const preventReset = async (type, data, device) => {
|
|
|
35
35
|
) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const options = {manufacturerCode: 0x115f};
|
|
39
38
|
const payload = {[0xfff0]: {
|
|
40
39
|
value: [0xaa, 0x10, 0x05, 0x41, 0x47, 0x01, 0x01, 0x10, 0x01],
|
|
41
40
|
type: 0x41,
|
|
42
41
|
}};
|
|
43
|
-
await device.getEndpoint(1).write('genBasic', payload,
|
|
42
|
+
await device.getEndpoint(1).write('genBasic', payload, {manufacturerCode});
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
const daysLookup = {
|
|
@@ -253,7 +252,6 @@ const fzLocal = {
|
|
|
253
252
|
|
|
254
253
|
Object.entries(msg.data).forEach(([key, value]) => {
|
|
255
254
|
const eventKey = parseInt(key);
|
|
256
|
-
const eventKeyHex = printNumberAsHex(eventKey, 4);
|
|
257
255
|
|
|
258
256
|
switch (eventKey) {
|
|
259
257
|
case fp1.constants.region_event_key: {
|
|
@@ -287,21 +285,6 @@ const fzLocal = {
|
|
|
287
285
|
payload.action = `region_${regionId}_${eventTypeName}`;
|
|
288
286
|
break;
|
|
289
287
|
}
|
|
290
|
-
case 0xf7: {
|
|
291
|
-
const valueHexSequence = printNumbersAsHexSequence(value, 2);
|
|
292
|
-
log('debug', `Unhandled key ${eventKeyHex} = ${valueHexSequence}`);
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
295
|
-
case 0x0142:
|
|
296
|
-
case 0x0143:
|
|
297
|
-
case 0x0144:
|
|
298
|
-
case 0x0146: {
|
|
299
|
-
log('debug', `Unhandled key ${eventKeyHex} = ${value}`);
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
default: {
|
|
303
|
-
log('warn', `Unknown key ${eventKeyHex} = ${value}`);
|
|
304
|
-
}
|
|
305
288
|
}
|
|
306
289
|
});
|
|
307
290
|
|
|
@@ -354,6 +337,18 @@ const fzLocal = {
|
|
|
354
337
|
};
|
|
355
338
|
|
|
356
339
|
const tzLocal = {
|
|
340
|
+
aqara_detection_distance: {
|
|
341
|
+
key: ['detection_distance'],
|
|
342
|
+
convertSet: async (entity, key, value, meta) => {
|
|
343
|
+
value = value.toLowerCase();
|
|
344
|
+
const lookup = {'10mm': 1, '20mm': 2, '30mm': 3};
|
|
345
|
+
await entity.write('aqaraOpple', {0x010C: {value: lookup[value], type: 0x20}}, {manufacturerCode});
|
|
346
|
+
return {state: {detection_distance: value}};
|
|
347
|
+
},
|
|
348
|
+
convertGet: async (entity, key, meta) => {
|
|
349
|
+
await entity.read('aqaraOpple', [0x010C], {manufacturerCode});
|
|
350
|
+
},
|
|
351
|
+
},
|
|
357
352
|
aqara_trv: {
|
|
358
353
|
key: ['system_mode', 'preset', 'window_detection', 'valve_detection', 'child_lock', 'away_preset_temperature',
|
|
359
354
|
'calibrate', 'sensor', 'sensor_temp', 'identify', 'schedule', 'schedule_settings'],
|
|
@@ -743,10 +738,12 @@ module.exports = [
|
|
|
743
738
|
vendor: 'Xiaomi',
|
|
744
739
|
description: 'Aqara P1 door & window contact sensor',
|
|
745
740
|
fromZigbee: [fz.xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
|
|
746
|
-
toZigbee: [],
|
|
741
|
+
toZigbee: [tzLocal.aqara_detection_distance],
|
|
747
742
|
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
748
743
|
exposes: [e.contact(), e.battery(), e.battery_voltage(),
|
|
749
744
|
exposes.binary('battery_cover', ea.STATE, 'OPEN', 'CLOSE'),
|
|
745
|
+
exposes.enum('detection_distance', ea.ALL, ['10mm', '20mm', '30mm'])
|
|
746
|
+
.withDescription('The sensor will be considered "off" within the set distance. Please press the device button before setting'),
|
|
750
747
|
],
|
|
751
748
|
},
|
|
752
749
|
{
|
|
@@ -1762,6 +1759,8 @@ module.exports = [
|
|
|
1762
1759
|
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
1763
1760
|
await endpoint.read('aqaraOpple', [0x0102], {manufacturerCode: 0x115f});
|
|
1764
1761
|
await endpoint.read('aqaraOpple', [0x010c], {manufacturerCode: 0x115f});
|
|
1762
|
+
// This cluster is not discovered automatically and needs to be explicitly attached to enable OTA
|
|
1763
|
+
utils.attachOutputCluster(device, 'genOta');
|
|
1765
1764
|
},
|
|
1766
1765
|
ota: ota.zigbeeOTA,
|
|
1767
1766
|
},
|
package/lib/ota/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const crypto = require('crypto');
|
|
2
2
|
const upgradeFileIdentifier = Buffer.from([0x1E, 0xF1, 0xEE, 0x0B]);
|
|
3
|
-
const HttpsProxyAgent = require('https-proxy-agent');
|
|
3
|
+
const {HttpsProxyAgent} = require('https-proxy-agent');
|
|
4
4
|
const assert = require('assert');
|
|
5
5
|
const crc32 = require('buffer-crc32');
|
|
6
6
|
const maxTimeout = 2147483647; // +- 24 days
|
package/lib/xiaomi.js
CHANGED
|
@@ -374,6 +374,8 @@ const numericAttributes2Payload = async (msg, meta, model, options, dataObject)
|
|
|
374
374
|
case '159':
|
|
375
375
|
if (['JT-BZ-01AQ/A'].includes(model.model)) {
|
|
376
376
|
payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[value];
|
|
377
|
+
} else if (['MCCGQ13LM'].includes(model.model)) {
|
|
378
|
+
payload.detection_distance = {1: '10mm', 2: '20mm', 3: '30mm'}[value];
|
|
377
379
|
}
|
|
378
380
|
break;
|
|
379
381
|
case '160':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.113",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"axios": "^1.4.0",
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
|
-
"https-proxy-agent": "^
|
|
39
|
+
"https-proxy-agent": "^6.1.0",
|
|
40
40
|
"tar-stream": "^3.0.0",
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
41
|
+
"zigbee-herdsman": "^0.14.115"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|