zigbee-herdsman-converters 15.0.17 → 15.0.18
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 +0 -51
- package/converters/toZigbee.js +0 -24
- package/devices/bosch.js +2 -0
- package/devices/bticino.js +16 -7
- package/devices/legrand.js +9 -3
- package/devices/moes.js +1 -0
- package/devices/osram.js +2 -2
- package/devices/philips.js +4 -4
- package/devices/samotech.js +1 -1
- package/devices/sunricher.js +1 -1
- package/devices/tuya.js +47 -19
- package/devices/ubisys.js +15 -7
- package/lib/ota/common.js +2 -5
- package/lib/tuya.js +6 -2
- package/package.json +2 -2
package/converters/fromZigbee.js
CHANGED
|
@@ -7651,57 +7651,6 @@ const converters = {
|
|
|
7651
7651
|
return result;
|
|
7652
7652
|
},
|
|
7653
7653
|
},
|
|
7654
|
-
tuya_radar_sensor_fall: {
|
|
7655
|
-
cluster: 'manuSpecificTuya',
|
|
7656
|
-
type: ['commandDataResponse', 'commandDataReport'],
|
|
7657
|
-
convert: (model, msg, publish, options, meta) => {
|
|
7658
|
-
const dpValue = tuya.firstDpValue(msg, meta, 'tuya_radar_sensor_fall');
|
|
7659
|
-
const dp = dpValue.dp;
|
|
7660
|
-
const value = tuya.getDataValue(dpValue);
|
|
7661
|
-
let result = null;
|
|
7662
|
-
switch (dp) {
|
|
7663
|
-
case tuya.dataPoints.trsfPresenceState:
|
|
7664
|
-
result = {presence: {0: false, 1: true}[value]};
|
|
7665
|
-
break;
|
|
7666
|
-
case tuya.dataPoints.trsfMotionState:
|
|
7667
|
-
result = {occupancy: {1: false, 2: true}[value]};
|
|
7668
|
-
break;
|
|
7669
|
-
case tuya.dataPoints.trsfMotionSpeed:
|
|
7670
|
-
result = {motion_speed: value};
|
|
7671
|
-
break;
|
|
7672
|
-
case tuya.dataPoints.trsfMotionDirection:
|
|
7673
|
-
result = {motion_direction: tuya.tuyaRadar.motionDirection[value]};
|
|
7674
|
-
break;
|
|
7675
|
-
case tuya.dataPoints.trsfScene:
|
|
7676
|
-
result = {radar_scene: tuya.tuyaRadar.radarScene[value]};
|
|
7677
|
-
break;
|
|
7678
|
-
case tuya.dataPoints.trsfSensitivity:
|
|
7679
|
-
result = {radar_sensitivity: value};
|
|
7680
|
-
break;
|
|
7681
|
-
case tuya.dataPoints.trsfIlluminanceLux:
|
|
7682
|
-
result = {illuminance_lux: value};
|
|
7683
|
-
break;
|
|
7684
|
-
case tuya.dataPoints.trsfTumbleAlarmTime:
|
|
7685
|
-
result = {tumble_alarm_time: value+1};
|
|
7686
|
-
break;
|
|
7687
|
-
case tuya.dataPoints.trsfTumbleSwitch:
|
|
7688
|
-
result = {tumble_switch: {false: 'OFF', true: 'ON'}[value]};
|
|
7689
|
-
break;
|
|
7690
|
-
case tuya.dataPoints.trsfFallDownStatus:
|
|
7691
|
-
result = {fall_down_status: tuya.tuyaRadar.fallDown[value]};
|
|
7692
|
-
break;
|
|
7693
|
-
case tuya.dataPoints.trsfStaticDwellAlarm:
|
|
7694
|
-
result = {static_dwell_alarm: value};
|
|
7695
|
-
break;
|
|
7696
|
-
case tuya.dataPoints.trsfFallSensitivity:
|
|
7697
|
-
result = {fall_sensitivity: value};
|
|
7698
|
-
break;
|
|
7699
|
-
default:
|
|
7700
|
-
meta.logger.warn(`fromZigbee.tuya_radar_sensor_fall: NOT RECOGNIZED DP ${dp} with data ${JSON.stringify(dpValue)}`);
|
|
7701
|
-
}
|
|
7702
|
-
return result;
|
|
7703
|
-
},
|
|
7704
|
-
},
|
|
7705
7654
|
tuya_smart_vibration_sensor: {
|
|
7706
7655
|
cluster: 'manuSpecificTuya',
|
|
7707
7656
|
type: ['commandGetData', 'commandDataResponse', 'raw'],
|
package/converters/toZigbee.js
CHANGED
|
@@ -6607,30 +6607,6 @@ const converters = {
|
|
|
6607
6607
|
}
|
|
6608
6608
|
},
|
|
6609
6609
|
},
|
|
6610
|
-
tuya_radar_sensor_fall: {
|
|
6611
|
-
key: ['radar_scene', 'radar_sensitivity', 'tumble_alarm_time', 'tumble_switch', 'fall_sensitivity'],
|
|
6612
|
-
convertSet: async (entity, key, value, meta) => {
|
|
6613
|
-
switch (key) {
|
|
6614
|
-
case 'radar_scene':
|
|
6615
|
-
await tuya.sendDataPointEnum(entity, tuya.dataPoints.trsfScene, utils.getKey(tuya.tuyaRadar.radarScene, value));
|
|
6616
|
-
break;
|
|
6617
|
-
case 'radar_sensitivity':
|
|
6618
|
-
await tuya.sendDataPointValue(entity, tuya.dataPoints.trsfSensitivity, value);
|
|
6619
|
-
break;
|
|
6620
|
-
case 'tumble_switch':
|
|
6621
|
-
await tuya.sendDataPointEnum(entity, tuya.dataPoints.trsfTumbleSwitch, {'on': true, 'off': false}[value.toLowerCase()]);
|
|
6622
|
-
break;
|
|
6623
|
-
case 'tumble_alarm_time':
|
|
6624
|
-
await tuya.sendDataPointEnum(entity, tuya.dataPoints.trsfTumbleAlarmTime, value-1);
|
|
6625
|
-
break;
|
|
6626
|
-
case 'fall_sensitivity':
|
|
6627
|
-
await tuya.sendDataPointValue(entity, tuya.dataPoints.trsfFallSensitivity, value);
|
|
6628
|
-
break;
|
|
6629
|
-
default: // Unknown Key
|
|
6630
|
-
meta.logger.warn(`toZigbee.tuya_radar_sensor_fall: Unhandled Key ${key}`);
|
|
6631
|
-
}
|
|
6632
|
-
},
|
|
6633
|
-
},
|
|
6634
6610
|
javis_microwave_sensor: {
|
|
6635
6611
|
key: [
|
|
6636
6612
|
'illuminance_calibration', 'led_enable',
|
package/devices/bosch.js
CHANGED
|
@@ -5,6 +5,7 @@ const tz = require('../converters/toZigbee');
|
|
|
5
5
|
const reporting = require('../lib/reporting');
|
|
6
6
|
const utils = require('../lib/utils');
|
|
7
7
|
const constants = require('../lib/constants');
|
|
8
|
+
const ota = require('../lib/ota');
|
|
8
9
|
const e = exposes.presets;
|
|
9
10
|
const ea = exposes.access;
|
|
10
11
|
|
|
@@ -396,6 +397,7 @@ const definition = [
|
|
|
396
397
|
model: 'BTH-RA',
|
|
397
398
|
vendor: 'Bosch',
|
|
398
399
|
description: 'Radiator thermostat II',
|
|
400
|
+
ota: ota.zigbeeOTA,
|
|
399
401
|
fromZigbee: [fz.thermostat, fz.battery, fzLocal.bosch_thermostat, fzLocal.bosch_userInterface],
|
|
400
402
|
toZigbee: [
|
|
401
403
|
tz.thermostat_occupied_heating_setpoint,
|
package/devices/bticino.js
CHANGED
|
@@ -16,9 +16,10 @@ module.exports = [
|
|
|
16
16
|
toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn, tz.legrand_identify],
|
|
17
17
|
exposes: [
|
|
18
18
|
e.switch(), e.action(['identify', 'on', 'off']),
|
|
19
|
-
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing
|
|
20
|
-
see the switch in the dark`),
|
|
19
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing ` +
|
|
20
|
+
`to see the switch in the dark`),
|
|
21
21
|
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
|
|
22
|
+
exposes.enum('identify', ea.SET, ['blink']).withDescription(`Blinks the built-in LED to make it easier to find the device`),
|
|
22
23
|
],
|
|
23
24
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
24
25
|
const endpoint = device.getEndpoint(1);
|
|
@@ -34,15 +35,18 @@ module.exports = [
|
|
|
34
35
|
fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01],
|
|
35
36
|
toZigbee: [tz.light_onoff_brightness, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn,
|
|
36
37
|
tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config],
|
|
37
|
-
exposes: [
|
|
38
|
+
exposes: [
|
|
39
|
+
e.light_brightness(),
|
|
38
40
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
39
41
|
.withDescription('Specifies the minimum brightness value'),
|
|
40
42
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
41
43
|
.withDescription('Specifies the maximum brightness value'),
|
|
42
44
|
exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'),
|
|
43
|
-
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing
|
|
44
|
-
see the switch in the dark`),
|
|
45
|
-
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on')
|
|
45
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing ` +
|
|
46
|
+
`to see the switch in the dark`),
|
|
47
|
+
exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
|
|
48
|
+
exposes.enum('identify', ea.SET, ['blink']).withDescription(`Blinks the built-in LED to make it easier to find the device`),
|
|
49
|
+
],
|
|
46
50
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
47
51
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
48
52
|
const endpoint = device.getEndpoint(1);
|
|
@@ -65,7 +69,12 @@ module.exports = [
|
|
|
65
69
|
fz.cover_position_tilt],
|
|
66
70
|
toZigbee: [tz.bticino_4027C_cover_state, tz.bticino_4027C_cover_position, tz.legrand_identify,
|
|
67
71
|
tz.legrand_settingEnableLedInDark],
|
|
68
|
-
exposes: [
|
|
72
|
+
exposes: [
|
|
73
|
+
e.cover_position(), e.action(['moving', 'identify', '']),
|
|
74
|
+
exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing ` +
|
|
75
|
+
`to see the switch in the dark`),
|
|
76
|
+
exposes.enum('identify', ea.SET, ['blink']).withDescription(`Blinks the built-in LED to make it easier to find the device`),
|
|
77
|
+
],
|
|
69
78
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
70
79
|
const endpoint = device.getEndpoint(1);
|
|
71
80
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
package/devices/legrand.js
CHANGED
|
@@ -311,9 +311,15 @@ module.exports = [
|
|
|
311
311
|
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'genIdentify']);
|
|
312
312
|
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
313
313
|
await reporting.activePower(endpoint);
|
|
314
|
-
await
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
await endpoint.read('haElectricalMeasurement', ['activePower']);
|
|
315
|
+
try {
|
|
316
|
+
await reporting.apparentPower(endpoint);
|
|
317
|
+
await endpoint.read('haElectricalMeasurement', ['apparentPower']);
|
|
318
|
+
} catch (e) {
|
|
319
|
+
// Some version/firmware don't seem to support this.
|
|
320
|
+
}
|
|
321
|
+
// Read configuration values that are not sent periodically.
|
|
322
|
+
await endpoint.read('haElectricalMeasurement', [0xf000, 0xf001, 0xf002]);
|
|
317
323
|
},
|
|
318
324
|
onEvent: async (type, data, device, options, state) => {
|
|
319
325
|
/**
|
package/devices/moes.js
CHANGED
|
@@ -97,6 +97,7 @@ module.exports = [
|
|
|
97
97
|
{
|
|
98
98
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aoclfnxz'},
|
|
99
99
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ztvwu4nk'},
|
|
100
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_5toc8efa'},
|
|
100
101
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ye5jkfsb'},
|
|
101
102
|
{modelID: 'TS0601', manufacturerName: '_TZE200_u9bfwha0'}],
|
|
102
103
|
model: 'BHT-002-GCLZB',
|
package/devices/osram.js
CHANGED
|
@@ -205,7 +205,7 @@ module.exports = [
|
|
|
205
205
|
model: 'AB3257001NJ',
|
|
206
206
|
description: 'Smart+ plug',
|
|
207
207
|
vendor: 'OSRAM',
|
|
208
|
-
extend: extend.switch(),
|
|
208
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
209
209
|
whiteLabel: [{vendor: 'LEDVANCE', model: 'AB3257001NJ'}, {vendor: 'LEDVANCE', model: 'AC03360'}],
|
|
210
210
|
ota: ota.ledvance,
|
|
211
211
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -226,7 +226,7 @@ module.exports = [
|
|
|
226
226
|
model: 'AC10691',
|
|
227
227
|
description: 'Smart+ plug',
|
|
228
228
|
vendor: 'OSRAM',
|
|
229
|
-
extend: extend.switch(),
|
|
229
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
230
230
|
ota: ota.ledvance,
|
|
231
231
|
whiteLabel: [{vendor: 'LEDVANCE', model: 'AC10691'}],
|
|
232
232
|
configure: async (device, coordinatorEndpoint, logger) => {
|
package/devices/philips.js
CHANGED
|
@@ -1561,7 +1561,7 @@ module.exports = [
|
|
|
1561
1561
|
model: '4090230P9',
|
|
1562
1562
|
vendor: 'Philips',
|
|
1563
1563
|
description: 'Hue Liane (black)',
|
|
1564
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1564
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], disableHueEffects: false}),
|
|
1565
1565
|
},
|
|
1566
1566
|
{
|
|
1567
1567
|
zigbeeModel: ['929003053201'],
|
|
@@ -1589,14 +1589,14 @@ module.exports = [
|
|
|
1589
1589
|
model: '3261030P6',
|
|
1590
1590
|
vendor: 'Philips',
|
|
1591
1591
|
description: 'Hue Being black',
|
|
1592
|
-
extend: hueExtend.light_onoff_brightness_colortemp(),
|
|
1592
|
+
extend: hueExtend.light_onoff_brightness_colortemp({disableHueEffects: false}),
|
|
1593
1593
|
},
|
|
1594
1594
|
{
|
|
1595
1595
|
zigbeeModel: ['3261031P6', '929003055001', '929003055101'],
|
|
1596
1596
|
model: '3261031P6',
|
|
1597
1597
|
vendor: 'Philips',
|
|
1598
1598
|
description: 'Hue Being white',
|
|
1599
|
-
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
1599
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454], disableHueEffects: false}),
|
|
1600
1600
|
},
|
|
1601
1601
|
{
|
|
1602
1602
|
zigbeeModel: ['3261048P6'],
|
|
@@ -2560,7 +2560,7 @@ module.exports = [
|
|
|
2560
2560
|
model: '1741530P7',
|
|
2561
2561
|
vendor: 'Philips',
|
|
2562
2562
|
description: 'Hue Lily outdoor spot light',
|
|
2563
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2563
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], disableHueEffects: false}),
|
|
2564
2564
|
},
|
|
2565
2565
|
{
|
|
2566
2566
|
zigbeeModel: ['1741730V7'],
|
package/devices/samotech.js
CHANGED
|
@@ -51,7 +51,7 @@ module.exports = [
|
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
fingerprint: [{modelID: 'Dimmer-Switch-ZB3.0', manufacturerName: 'Samotech'}],
|
|
54
|
+
fingerprint: [{modelID: 'Dimmer-Switch-ZB3.0', manufacturerName: 'Samotech'}, {modelID: 'HK_DIM_A', manufacturerName: 'Samotech'}],
|
|
55
55
|
model: 'SM323',
|
|
56
56
|
vendor: 'Samotech',
|
|
57
57
|
description: 'ZigBee retrofit dimmer 250W',
|
package/devices/sunricher.js
CHANGED
|
@@ -606,7 +606,7 @@ module.exports = [
|
|
|
606
606
|
},
|
|
607
607
|
},
|
|
608
608
|
{
|
|
609
|
-
fingerprint: [{modelID: 'TERNCY-DC01',
|
|
609
|
+
fingerprint: [{modelID: 'TERNCY-DC01', manufacturerName: 'Sunricher'}],
|
|
610
610
|
model: 'SR-ZG9010A',
|
|
611
611
|
vendor: 'Sunricher',
|
|
612
612
|
description: 'Door windows sensor',
|
package/devices/tuya.js
CHANGED
|
@@ -1513,6 +1513,7 @@ module.exports = [
|
|
|
1513
1513
|
fingerprint: [
|
|
1514
1514
|
{modelID: 'TS0601', manufacturerName: '_TZE200_nkjintbl'},
|
|
1515
1515
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ji1gn7rw'},
|
|
1516
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_3t91nb6k'},
|
|
1516
1517
|
],
|
|
1517
1518
|
model: 'TS0601_switch_2_gang',
|
|
1518
1519
|
vendor: 'TuYa',
|
|
@@ -2126,6 +2127,7 @@ module.exports = [
|
|
|
2126
2127
|
{modelID: 'TS0601', manufacturerName: '_TZE200_9sfg7gm0'}, // HomeCloud
|
|
2127
2128
|
{modelID: 'TS0601', manufacturerName: '_TZE200_2atgpdho'}, // HY367
|
|
2128
2129
|
{modelID: 'TS0601', manufacturerName: '_TZE200_cpmgn2cf'},
|
|
2130
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_8thwkzxl'}, // Tervix eva2
|
|
2129
2131
|
{modelID: 'TS0601', manufacturerName: '_TZE200_4eeyebrt'}, // Immax 07732B
|
|
2130
2132
|
{modelID: 'TS0601', manufacturerName: '_TZE200_8whxpsiw'}, // EVOLVEO
|
|
2131
2133
|
{modelID: 'TS0601', manufacturerName: '_TZE200_xby0s3ta'}, // Sandy Beach HY367
|
|
@@ -2539,14 +2541,14 @@ module.exports = [
|
|
|
2539
2541
|
},
|
|
2540
2542
|
},
|
|
2541
2543
|
{
|
|
2542
|
-
fingerprint: [160, 69, 68, 65, 64, 66].map((applicationVersion) => {
|
|
2544
|
+
fingerprint: [160, 100, 69, 68, 65, 64, 66].map((applicationVersion) => {
|
|
2543
2545
|
return {modelID: 'TS011F', applicationVersion, priority: -1};
|
|
2544
2546
|
}),
|
|
2545
2547
|
model: 'TS011F_plug_3',
|
|
2546
2548
|
description: 'Smart plug (with power monitoring by polling)',
|
|
2547
2549
|
vendor: 'TuYa',
|
|
2548
2550
|
whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
|
|
2549
|
-
{vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}],
|
|
2551
|
+
{vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}, {vendor: 'Neo', model: 'PLUG-001SPB2'}],
|
|
2550
2552
|
ota: ota.zigbeeOTA,
|
|
2551
2553
|
extend: tuya.extend.switch({electricalMeasurements: true, powerOutageMemory: true, indicatorMode: true, childLock: true}),
|
|
2552
2554
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -2560,7 +2562,7 @@ module.exports = [
|
|
|
2560
2562
|
onEvent: (type, data, device, options) =>
|
|
2561
2563
|
tuya.onEventMeasurementPoll(type, data, device, options,
|
|
2562
2564
|
device.applicationVersion !== 66, // polling for voltage, current and power
|
|
2563
|
-
|
|
2565
|
+
[66, 100, 160].includes(device.applicationVersion), // polling for energy
|
|
2564
2566
|
),
|
|
2565
2567
|
},
|
|
2566
2568
|
{
|
|
@@ -3366,34 +3368,60 @@ module.exports = [
|
|
|
3366
3368
|
],
|
|
3367
3369
|
},
|
|
3368
3370
|
{
|
|
3369
|
-
fingerprint:
|
|
3370
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_vrfecyku'}],
|
|
3371
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lu01t0zl', '_TZE200_vrfecyku']),
|
|
3371
3372
|
model: 'MIR-HE200-TY',
|
|
3372
3373
|
vendor: 'TuYa',
|
|
3373
3374
|
description: 'Human presence sensor with fall function',
|
|
3374
|
-
fromZigbee: [fz.
|
|
3375
|
-
toZigbee: [tz.
|
|
3375
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
3376
|
+
toZigbee: [tuya.tz.datapoints],
|
|
3377
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3378
|
+
const endpoint = device.getEndpoint(1);
|
|
3379
|
+
await tuya.sendDataPointEnum(endpoint, tuya.dataPoints.trsfTumbleSwitch, false);
|
|
3380
|
+
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
3381
|
+
},
|
|
3376
3382
|
exposes: [
|
|
3377
3383
|
e.illuminance_lux(), e.presence(), e.occupancy(),
|
|
3378
3384
|
exposes.numeric('motion_speed', ea.STATE).withDescription('Speed of movement'),
|
|
3379
|
-
exposes.enum('motion_direction', ea.STATE,
|
|
3385
|
+
exposes.enum('motion_direction', ea.STATE, ['standing_still', 'moving_forward', 'moving_backward'])
|
|
3380
3386
|
.withDescription('direction of movement from the point of view of the radar'),
|
|
3381
3387
|
exposes.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1)
|
|
3382
|
-
.withDescription('
|
|
3383
|
-
exposes.enum('radar_scene', ea.STATE_SET,
|
|
3384
|
-
.withDescription('
|
|
3388
|
+
.withDescription('Sensitivity of the radar'),
|
|
3389
|
+
exposes.enum('radar_scene', ea.STATE_SET, ['default', 'area', 'toilet', 'bedroom', 'parlour', 'office', 'hotel'])
|
|
3390
|
+
.withDescription('Presets for sensitivity for presence and movement'),
|
|
3385
3391
|
exposes.enum('tumble_switch', ea.STATE_SET, ['ON', 'OFF']).withDescription('Tumble status switch'),
|
|
3386
3392
|
exposes.numeric('fall_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1)
|
|
3387
|
-
.withDescription('
|
|
3393
|
+
.withDescription('Fall sensitivity of the radar'),
|
|
3388
3394
|
exposes.numeric('tumble_alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
|
|
3389
|
-
.withUnit('min').withDescription('
|
|
3390
|
-
exposes.enum('fall_down_status', ea.STATE,
|
|
3391
|
-
.withDescription('
|
|
3392
|
-
exposes.text('static_dwell_alarm', ea.STATE).withDescription('
|
|
3395
|
+
.withUnit('min').withDescription('Tumble alarm time'),
|
|
3396
|
+
exposes.enum('fall_down_status', ea.STATE, ['none', 'maybe_fall', 'fall'])
|
|
3397
|
+
.withDescription('Fall down status'),
|
|
3398
|
+
exposes.text('static_dwell_alarm', ea.STATE).withDescription('Static dwell alarm'),
|
|
3393
3399
|
],
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3400
|
+
meta: {
|
|
3401
|
+
tuyaDatapoints: [
|
|
3402
|
+
[1, 'presence', tuya.valueConverter.trueFalse],
|
|
3403
|
+
[2, 'radar_sensitivity', tuya.valueConverter.raw],
|
|
3404
|
+
[102, 'occupancy', tuya.valueConverterBasic.lookup({false: 1, true: 2})],
|
|
3405
|
+
[103, 'illuminance_lux', tuya.valueConverter.raw],
|
|
3406
|
+
[105, 'tumble_switch', tuya.valueConverter.plus1],
|
|
3407
|
+
[106, 'tumble_alarm_time', tuya.valueConverter.raw],
|
|
3408
|
+
[112, 'radar_scene', tuya.valueConverterBasic.lookup(
|
|
3409
|
+
{'default': 0, 'area': 1, 'toilet': 2, 'bedroom': 3, 'parlour': 4, 'office': 5, 'hotel': 6})],
|
|
3410
|
+
[114, 'motion_direction', tuya.valueConverterBasic.lookup(
|
|
3411
|
+
{'standing_still': 0, 'moving_forward': 1, 'moving_backward': 2})],
|
|
3412
|
+
[115, 'motion_speed', tuya.valueConverter.raw],
|
|
3413
|
+
[116, 'fall_down_status', tuya.valueConverterBasic.lookup({'none': 0, 'maybe_fall': 1, 'fall': 2})],
|
|
3414
|
+
[117, 'static_dwell_alarm', tuya.valueConverter.raw],
|
|
3415
|
+
[118, 'fall_sensitivity', tuya.valueConverter.raw],
|
|
3416
|
+
// Below are ignored
|
|
3417
|
+
[101, null, null], // reset_flag_code
|
|
3418
|
+
[104, null, null], // detection_flag_code
|
|
3419
|
+
[107, null, null], // radar_check_end_code
|
|
3420
|
+
[108, null, null], // radar_check_start_code
|
|
3421
|
+
[109, null, null], // hw_version_code
|
|
3422
|
+
[110, null, null], // sw_version_code
|
|
3423
|
+
[111, null, null], // radar_id_code
|
|
3424
|
+
],
|
|
3397
3425
|
},
|
|
3398
3426
|
},
|
|
3399
3427
|
{
|
package/devices/ubisys.js
CHANGED
|
@@ -837,13 +837,17 @@ module.exports = [
|
|
|
837
837
|
fromZigbee: [fz.legacy.ubisys_c4_scenes, fz.legacy.ubisys_c4_onoff, fz.legacy.ubisys_c4_level, fz.legacy.ubisys_c4_cover,
|
|
838
838
|
ubisys.fz.configure_device_setup],
|
|
839
839
|
toZigbee: [ubisys.tz.configure_device_setup],
|
|
840
|
-
exposes: [
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
840
|
+
exposes: [
|
|
841
|
+
e.action([
|
|
842
|
+
'toggle_s1', 'toggle_s2', 'toggle_s3', 'toggle_s4', 'on_s1', 'on_s2', 'on_s3', 'on_s4',
|
|
843
|
+
'off_s1', 'off_s2', 'off_s3', 'off_s4', 'recall_*_s1', 'recal_*_s2', 'recall_*_s3', 'recal_*_s4',
|
|
844
|
+
'brightness_move_up_s1', 'brightness_move_up_s2', 'brightness_move_up_s3', 'brightness_move_up_s4',
|
|
845
|
+
'brightness_move_down_s1', 'brightness_move_down_s2', 'brightness_move_down_s3', 'brightness_move_down_s4',
|
|
846
|
+
'brightness_stop_s1', 'brightness_stop_s2', 'brightness_stop_s3', 'brightness_stop_s4',
|
|
847
|
+
'cover_open_s5', 'cover_close_s5', 'cover_stop_s5',
|
|
848
|
+
'cover_open_s6', 'cover_close_s6', 'cover_stop_s6',
|
|
849
|
+
]),
|
|
850
|
+
],
|
|
847
851
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
848
852
|
for (const ep of [1, 2, 3, 4]) {
|
|
849
853
|
await reporting.bind(device.getEndpoint(ep), coordinatorEndpoint, ['genScenes', 'genOnOff', 'genLevelCtrl']);
|
|
@@ -852,6 +856,10 @@ module.exports = [
|
|
|
852
856
|
await reporting.bind(device.getEndpoint(ep), coordinatorEndpoint, ['genScenes', 'closuresWindowCovering']);
|
|
853
857
|
}
|
|
854
858
|
},
|
|
859
|
+
meta: {multiEndpoint: true},
|
|
860
|
+
endpoint: (device) => {
|
|
861
|
+
return {'s1': 1, 's2': 2, 's3': 3, 's4': 4, 's5': 5, 's6': 6};
|
|
862
|
+
},
|
|
855
863
|
ota: ota.ubisys,
|
|
856
864
|
},
|
|
857
865
|
{
|
package/lib/ota/common.js
CHANGED
|
@@ -261,12 +261,9 @@ async function isNewImageAvailable(current, logger, device, getImageMeta) {
|
|
|
261
261
|
const [currentS, metaS] = [JSON.stringify(current), JSON.stringify(meta)];
|
|
262
262
|
logger.debug(`Is new image available for '${device.ieeeAddr}', current '${currentS}', latest meta '${metaS}'`);
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
return -1; // Negative number means the new firmware is 'newer' than current one
|
|
266
|
-
}
|
|
267
|
-
|
|
264
|
+
// Negative number means the new firmware is 'newer' than current one
|
|
268
265
|
return {
|
|
269
|
-
available: Math.sign(current.fileVersion - meta.fileVersion),
|
|
266
|
+
available: meta.force ? -1 : Math.sign(current.fileVersion - meta.fileVersion),
|
|
270
267
|
currentFileVersion: current.fileVersion,
|
|
271
268
|
otaFileVersion: meta.fileVersion,
|
|
272
269
|
};
|
package/lib/tuya.js
CHANGED
|
@@ -1246,7 +1246,7 @@ const valueConverterBasic = {
|
|
|
1246
1246
|
};
|
|
1247
1247
|
|
|
1248
1248
|
const valueConverter = {
|
|
1249
|
-
trueFalse: valueConverterBasic.lookup({
|
|
1249
|
+
trueFalse: valueConverterBasic.lookup({true: 1, false: 0}),
|
|
1250
1250
|
onOff: valueConverterBasic.lookup({'ON': true, 'OFF': false}),
|
|
1251
1251
|
powerOnBehavior: valueConverterBasic.lookup({'off': 0, 'on': 1, 'previous': 2}),
|
|
1252
1252
|
lightType: valueConverterBasic.lookup({'led': 0, 'incandescent': 1, 'halogen': 2}),
|
|
@@ -1259,6 +1259,10 @@ const valueConverter = {
|
|
|
1259
1259
|
divideBy10: valueConverterBasic.divideBy(10),
|
|
1260
1260
|
divideBy1000: valueConverterBasic.divideBy(1000),
|
|
1261
1261
|
raw: valueConverterBasic.raw(),
|
|
1262
|
+
plus1: {
|
|
1263
|
+
from: (v) => v + 1,
|
|
1264
|
+
to: (v) => v - 1,
|
|
1265
|
+
},
|
|
1262
1266
|
static: (value) => {
|
|
1263
1267
|
return {
|
|
1264
1268
|
from: (v) => {
|
|
@@ -1577,7 +1581,7 @@ const tuyaTz = {
|
|
|
1577
1581
|
'holiday_start_stop', 'holiday_temperature', 'comfort_temperature', 'eco_temperature', 'working_day',
|
|
1578
1582
|
'week_schedule_programming', 'online', 'holiday_mode_date', 'schedule', 'schedule_monday', 'schedule_tuesday',
|
|
1579
1583
|
'schedule_wednesday', 'schedule_thursday', 'schedule_friday', 'schedule_saturday', 'schedule_sunday', 'clear_fault',
|
|
1580
|
-
'scale_protection', 'error',
|
|
1584
|
+
'scale_protection', 'error', 'radar_scene', 'radar_sensitivity', 'tumble_alarm_time', 'tumble_switch', 'fall_sensitivity',
|
|
1581
1585
|
],
|
|
1582
1586
|
convertSet: async (entity, key, value, meta) => {
|
|
1583
1587
|
// A set converter is only called once; therefore we need to loop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.18",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
39
|
"https-proxy-agent": "^5.0.1",
|
|
40
40
|
"tar-stream": "^3.0.0",
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
41
|
+
"zigbee-herdsman": "^0.14.84"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|