zigbee-herdsman-converters 14.0.319 → 14.0.320
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 +16 -18
- package/converters/toZigbee.js +29 -0
- package/devices/elko.js +12 -1
- package/devices/keen_home.js +1 -1
- package/devices/moes.js +5 -6
- package/devices/tuya.js +2 -1
- package/devices/xiaomi.js +1 -1
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -1574,6 +1574,10 @@ const converters = {
|
|
|
1574
1574
|
const result = {};
|
|
1575
1575
|
const data = msg.data;
|
|
1576
1576
|
|
|
1577
|
+
if (data.hasOwnProperty(0x0401)) { // Load
|
|
1578
|
+
result.load = data[0x0401];
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1577
1581
|
if (data.hasOwnProperty(0x0402)) { // Display text
|
|
1578
1582
|
result.display_text = data[0x0402];
|
|
1579
1583
|
}
|
|
@@ -3551,24 +3555,6 @@ const converters = {
|
|
|
3551
3555
|
return {child_lock: value ? 'LOCK' : 'UNLOCK'};
|
|
3552
3556
|
case tuya.dataPoints.moesSbattery:
|
|
3553
3557
|
return {battery: value};
|
|
3554
|
-
case tuya.dataPoints.moesSschedule:
|
|
3555
|
-
return {
|
|
3556
|
-
program_weekday:
|
|
3557
|
-
{weekday: ' ' + value[0] + 'h:' + value[1] + 'm ' + value[2]/2 + '°C' +
|
|
3558
|
-
', ' + value[3] + 'h:' + value[4] + 'm ' + value[5]/2 + '°C' +
|
|
3559
|
-
', ' + value[6] + 'h:' + value[7] + 'm ' + value[8]/2 + '°C' +
|
|
3560
|
-
', ' + value[9] + 'h:' + value[10] + 'm ' + value[11]/2 + '°C '},
|
|
3561
|
-
program_saturday:
|
|
3562
|
-
{saturday: '' + value[12] + 'h:' + value[13] + 'm ' + value[14]/2 + '°C' +
|
|
3563
|
-
', ' + value[15] + 'h:' + value[16] + 'm ' + value[17]/2 + '°C' +
|
|
3564
|
-
', ' + value[18] + 'h:' + value[19] + 'm ' + value[20]/2 + '°C' +
|
|
3565
|
-
', ' + value[21] + 'h:' + value[22] + 'm ' + value[23]/2 + '°C '},
|
|
3566
|
-
program_sunday:
|
|
3567
|
-
{sunday: ' ' + value[24] + 'h:' + value[25] + 'm ' + value[26]/2 + '°C' +
|
|
3568
|
-
', ' + value[27] + 'h:' + value[28] + 'm ' + value[29]/2 + '°C' +
|
|
3569
|
-
', ' + value[30] + 'h:' + value[31] + 'm ' + value[32]/2 + '°C' +
|
|
3570
|
-
', ' + value[33] + 'h:' + value[34] + 'm ' + value[35]/2 + '°C '},
|
|
3571
|
-
};
|
|
3572
3558
|
case tuya.dataPoints.moesSboostHeatingCountdownTimeSet:
|
|
3573
3559
|
return {boost_heating_countdown_time_set: (value)};
|
|
3574
3560
|
case tuya.dataPoints.moesSvalvePosition:
|
|
@@ -3583,6 +3569,18 @@ const converters = {
|
|
|
3583
3569
|
return {max_temperature: value};
|
|
3584
3570
|
case tuya.dataPoints.moesSminTempSet:
|
|
3585
3571
|
return {min_temperature: value};
|
|
3572
|
+
case tuya.dataPoints.moesSschedule: {
|
|
3573
|
+
const items = [];
|
|
3574
|
+
const pMode = [];
|
|
3575
|
+
for (let i = 0; i < 12; i++) {
|
|
3576
|
+
const item = {h: value[i*3], m: value[i*3+1], temp: value[i*3+2] / 2};
|
|
3577
|
+
items[i] = item;
|
|
3578
|
+
pMode[i] = item['h'].toString().padStart(2, '0') + ':' +
|
|
3579
|
+
item['m'].toString().padStart(2, '0') + '/' +
|
|
3580
|
+
item['temp'] + '°C';
|
|
3581
|
+
}
|
|
3582
|
+
return {programming_mode: pMode.join(' ')};
|
|
3583
|
+
}
|
|
3586
3584
|
default:
|
|
3587
3585
|
meta.logger.warn(`zigbee-herdsman-converters:moesS_thermostat: NOT RECOGNIZED DP #${
|
|
3588
3586
|
dp} with data ${JSON.stringify(msg.data)}`);
|
package/converters/toZigbee.js
CHANGED
|
@@ -1379,6 +1379,16 @@ const converters = {
|
|
|
1379
1379
|
// #endregion
|
|
1380
1380
|
|
|
1381
1381
|
// #region Non-generic converters
|
|
1382
|
+
elko_load: {
|
|
1383
|
+
key: ['load'],
|
|
1384
|
+
convertSet: async (entity, key, value, meta) => {
|
|
1385
|
+
await entity.write('hvacThermostat', {'elkoLoad': value});
|
|
1386
|
+
return {state: {load: value}};
|
|
1387
|
+
},
|
|
1388
|
+
convertGet: async (entity, key, meta) => {
|
|
1389
|
+
await entity.read('hvacThermostat', ['elkoLoad']);
|
|
1390
|
+
},
|
|
1391
|
+
},
|
|
1382
1392
|
elko_display_text: {
|
|
1383
1393
|
key: ['display_text'],
|
|
1384
1394
|
convertSet: async (entity, key, value, meta) => {
|
|
@@ -2830,6 +2840,25 @@ const converters = {
|
|
|
2830
2840
|
await tuya.sendDataPointValue(entity, tuya.dataPoints.moesSminTempSet, temp);
|
|
2831
2841
|
},
|
|
2832
2842
|
},
|
|
2843
|
+
moesS_thermostat_schedule_programming: {
|
|
2844
|
+
key: ['programming_mode'],
|
|
2845
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2846
|
+
const payload = [];
|
|
2847
|
+
const items = value.split(' ');
|
|
2848
|
+
for (let i = 0; i < 12; i++) {
|
|
2849
|
+
const hourTemperature = items[i].split('/');
|
|
2850
|
+
const hourMinute = hourTemperature[0].split(':', 2);
|
|
2851
|
+
const h = parseInt(hourMinute[0]);
|
|
2852
|
+
const m = parseInt(hourMinute[1]);
|
|
2853
|
+
const temp = parseInt(hourTemperature[1]);
|
|
2854
|
+
if (h < 0 || h >= 24 || m < 0 || m >= 60 || temp < 5 || temp >= 35) {
|
|
2855
|
+
throw new Error('Invalid hour, minute or temperature of:' + items[i]);
|
|
2856
|
+
}
|
|
2857
|
+
payload[i*3] = h; payload[i*3+1] = m; payload[i*3+2] = temp * 2;
|
|
2858
|
+
}
|
|
2859
|
+
return tuya.sendDataPointRaw(entity, tuya.dataPoints.moesSschedule, payload);
|
|
2860
|
+
},
|
|
2861
|
+
},
|
|
2833
2862
|
tvtwo_thermostat: {
|
|
2834
2863
|
key: [
|
|
2835
2864
|
'window_detection', 'frost_protection', 'child_lock',
|
package/devices/elko.js
CHANGED
|
@@ -27,11 +27,15 @@ module.exports = [
|
|
|
27
27
|
vendor: 'ELKO',
|
|
28
28
|
description: 'ESH Plus Super TR RF PH',
|
|
29
29
|
fromZigbee: [fz.elko_thermostat, fz.thermostat],
|
|
30
|
-
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_heating_setpoint,
|
|
30
|
+
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_heating_setpoint, tz.elko_load,
|
|
31
31
|
tz.elko_display_text, tz.elko_power_status, tz.elko_external_temp, tz.elko_mean_power, tz.elko_child_lock, tz.elko_frost_guard,
|
|
32
32
|
tz.elko_relay_state, tz.elko_sensor_mode, tz.elko_local_temperature_calibration, tz.elko_max_floor_temp,
|
|
33
33
|
tz.elko_regulator_mode, tz.elko_regulator_time, tz.elko_night_switching],
|
|
34
34
|
exposes: [exposes.text('display_text', ea.ALL).withDescription('Displayed text on thermostat display (zone). Max 14 characters'),
|
|
35
|
+
exposes.numeric('load', ea.ALL).withUnit('W')
|
|
36
|
+
.withDescription('Load in W when heating is on (between 0-2000 W). The thermostat uses the value as input to the ' +
|
|
37
|
+
'mean_power calculation.')
|
|
38
|
+
.withValueMin(0).withValueMax(2000),
|
|
35
39
|
exposes.binary('regulator_mode', ea.ALL, 'regulator', 'thermostat')
|
|
36
40
|
.withDescription('Device in regulator or thermostat mode.'),
|
|
37
41
|
exposes.numeric('regulator_time', ea.ALL).withUnit('min')
|
|
@@ -69,6 +73,13 @@ module.exports = [
|
|
|
69
73
|
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
70
74
|
|
|
71
75
|
// ELKO attributes
|
|
76
|
+
// Load value
|
|
77
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
78
|
+
attribute: 'elkoLoad',
|
|
79
|
+
minimumReportInterval: 0,
|
|
80
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
81
|
+
reportableChange: null,
|
|
82
|
+
}]);
|
|
72
83
|
// Power status
|
|
73
84
|
await endpoint.configureReporting('hvacThermostat', [{
|
|
74
85
|
attribute: 'elkoPowerStatus',
|
package/devices/keen_home.js
CHANGED
|
@@ -41,7 +41,7 @@ module.exports = [
|
|
|
41
41
|
exposes: [e.cover_position().setAccess('state', ea.ALL), e.temperature(), e.battery(), e.pressure()],
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
zigbeeModel: ['SV02-410-MP-1.3', 'SV02-610-MP-1.3', 'SV02-612-MP-1.3', 'SV02-410-MP-1.0'],
|
|
44
|
+
zigbeeModel: ['SV02-410-MP-1.3', 'SV02-412-MP-1.3', 'SV02-610-MP-1.3', 'SV02-612-MP-1.3', 'SV02-410-MP-1.0'],
|
|
45
45
|
model: 'SV02',
|
|
46
46
|
vendor: 'Keen Home',
|
|
47
47
|
description: 'Smart vent',
|
package/devices/moes.js
CHANGED
|
@@ -202,7 +202,8 @@ module.exports = [
|
|
|
202
202
|
tz.moesS_thermostat_boost_heating_countdown, tz.moesS_thermostat_system_mode,
|
|
203
203
|
tz.moesS_thermostat_boost_heating, tz.moesS_thermostat_boostHeatingCountdownTimeSet,
|
|
204
204
|
tz.moesS_thermostat_eco_temperature, tz.moesS_thermostat_max_temperature,
|
|
205
|
-
tz.moesS_thermostat_min_temperature, tz.moesS_thermostat_moesSecoMode
|
|
205
|
+
tz.moesS_thermostat_min_temperature, tz.moesS_thermostat_moesSecoMode,
|
|
206
|
+
tz.moesS_thermostat_schedule_programming],
|
|
206
207
|
exposes: [
|
|
207
208
|
e.battery(), e.child_lock(), e.eco_mode(), e.eco_temperature(), e.max_temperature(), e.min_temperature(),
|
|
208
209
|
e.position(), e.window_detection(),
|
|
@@ -218,11 +219,9 @@ module.exports = [
|
|
|
218
219
|
'to 15 degrees Celsius. After 10 days, the device will automatically switch to programming mode. ' +
|
|
219
220
|
'TEMPORARY MANUAL MODE - In this mode, ☝ icon will flash. At this time, the device executes the manually set ' +
|
|
220
221
|
'temperature and returns to the weekly programming mode in the next time period. '),
|
|
221
|
-
exposes.
|
|
222
|
-
'the device executes a preset week programming temperature time and temperature. '
|
|
223
|
-
|
|
224
|
-
.withFeature(exposes.text('program_saturday', ea.STATE))
|
|
225
|
-
.withFeature(exposes.text('program_sunday', ea.STATE)),
|
|
222
|
+
exposes.text('programming_mode', ea.STATE_SET).withDescription('PROGRAMMING MODE ⏱ - In this mode, ' +
|
|
223
|
+
'the device executes a preset week programming temperature time and temperature. ' +
|
|
224
|
+
'You can set up to 4 stages of temperature every for WEEKDAY ➀➁➂➃➄, SATURDAY ➅ and SUNDAY ➆.'),
|
|
226
225
|
exposes.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF').withDescription('Boost Heating: press and hold "+" for 3 seconds, ' +
|
|
227
226
|
'the device will enter the boost heating mode, and the ▷╵◁ will flash. The countdown will be displayed in the APP'),
|
|
228
227
|
exposes.numeric('boost_heating_countdown', ea.STATE_SET).withUnit('min').withDescription('Countdown in minutes'),
|
package/devices/tuya.js
CHANGED
|
@@ -976,7 +976,8 @@ module.exports = [
|
|
|
976
976
|
{modelID: 'TS011F', manufacturerName: '_TZ3000_ps3dmato'},
|
|
977
977
|
{modelID: 'TS011F', manufacturerName: '_TZ3000_mraovvmm'},
|
|
978
978
|
{modelID: 'TS011F', manufacturerName: '_TZ3000_jvzvulen'},
|
|
979
|
-
{modelID: 'TS011F', manufacturerName: '_TZ3000_w0qqde0g'}
|
|
979
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_w0qqde0g'},
|
|
980
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_nfnmi125'}],
|
|
980
981
|
model: 'TS011F_plug_1',
|
|
981
982
|
description: 'Smart plug (with power monitoring)',
|
|
982
983
|
vendor: 'TuYa',
|
package/devices/xiaomi.js
CHANGED
|
@@ -1357,7 +1357,7 @@ module.exports = [
|
|
|
1357
1357
|
await reporting.batteryVoltage(endpoint);
|
|
1358
1358
|
await reporting.illuminance(endpoint, {min: 15, max: constants.repInterval.HOUR, change: 500});
|
|
1359
1359
|
},
|
|
1360
|
-
exposes: [e.battery(), e.illuminance(), e.illuminance_lux()],
|
|
1360
|
+
exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux()],
|
|
1361
1361
|
},
|
|
1362
1362
|
{
|
|
1363
1363
|
zigbeeModel: ['lumi.light.rgbac1'],
|
package/npm-shrinkwrap.json
CHANGED