zigbee-herdsman-converters 14.0.501 → 14.0.504
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 +55 -11
- package/converters/toZigbee.js +51 -14
- package/devices/fantem.js +17 -14
- package/devices/heiman.js +1 -1
- package/devices/lonsonho.js +1 -1
- package/devices/moes.js +3 -3
- package/devices/philips.js +9 -0
- package/devices/saswell.js +1 -0
- package/devices/tuya.js +56 -0
- package/devices/xiaomi.js +1 -0
- package/lib/tuya.js +24 -0
- package/package.json +3 -3
package/converters/fromZigbee.js
CHANGED
|
@@ -4751,7 +4751,7 @@ const converters = {
|
|
|
4751
4751
|
}
|
|
4752
4752
|
return {brightness: mapNumberRange(value, 10, 1000, 0, 254)};
|
|
4753
4753
|
}
|
|
4754
|
-
} else if (meta.device.manufacturerName
|
|
4754
|
+
} else if (['_TZE200_3p5ydos3', '_TZE200_9i9dt8is', '_TZE200_dfxkcots'].includes(meta.device.manufacturerName)) {
|
|
4755
4755
|
if (dpValue.dp === tuya.dataPoints.eardaDimmerLevel) {
|
|
4756
4756
|
return {brightness: mapNumberRange(value, 0, 1000, 0, 254)};
|
|
4757
4757
|
} else if (dpValue.dp === tuya.dataPoints.dimmerMinLevel) {
|
|
@@ -7272,14 +7272,14 @@ const converters = {
|
|
|
7272
7272
|
const dpValue = tuya.firstDpValue(msg, meta, 'ZB003X');
|
|
7273
7273
|
const dp = dpValue.dp;
|
|
7274
7274
|
const value = tuya.getDataValue(dpValue);
|
|
7275
|
-
|
|
7276
7275
|
switch (dp) {
|
|
7277
7276
|
case tuya.dataPoints.fantemTemp:
|
|
7278
|
-
return {temperature: calibrateAndPrecisionRoundOptions((value / 10)
|
|
7277
|
+
return {temperature: calibrateAndPrecisionRoundOptions((value / 10), options, 'temperature')};
|
|
7279
7278
|
case tuya.dataPoints.fantemHumidity:
|
|
7280
7279
|
return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
|
|
7281
7280
|
case tuya.dataPoints.fantemBattery:
|
|
7282
|
-
|
|
7281
|
+
// second battery level, first battery is reported by fz.battery
|
|
7282
|
+
return {battery2: value};
|
|
7283
7283
|
case tuya.dataPoints.fantemReportingTime:
|
|
7284
7284
|
return {reporting_time: value};
|
|
7285
7285
|
case tuya.dataPoints.fantemTempCalibration:
|
|
@@ -7295,12 +7295,11 @@ const converters = {
|
|
|
7295
7295
|
case tuya.dataPoints.fantemMotionEnable:
|
|
7296
7296
|
return {pir_enable: value};
|
|
7297
7297
|
case tuya.dataPoints.fantemLedEnable:
|
|
7298
|
-
return {led_enable: value};
|
|
7298
|
+
return {led_enable: value ? false : true};
|
|
7299
7299
|
case tuya.dataPoints.fantemReportingEnable:
|
|
7300
7300
|
return {reporting_enable: value};
|
|
7301
7301
|
default:
|
|
7302
|
-
meta.logger.warn(`
|
|
7303
|
-
dp} with data ${JSON.stringify(dpValue)}`);
|
|
7302
|
+
meta.logger.warn(`fz.ZB003X: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
|
|
7304
7303
|
}
|
|
7305
7304
|
},
|
|
7306
7305
|
},
|
|
@@ -7310,7 +7309,7 @@ const converters = {
|
|
|
7310
7309
|
convert: (model, msg, publish, options, meta) => {
|
|
7311
7310
|
const data = msg.data;
|
|
7312
7311
|
const senslookup = {'0': 'low', '1': 'medium', '2': 'high'};
|
|
7313
|
-
const keeptimelookup = {'0': 0, '1': 30, '2': 60, '3': 120, '4': 240};
|
|
7312
|
+
const keeptimelookup = {'0': 0, '1': 30, '2': 60, '3': 120, '4': 240, '5': 480};
|
|
7314
7313
|
if (data && data.hasOwnProperty('currentZoneSensitivityLevel')) {
|
|
7315
7314
|
const value = data.currentZoneSensitivityLevel;
|
|
7316
7315
|
return {sensitivity: senslookup[value]};
|
|
@@ -7340,12 +7339,11 @@ const converters = {
|
|
|
7340
7339
|
case tuya.dataPoints.fantemPowerSupplyMode:
|
|
7341
7340
|
return {power_supply_mode: {0: 'unknown', 1: 'no_neutral', 2: 'with_neutral'}[value]};
|
|
7342
7341
|
case tuya.dataPoints.fantemExtSwitchType:
|
|
7343
|
-
return {
|
|
7344
|
-
4: 'auto_config'}[value]};
|
|
7342
|
+
return {switch_type: {0: 'unknown', 1: 'toggle', 2: 'momentary', 3: 'rotary', 4: 'auto_config'}[value]};
|
|
7345
7343
|
case tuya.dataPoints.fantemLoadDetectionMode:
|
|
7346
7344
|
return {load_detection_mode: {0: 'none', 1: 'first_power_on', 2: 'every_power_on'}[value]};
|
|
7347
7345
|
case tuya.dataPoints.fantemExtSwitchStatus:
|
|
7348
|
-
return {
|
|
7346
|
+
return {switch_status: value};
|
|
7349
7347
|
case tuya.dataPoints.fantemControlMode:
|
|
7350
7348
|
return {control_mode: {0: 'ext_switch', 1: 'remote', 2: 'both'}[value]};
|
|
7351
7349
|
case 111:
|
|
@@ -8413,6 +8411,52 @@ const converters = {
|
|
|
8413
8411
|
return result;
|
|
8414
8412
|
},
|
|
8415
8413
|
},
|
|
8414
|
+
tuya_smart_human_presense_sensor: {
|
|
8415
|
+
cluster: 'manuSpecificTuya',
|
|
8416
|
+
type: ['commandDataResponse', 'commandDataReport'],
|
|
8417
|
+
convert: (model, msg, publish, options, meta) => {
|
|
8418
|
+
const dpValue = tuya.firstDpValue(msg, meta, 'tuya_smart_human_presense_sensor');
|
|
8419
|
+
const dp = dpValue.dp;
|
|
8420
|
+
const value = tuya.getDataValue(dpValue);
|
|
8421
|
+
let result = null;
|
|
8422
|
+
switch (dp) {
|
|
8423
|
+
case tuya.dataPoints.tshpsPresenceState:
|
|
8424
|
+
result = {presence: {0: false, 1: true}[value]};
|
|
8425
|
+
break;
|
|
8426
|
+
case tuya.dataPoints.tshpscSensitivity:
|
|
8427
|
+
result = {radar_sensitivity: value};
|
|
8428
|
+
break;
|
|
8429
|
+
case tuya.dataPoints.tshpsMinimumRange:
|
|
8430
|
+
result = {minimum_range: value/100};
|
|
8431
|
+
break;
|
|
8432
|
+
case tuya.dataPoints.tshpsMaximumRange:
|
|
8433
|
+
result = {maximum_range: value/100};
|
|
8434
|
+
break;
|
|
8435
|
+
case tuya.dataPoints.tshpsTargetDistance:
|
|
8436
|
+
result = {target_distance: value/100};
|
|
8437
|
+
break;
|
|
8438
|
+
case tuya.dataPoints.tshpsDetectionDelay:
|
|
8439
|
+
result = {detection_delay: value/10};
|
|
8440
|
+
break;
|
|
8441
|
+
case tuya.dataPoints.tshpsFadingTime:
|
|
8442
|
+
result = {fading_time: value/10};
|
|
8443
|
+
break;
|
|
8444
|
+
case tuya.dataPoints.tshpsIlluminanceLux:
|
|
8445
|
+
result = {illuminance_lux: value};
|
|
8446
|
+
break;
|
|
8447
|
+
case tuya.dataPoints.tshpsCLI: // not recognize
|
|
8448
|
+
result = {cli: value};
|
|
8449
|
+
break;
|
|
8450
|
+
case tuya.dataPoints.tshpsSelfTest:
|
|
8451
|
+
result = {self_test: tuya.tuyaHPSCheckingResult [value]};
|
|
8452
|
+
break;
|
|
8453
|
+
default:
|
|
8454
|
+
meta.logger
|
|
8455
|
+
.warn(`fromZigbee.tuya_smart_human_presense_sensor: NOT RECOGNIZED DP ${dp} with data ${JSON.stringify(dpValue)}`);
|
|
8456
|
+
}
|
|
8457
|
+
return result;
|
|
8458
|
+
},
|
|
8459
|
+
},
|
|
8416
8460
|
// #endregion
|
|
8417
8461
|
|
|
8418
8462
|
// #region Ignore converters (these message dont need parsing).
|
package/converters/toZigbee.js
CHANGED
|
@@ -5633,7 +5633,10 @@ const converters = {
|
|
|
5633
5633
|
},
|
|
5634
5634
|
},
|
|
5635
5635
|
nous_lcd_temperature_humidity_sensor: {
|
|
5636
|
-
key: [
|
|
5636
|
+
key: [
|
|
5637
|
+
'min_temperature', 'max_temperature', 'temperature_sensitivity', 'temperature_unit_convert',
|
|
5638
|
+
'min_humidity', 'max_humidity', 'report_interval',
|
|
5639
|
+
],
|
|
5637
5640
|
convertSet: async (entity, key, value, meta) => {
|
|
5638
5641
|
switch (key) {
|
|
5639
5642
|
case 'temperature_unit_convert':
|
|
@@ -5648,6 +5651,15 @@ const converters = {
|
|
|
5648
5651
|
case 'temperature_sensitivity':
|
|
5649
5652
|
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousTempSensitivity, Math.round(value * 10));
|
|
5650
5653
|
break;
|
|
5654
|
+
case 'min_humidity':
|
|
5655
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMinHumi, Math.round(value * 10));
|
|
5656
|
+
break;
|
|
5657
|
+
case 'max_humidity':
|
|
5658
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMaxHumi, Math.round(value * 10));
|
|
5659
|
+
break;
|
|
5660
|
+
case 'report_interval':
|
|
5661
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousReportInterval, value);
|
|
5662
|
+
break;
|
|
5651
5663
|
default: // Unknown key
|
|
5652
5664
|
meta.logger.warn(`Unhandled key ${key}`);
|
|
5653
5665
|
}
|
|
@@ -6478,48 +6490,49 @@ const converters = {
|
|
|
6478
6490
|
convertSet: async (entity, key, value, meta) => {
|
|
6479
6491
|
switch (key) {
|
|
6480
6492
|
case 'reporting_time':
|
|
6481
|
-
await tuya.sendDataPointValue(entity,
|
|
6493
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemReportingTime, value, 'sendData');
|
|
6482
6494
|
break;
|
|
6483
6495
|
case 'temperature_calibration':
|
|
6484
6496
|
value = Math.round(value * 10);
|
|
6485
6497
|
if (value < 0) value = 0xFFFFFFFF + value + 1;
|
|
6486
|
-
await tuya.sendDataPointValue(entity,
|
|
6498
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemTempCalibration, value, 'sendData');
|
|
6487
6499
|
break;
|
|
6488
6500
|
case 'humidity_calibration':
|
|
6489
6501
|
if (value < 0) value = 0xFFFFFFFF + value + 1;
|
|
6490
|
-
await tuya.sendDataPointValue(entity,
|
|
6502
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemHumidityCalibration, value, 'sendData');
|
|
6491
6503
|
break;
|
|
6492
6504
|
case 'illuminance_calibration':
|
|
6493
6505
|
if (value < 0) value = 0xFFFFFFFF + value + 1;
|
|
6494
|
-
await tuya.sendDataPointValue(entity,
|
|
6506
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.fantemLuxCalibration, value, 'sendData');
|
|
6495
6507
|
break;
|
|
6496
6508
|
case 'pir_enable':
|
|
6497
|
-
await tuya.sendDataPointBool(entity,
|
|
6509
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemMotionEnable, value, 'sendData');
|
|
6498
6510
|
break;
|
|
6499
6511
|
case 'led_enable':
|
|
6500
|
-
await tuya.sendDataPointBool(entity,
|
|
6512
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemLedEnable, value === false, 'sendData');
|
|
6501
6513
|
break;
|
|
6502
6514
|
case 'reporting_enable':
|
|
6503
|
-
await tuya.sendDataPointBool(entity,
|
|
6515
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.fantemReportingEnable, value, 'sendData');
|
|
6504
6516
|
break;
|
|
6505
6517
|
case 'sensitivity':
|
|
6506
6518
|
await entity.write('ssIasZone', {currentZoneSensitivityLevel: {'low': 0, 'medium': 1, 'high': 2}[value]});
|
|
6507
6519
|
break;
|
|
6508
6520
|
case 'keep_time':
|
|
6509
|
-
await entity.write('ssIasZone', {61441: {value: {'0': 0, '30': 1, '60': 2, '120': 3,
|
|
6521
|
+
await entity.write('ssIasZone', {61441: {value: {'0': 0, '30': 1, '60': 2, '120': 3,
|
|
6522
|
+
'240': 4, '480': 5}[value], type: 0x20}});
|
|
6510
6523
|
break;
|
|
6511
6524
|
default: // Unknown key
|
|
6512
|
-
throw new Error(`Unhandled key ${key}`);
|
|
6525
|
+
throw new Error(`tz.ZB003X: Unhandled key ${key}`);
|
|
6513
6526
|
}
|
|
6514
6527
|
},
|
|
6515
6528
|
},
|
|
6516
6529
|
ZB006X_settings: {
|
|
6517
|
-
key: ['
|
|
6530
|
+
key: ['switch_type', 'load_detection_mode', 'control_mode'],
|
|
6518
6531
|
convertSet: async (entity, key, value, meta) => {
|
|
6519
6532
|
switch (key) {
|
|
6520
|
-
case '
|
|
6521
|
-
await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemExtSwitchType, {'unknown': 0, '
|
|
6522
|
-
'
|
|
6533
|
+
case 'switch_type':
|
|
6534
|
+
await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemExtSwitchType, {'unknown': 0, 'toggle': 1,
|
|
6535
|
+
'momentary': 2, 'rotary': 3, 'auto_config': 4}[value], 'sendData');
|
|
6523
6536
|
break;
|
|
6524
6537
|
case 'load_detection_mode':
|
|
6525
6538
|
await tuya.sendDataPointEnum(entity, tuya.dataPoints.fantemLoadDetectionMode, {'none': 0, 'first_power_on': 1,
|
|
@@ -7372,6 +7385,30 @@ const converters = {
|
|
|
7372
7385
|
}
|
|
7373
7386
|
},
|
|
7374
7387
|
},
|
|
7388
|
+
tuya_smart_human_presense_sensor: {
|
|
7389
|
+
key: ['radar_sensitivity', 'minimum_range', 'maximum_range', 'detection_delay', 'fading_time'],
|
|
7390
|
+
convertSet: async (entity, key, value, meta) => {
|
|
7391
|
+
switch (key) {
|
|
7392
|
+
case 'radar_sensitivity':
|
|
7393
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpscSensitivity, value);
|
|
7394
|
+
break;
|
|
7395
|
+
case 'minimum_range':
|
|
7396
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMinimumRange, value*100);
|
|
7397
|
+
break;
|
|
7398
|
+
case 'maximum_range':
|
|
7399
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsMaximumRange, value*100);
|
|
7400
|
+
break;
|
|
7401
|
+
case 'detection_delay':
|
|
7402
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsDetectionDelay, value*10);
|
|
7403
|
+
break;
|
|
7404
|
+
case 'fading_time':
|
|
7405
|
+
await tuya.sendDataPointValue(entity, tuya.dataPoints.tshpsFadingTime, value*10);
|
|
7406
|
+
break;
|
|
7407
|
+
default: // Unknown Key
|
|
7408
|
+
meta.logger.warn(`toZigbee.tuya_smart_human_presense_sensor: Unhandled Key ${key}`);
|
|
7409
|
+
}
|
|
7410
|
+
},
|
|
7411
|
+
},
|
|
7375
7412
|
// #endregion
|
|
7376
7413
|
|
|
7377
7414
|
// #region Ignore converters
|
package/devices/fantem.js
CHANGED
|
@@ -20,9 +20,9 @@ module.exports = [
|
|
|
20
20
|
exposes: [e.light_brightness(),
|
|
21
21
|
e.action(['on', 'off', 'brightness_move_down', 'brightness_move_up', 'brightness_stop']),
|
|
22
22
|
exposes.enum('control_mode', ea.STATE_SET, ['ext_switch', 'remote', 'both']).withDescription('Control mode'),
|
|
23
|
-
exposes.enum('
|
|
23
|
+
exposes.enum('switch_type', ea.STATE_SET, ['unknown', 'toggle', 'momentary', 'rotary', 'auto_config'])
|
|
24
24
|
.withDescription('External switch type'),
|
|
25
|
-
exposes.numeric('
|
|
25
|
+
exposes.numeric('switch_status', ea.STATE).withDescription('External switch status')
|
|
26
26
|
.withValueMin(-10000).withValueMax(10000),
|
|
27
27
|
exposes.enum('load_detection_mode', ea.STATE_SET, ['none', 'first_power_on', 'every_power_on'])
|
|
28
28
|
.withDescription('Load detection mode'),
|
|
@@ -43,30 +43,33 @@ module.exports = [
|
|
|
43
43
|
// https://github.com/Koenkk/zigbee2mqtt/issues/9057#issuecomment-1007742130
|
|
44
44
|
await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
|
|
45
45
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
46
|
-
await reporting.onOff(endpoint);
|
|
47
46
|
},
|
|
48
47
|
},
|
|
49
48
|
{
|
|
50
|
-
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_rxqls8v0'},
|
|
49
|
+
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_rxqls8v0'},
|
|
50
|
+
{modelID: 'TS0202', manufacturerName: '_TZ3210_zmy9hjay'}],
|
|
51
51
|
model: 'ZB003-X',
|
|
52
52
|
vendor: 'Fantem',
|
|
53
53
|
description: '4 in 1 multi sensor',
|
|
54
54
|
fromZigbee: [fz.battery, fz.ignore_basic_report, fz.illuminance, fz.ZB003X, fz.ZB003X_attr, fz.ZB003X_occupancy],
|
|
55
55
|
toZigbee: [tz.ZB003X],
|
|
56
|
-
exposes: [e.occupancy(), e.tamper(), e.
|
|
57
|
-
e.
|
|
58
|
-
|
|
59
|
-
exposes.numeric('
|
|
56
|
+
exposes: [e.occupancy(), e.tamper(), e.illuminance_lux(), e.illuminance(), e.temperature(), e.humidity(),
|
|
57
|
+
e.battery(), e.battery_voltage(),
|
|
58
|
+
exposes.numeric('battery2', ea.STATE).withUnit('%').withDescription('Remaining battery 2 in %'),
|
|
59
|
+
exposes.numeric('illuminance_calibration', ea.STATE_SET).withDescription('Illuminance calibration in lux')
|
|
60
60
|
.withValueMin(-20).withValueMax(20),
|
|
61
|
+
exposes.numeric('temperature_calibration', ea.STATE_SET).withDescription('Temperature calibration (-2.0...2.0)')
|
|
62
|
+
.withValueMin(-2).withValueMax(2).withValueStep(0.1),
|
|
61
63
|
exposes.numeric('humidity_calibration', ea.STATE_SET).withDescription('Humidity calibration')
|
|
62
|
-
.withValueMin(-
|
|
63
|
-
exposes.
|
|
64
|
-
|
|
64
|
+
.withValueMin(-15).withValueMax(15),
|
|
65
|
+
exposes.binary('reporting_enable', ea.STATE_SET, true, false).withDescription('Enable reporting'),
|
|
66
|
+
exposes.numeric('reporting_time', ea.STATE_SET).withDescription('Reporting interval in minutes')
|
|
67
|
+
.withValueMin(0).withValueMax(1440).withValueStep(5),
|
|
68
|
+
exposes.binary('led_enable', ea.STATE_SET, true, false).withDescription('Enable LED'),
|
|
65
69
|
exposes.binary('pir_enable', ea.STATE_SET, true, false).withDescription('Enable PIR sensor'),
|
|
66
|
-
exposes.binary('led_enable', ea.STATE_SET, true, false).withDescription('Enabled LED'),
|
|
67
|
-
exposes.binary('reporting_enable', ea.STATE_SET, true, false).withDescription('Enabled reporting'),
|
|
68
70
|
exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']).withDescription('PIR sensor sensitivity'),
|
|
69
71
|
// eslint-disable-next-line
|
|
70
|
-
exposes.enum('keep_time', ea.STATE_SET, ['0', '30', '60', '120', '240'
|
|
72
|
+
exposes.enum('keep_time', ea.STATE_SET, ['0', '30', '60', '120', '240', '480'])
|
|
73
|
+
.withDescription('PIR keep time in seconds')],
|
|
71
74
|
},
|
|
72
75
|
];
|
package/devices/heiman.js
CHANGED
|
@@ -469,7 +469,7 @@ module.exports = [
|
|
|
469
469
|
exposes: [e.vibration(), e.battery_low(), e.tamper(), e.battery()],
|
|
470
470
|
},
|
|
471
471
|
{
|
|
472
|
-
fingerprint: [{modelID: 'Vibration-EF_3.0', manufacturerName: 'HEIMAN'}],
|
|
472
|
+
fingerprint: [{modelID: 'Vibration-EF_3.0', manufacturerName: 'HEIMAN'}, {modelID: 'Vibration-EF-3.0', manufacturerName: 'HEIMAN'}],
|
|
473
473
|
model: 'HS1VS-EF',
|
|
474
474
|
vendor: 'HEIMAN',
|
|
475
475
|
description: 'Vibration sensor',
|
package/devices/lonsonho.js
CHANGED
|
@@ -210,7 +210,7 @@ module.exports = [
|
|
|
210
210
|
exposes.numeric('calibration_time', ea.STATE).withUnit('S').withDescription('Calibration time')],
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
|
-
fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_zxbtub8r'}],
|
|
213
|
+
fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_zxbtub8r'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_ngqk6jia'}],
|
|
214
214
|
model: 'TS110E_1gang',
|
|
215
215
|
vendor: 'Lonsonho',
|
|
216
216
|
description: 'Zigbee smart dimmer module 1 gang with neutral',
|
package/devices/moes.js
CHANGED
|
@@ -15,11 +15,11 @@ module.exports = [
|
|
|
15
15
|
model: 'ZP-LZ-FR2U',
|
|
16
16
|
vendor: 'Moes',
|
|
17
17
|
description: 'Zigbee 3.0 dual USB wireless socket plug',
|
|
18
|
-
fromZigbee: [fz.on_off, fz.tuya_switch_power_outage_memory],
|
|
19
|
-
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
|
|
18
|
+
fromZigbee: [fz.on_off, fz.tuya_switch_power_outage_memory, fz.ts011f_plug_child_mode],
|
|
19
|
+
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_child_mode],
|
|
20
20
|
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
|
|
21
21
|
exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
|
|
22
|
-
.withDescription('Recover state after power outage')],
|
|
22
|
+
.withDescription('Recover state after power outage'), e.child_lock()],
|
|
23
23
|
endpoint: (device) => {
|
|
24
24
|
return {'l1': 1, 'l2': 2};
|
|
25
25
|
},
|
package/devices/philips.js
CHANGED
|
@@ -2579,6 +2579,15 @@ module.exports = [
|
|
|
2579
2579
|
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2580
2580
|
ota: ota.zigbeeOTA,
|
|
2581
2581
|
},
|
|
2582
|
+
{
|
|
2583
|
+
zigbeeModel: ['929003046201_01', '929003046201_02', '929003046201_03'],
|
|
2584
|
+
model: '929003046201',
|
|
2585
|
+
vendor: 'Philips',
|
|
2586
|
+
description: 'Hue White Ambiance Runner triple spotlight',
|
|
2587
|
+
meta: {turnsOffAtBrightness1: true},
|
|
2588
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2589
|
+
ota: ota.zigbeeOTA,
|
|
2590
|
+
},
|
|
2582
2591
|
{
|
|
2583
2592
|
zigbeeModel: ['5309331P6', '5309330P6', '929003046301_03', '929003046301_02'],
|
|
2584
2593
|
model: '5309331P6',
|
package/devices/saswell.js
CHANGED
|
@@ -16,6 +16,7 @@ module.exports = [
|
|
|
16
16
|
{modelID: 'TS0601', manufacturerName: '_TZE200_c88teujp'},
|
|
17
17
|
{modelID: 'TS0601', manufacturerName: '_TZE200_yw7cahqs'},
|
|
18
18
|
{modelID: 'TS0601', manufacturerName: '_TZE200_azqp6ssj'},
|
|
19
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_bvu2wnxz'},
|
|
19
20
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zuhszj9s'},
|
|
20
21
|
{modelID: 'TS0601', manufacturerName: '_TZE200_9gvruqf5'},
|
|
21
22
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zr9c0day'},
|
package/devices/tuya.js
CHANGED
|
@@ -2248,4 +2248,60 @@ module.exports = [
|
|
|
2248
2248
|
fromZigbee: [fz.tuya_remote],
|
|
2249
2249
|
toZigbee: [],
|
|
2250
2250
|
},
|
|
2251
|
+
{
|
|
2252
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_ikvncluo'}],
|
|
2253
|
+
model: 'TS0601_smart_human_presense_sensor',
|
|
2254
|
+
vendor: 'TuYa',
|
|
2255
|
+
description: 'Smart Human presence sensor',
|
|
2256
|
+
fromZigbee: [fz.tuya_smart_human_presense_sensor],
|
|
2257
|
+
toZigbee: [tz.tuya_smart_human_presense_sensor],
|
|
2258
|
+
exposes: [
|
|
2259
|
+
e.illuminance_lux(), e.presence(),
|
|
2260
|
+
exposes.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('m'),
|
|
2261
|
+
exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1)
|
|
2262
|
+
.withDescription('sensitivity of the radar'),
|
|
2263
|
+
exposes.numeric('minimum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
|
|
2264
|
+
.withDescription('Minimum range').withUnit('m'),
|
|
2265
|
+
exposes.numeric('maximum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
|
|
2266
|
+
.withDescription('Maximum range').withUnit('m'),
|
|
2267
|
+
exposes.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1)
|
|
2268
|
+
.withDescription('Detection delay').withUnit('s'),
|
|
2269
|
+
exposes.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(1500).withValueStep(1)
|
|
2270
|
+
.withDescription('Fading time').withUnit('s'),
|
|
2271
|
+
// exposes.text('cli', ea.STATE).withDescription('not recognize'),
|
|
2272
|
+
exposes.enum('self_test', ea.STATE, Object.values(tuya.tuyaHPSCheckingResult))
|
|
2273
|
+
.withDescription('Self_test, possible resuts: checking, check_success, check_failure, others, comm_fault, radar_fault.'),
|
|
2274
|
+
],
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_whkgqxse'}],
|
|
2278
|
+
model: 'JM-TRH-ZGB-V1',
|
|
2279
|
+
vendor: 'TuYa',
|
|
2280
|
+
description: 'Temperature & humidity sensor with clock',
|
|
2281
|
+
fromZigbee: [fz.nous_lcd_temperature_humidity_sensor, fz.ignore_tuya_set_time],
|
|
2282
|
+
toZigbee: [tz.nous_lcd_temperature_humidity_sensor],
|
|
2283
|
+
onEvent: tuya.onEventSetLocalTime,
|
|
2284
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2285
|
+
const endpoint = device.getEndpoint(1);
|
|
2286
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
2287
|
+
},
|
|
2288
|
+
exposes: [
|
|
2289
|
+
e.temperature(), e.humidity(), e.battery(),
|
|
2290
|
+
exposes.numeric('report_interval', ea.STATE_SET).withUnit('min').withValueMin(5).withValueMax(60).withValueStep(5)
|
|
2291
|
+
.withDescription('Report interval'),
|
|
2292
|
+
exposes.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
|
|
2293
|
+
exposes.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
|
|
2294
|
+
.withDescription('Temperature alarm status'),
|
|
2295
|
+
exposes.numeric('max_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
|
|
2296
|
+
.withDescription('Alarm temperature max'),
|
|
2297
|
+
exposes.numeric('min_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)
|
|
2298
|
+
.withDescription('Alarm temperature min'),
|
|
2299
|
+
exposes.enum('humidity_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm'])
|
|
2300
|
+
.withDescription('Humidity alarm status'),
|
|
2301
|
+
exposes.numeric('max_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
|
|
2302
|
+
.withDescription('Alarm humidity max'),
|
|
2303
|
+
exposes.numeric('min_humidity', ea.STATE_SET).withUnit('%').withValueMin(0).withValueMax(100)
|
|
2304
|
+
.withDescription('Alarm humidity min'),
|
|
2305
|
+
],
|
|
2306
|
+
},
|
|
2251
2307
|
];
|
package/devices/xiaomi.js
CHANGED
|
@@ -1960,6 +1960,7 @@ module.exports = [
|
|
|
1960
1960
|
model: 'WXKG16LM',
|
|
1961
1961
|
vendor: 'Xiaomi',
|
|
1962
1962
|
description: 'Aqara wireless remote switch E1 (single rocker)',
|
|
1963
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
1963
1964
|
fromZigbee: [fz.xiaomi_multistate_action, fz.aqara_opple],
|
|
1964
1965
|
toZigbee: [tz.xiaomi_switch_click_mode],
|
|
1965
1966
|
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold']),
|
package/lib/tuya.js
CHANGED
|
@@ -617,8 +617,12 @@ const dataPoints = {
|
|
|
617
617
|
nousTempUnitConvert: 9,
|
|
618
618
|
nousMaxTemp: 10,
|
|
619
619
|
nousMinTemp: 11,
|
|
620
|
+
nousMaxHumi: 12,
|
|
621
|
+
nousMinHumi: 13,
|
|
620
622
|
nousTempAlarm: 14,
|
|
623
|
+
nousHumiAlarm: 15,
|
|
621
624
|
nousTempSensitivity: 19,
|
|
625
|
+
nousReportInterval: 17,
|
|
622
626
|
// TUYA / HUMIDITY/ILLUMINANCE/TEMPERATURE SENSOR
|
|
623
627
|
thitBatteryPercentage: 3,
|
|
624
628
|
thitIlluminanceLux: 7,
|
|
@@ -671,6 +675,17 @@ const dataPoints = {
|
|
|
671
675
|
connecteTempProgram: 105,
|
|
672
676
|
connecteOpenWindow: 106,
|
|
673
677
|
connecteMaxProtectTemp: 107,
|
|
678
|
+
// TuYa Smart Human Presense Sensor
|
|
679
|
+
tshpsPresenceState: 1,
|
|
680
|
+
tshpscSensitivity: 2,
|
|
681
|
+
tshpsMinimumRange: 3,
|
|
682
|
+
tshpsMaximumRange: 4,
|
|
683
|
+
tshpsTargetDistance: 9,
|
|
684
|
+
tshpsDetectionDelay: 101,
|
|
685
|
+
tshpsFadingTime: 102,
|
|
686
|
+
tshpsIlluminanceLux: 104,
|
|
687
|
+
tshpsCLI: 103, // not recognize
|
|
688
|
+
tshpsSelfTest: 6, // not recognize
|
|
674
689
|
};
|
|
675
690
|
|
|
676
691
|
const thermostatWeekFormat = {
|
|
@@ -837,6 +852,14 @@ const moesSwitch = {
|
|
|
837
852
|
3: 'freeze',
|
|
838
853
|
},
|
|
839
854
|
};
|
|
855
|
+
const tuyaHPSCheckingResult = {
|
|
856
|
+
0: 'checking',
|
|
857
|
+
1: 'check_success',
|
|
858
|
+
2: 'check_failure',
|
|
859
|
+
3: 'others',
|
|
860
|
+
4: 'comm_fault',
|
|
861
|
+
5: 'radar_fault',
|
|
862
|
+
};
|
|
840
863
|
|
|
841
864
|
// Return `seq` - transaction ID for handling concrete response
|
|
842
865
|
async function sendDataPoints(entity, dpValues, cmd, seq=undefined) {
|
|
@@ -995,4 +1018,5 @@ module.exports = {
|
|
|
995
1018
|
tuyaRadar,
|
|
996
1019
|
ZMLookups,
|
|
997
1020
|
moesSwitch,
|
|
1021
|
+
tuyaHPSCheckingResult,
|
|
998
1022
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.504",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"axios": "^0.
|
|
37
|
+
"axios": "^0.27.2",
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
39
|
"https-proxy-agent": "^5.0.1",
|
|
40
40
|
"tar-stream": "^2.2.0",
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
41
|
+
"zigbee-herdsman": "^0.14.27"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|