zigbee-herdsman-converters 14.0.334 → 14.0.335
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 +23 -0
- package/devices/icasa.js +1 -0
- package/devices/ikea.js +4 -2
- package/devices/immax.js +19 -0
- package/devices/leedarson.js +1 -1
- package/devices/perenio.js +15 -0
- package/devices/tuya.js +11 -1
- package/lib/tuya.js +6 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -1757,6 +1757,29 @@ const converters = {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
},
|
|
1759
1759
|
},
|
|
1760
|
+
tuya_illuminance_temperature_humidity_sensor: {
|
|
1761
|
+
cluster: 'manuSpecificTuya',
|
|
1762
|
+
type: ['commandSetDataResponse', 'commandGetData'],
|
|
1763
|
+
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
1764
|
+
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
1765
|
+
convert: (model, msg, publish, options, meta) => {
|
|
1766
|
+
const dp = msg.data.dp;
|
|
1767
|
+
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
1768
|
+
switch (dp) {
|
|
1769
|
+
case tuya.dataPoints.thitTemperature:
|
|
1770
|
+
return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1771
|
+
case tuya.dataPoints.thitHumidity:
|
|
1772
|
+
return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
|
|
1773
|
+
case tuya.dataPoints.thitBatteryPercentage:
|
|
1774
|
+
return {battery: value};
|
|
1775
|
+
case tuya.dataPoints.thitIlluminanceLux:
|
|
1776
|
+
return {illuminance_lux: value};
|
|
1777
|
+
default:
|
|
1778
|
+
meta.logger.warn(`zigbee-herdsman-converters:tuya_illuminance_temperature_humidity_sensor: NOT RECOGNIZED ` +
|
|
1779
|
+
`DP #${dp} with data ${JSON.stringify(msg.data)}`);
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
},
|
|
1760
1783
|
ts0201_temperature_humidity_alarm: {
|
|
1761
1784
|
cluster: 'manuSpecificTuya_2',
|
|
1762
1785
|
type: ['attributeReport', 'readResponse'],
|
package/devices/icasa.js
CHANGED
|
@@ -81,6 +81,7 @@ module.exports = [
|
|
|
81
81
|
model: 'ICZB-RM11S',
|
|
82
82
|
vendor: 'iCasa',
|
|
83
83
|
description: 'Zigbee 3.0 remote control',
|
|
84
|
+
meta: {battery: {dontDividePercentage: true}},
|
|
84
85
|
fromZigbee: [fz.command_recall, fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
|
|
85
86
|
exposes: [e.battery(), e.action(['recall_*', 'on', 'off', 'brightness_stop', 'brightness_move_up', 'brightness_move_down'])],
|
|
86
87
|
toZigbee: [],
|
package/devices/ikea.js
CHANGED
|
@@ -146,10 +146,12 @@ const ikea = {
|
|
|
146
146
|
convertSet: async (entity, key, value, meta) => {
|
|
147
147
|
if (key == 'fan_state' && value.toLowerCase() == 'on') {
|
|
148
148
|
value = getMetaValue(entity, meta.mapped, 'fanStateOn', 'allEqual', 'on');
|
|
149
|
+
} else {
|
|
150
|
+
value = value.toString().toLowerCase();
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
let fanMode;
|
|
152
|
-
switch (value
|
|
154
|
+
switch (value) {
|
|
153
155
|
case 'off':
|
|
154
156
|
fanMode = 0;
|
|
155
157
|
break;
|
|
@@ -161,7 +163,7 @@ const ikea = {
|
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
await entity.write('manuSpecificIkeaAirPurifier', {'fanMode': fanMode}, manufacturerOptions.ikea);
|
|
164
|
-
return {state: {fan_mode: value
|
|
166
|
+
return {state: {fan_mode: value, fan_state: value === 'off' ? 'OFF' : 'ON'}};
|
|
165
167
|
},
|
|
166
168
|
convertGet: async (entity, key, meta) => {
|
|
167
169
|
await entity.read('manuSpecificIkeaAirPurifier', ['fanMode']);
|
package/devices/immax.js
CHANGED
|
@@ -140,4 +140,23 @@ module.exports = [
|
|
|
140
140
|
description: 'Neo RECUADRO SMART, color temp, dimmable, Zigbee 3.0',
|
|
141
141
|
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
142
142
|
},
|
|
143
|
+
{
|
|
144
|
+
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_jijr1sss'}],
|
|
145
|
+
model: '07502L',
|
|
146
|
+
vendor: 'Immax',
|
|
147
|
+
description: '4 in 1 multi sensor',
|
|
148
|
+
fromZigbee: [fz.battery, fz.ignore_basic_report, fz.illuminance, fz.ZB003X, fz.ZB003X_attr, fz.ZB003X_occupancy],
|
|
149
|
+
toZigbee: [tz.ZB003X],
|
|
150
|
+
exposes: [e.occupancy(), e.tamper(), e.battery(), e.illuminance(), e.illuminance_lux().withUnit('lx'), e.temperature(),
|
|
151
|
+
e.humidity(), exposes.numeric('reporting_time', ea.STATE_SET).withDescription('Reporting interval in minutes'),
|
|
152
|
+
exposes.numeric('temperature_calibration', ea.STATE_SET).withDescription('Temperature calibration'),
|
|
153
|
+
exposes.numeric('humidity_calibration', ea.STATE_SET).withDescription('Humidity calibration'),
|
|
154
|
+
exposes.numeric('illuminance_calibration', ea.STATE_SET).withDescription('Illuminance calibration'),
|
|
155
|
+
exposes.binary('pir_enable', ea.STATE_SET, true, false).withDescription('Enable PIR sensor'),
|
|
156
|
+
exposes.binary('led_enable', ea.STATE_SET, true, false).withDescription('Enabled LED'),
|
|
157
|
+
exposes.binary('reporting_enable', ea.STATE_SET, true, false).withDescription('Enabled reporting'),
|
|
158
|
+
exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high']).withDescription('PIR sensor sensitivity'),
|
|
159
|
+
// eslint-disable-next-line
|
|
160
|
+
exposes.enum('keep_time', ea.STATE_SET, ['0', '30', '60', '120', '240']).withDescription('PIR keep time in seconds')],
|
|
161
|
+
},
|
|
143
162
|
];
|
package/devices/leedarson.js
CHANGED
|
@@ -85,7 +85,7 @@ module.exports = [
|
|
|
85
85
|
extend: extend.light_onoff_brightness_colortemp(),
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
|
-
|
|
88
|
+
fingerprint: [{modelID: 'ZHA-PIRSensor', manufacturerName: 'Leedarson'}],
|
|
89
89
|
model: '5AA-SS-ZA-H0',
|
|
90
90
|
vendor: 'Leedarson',
|
|
91
91
|
description: 'Motion sensor',
|
package/devices/perenio.js
CHANGED
|
@@ -33,4 +33,19 @@ module.exports = [
|
|
|
33
33
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
fingerprint: [{modelID: 'ZHA-PirSensor', manufacturerName: 'LDS'}],
|
|
38
|
+
model: 'PECMS01',
|
|
39
|
+
vendor: 'Perenio',
|
|
40
|
+
description: 'Motion sensor',
|
|
41
|
+
fromZigbee: [fz.battery, fz.ias_occupancy_alarm_1],
|
|
42
|
+
toZigbee: [],
|
|
43
|
+
meta: {battery: {dontDividePercentage: true}},
|
|
44
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
45
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
46
|
+
const endpoint = device.getEndpoint(1);
|
|
47
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
48
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
36
51
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -36,6 +36,15 @@ module.exports = [
|
|
|
36
36
|
toZigbee: [],
|
|
37
37
|
exposes: [e.temperature(), e.humidity(), e.battery()],
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_vzqtvljm'}],
|
|
41
|
+
model: 'TS0601_illuminance_temperature_humidity_sensor',
|
|
42
|
+
vendor: 'TuYa',
|
|
43
|
+
description: 'Illuminance, temperature & humidity sensor',
|
|
44
|
+
fromZigbee: [fz.tuya_illuminance_temperature_humidity_sensor],
|
|
45
|
+
toZigbee: [],
|
|
46
|
+
exposes: [e.temperature(), e.humidity(), e.illuminance_lux(), e.battery()],
|
|
47
|
+
},
|
|
39
48
|
{
|
|
40
49
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_8ygsuhe1'},
|
|
41
50
|
{modelID: 'TS0601', manufacturerName: '_TZE200_yvx5lh6k'}, {modelID: 'TS0601', manufacturerName: '_TZE200_ryfmq5rl'}],
|
|
@@ -1517,7 +1526,8 @@ module.exports = [
|
|
|
1517
1526
|
exposes: [e.battery(), e.illuminance(), e.illuminance_lux()],
|
|
1518
1527
|
},
|
|
1519
1528
|
{
|
|
1520
|
-
fingerprint: [{modelID: 'TS0210', manufacturerName: '_TYZB01_3zv6oleo'}
|
|
1529
|
+
fingerprint: [{modelID: 'TS0210', manufacturerName: '_TYZB01_3zv6oleo'},
|
|
1530
|
+
{modelID: 'TS0210', manufacturerName: '_TYZB01_j9xxahcl'}],
|
|
1521
1531
|
model: 'TS0210',
|
|
1522
1532
|
vendor: 'TuYa',
|
|
1523
1533
|
description: 'Vibration sensor',
|
package/lib/tuya.js
CHANGED
|
@@ -471,6 +471,12 @@ const dataPoints = {
|
|
|
471
471
|
hochTotalReverseActivePower: 117,
|
|
472
472
|
hochHistoricalVoltage: 118,
|
|
473
473
|
hochHistoricalCurrent: 119,
|
|
474
|
+
|
|
475
|
+
// TUYA / HUMIDITY/ILLUMINANCE/TEMPERATURE SENSOR
|
|
476
|
+
thitBatteryPercentage: 3,
|
|
477
|
+
thitIlluminanceLux: 7,
|
|
478
|
+
thitHumidity: 9,
|
|
479
|
+
thitTemperature: 8,
|
|
474
480
|
};
|
|
475
481
|
|
|
476
482
|
const thermostatWeekFormat = {
|
package/npm-shrinkwrap.json
CHANGED