zigbee-herdsman-converters 14.0.641 → 14.0.642
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 +38 -14
- package/converters/toZigbee.js +55 -0
- package/devices/hzc_electric.js +10 -0
- package/devices/legrand.js +1 -0
- package/devices/moes.js +48 -2
- package/devices/philips.js +7 -0
- package/devices/tuya.js +6 -2
- package/devices/xiaomi.js +11 -0
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -3937,20 +3937,44 @@ const converters = {
|
|
|
3937
3937
|
switch (dp) {
|
|
3938
3938
|
case tuya.dataPoints.moesSchedule:
|
|
3939
3939
|
return {
|
|
3940
|
-
program:
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3940
|
+
program: {
|
|
3941
|
+
weekdays_p1_hour: value[0],
|
|
3942
|
+
weekdays_p1_minute: value[1],
|
|
3943
|
+
weekdays_p1_temperature: value[2] / 2,
|
|
3944
|
+
weekdays_p2_hour: value[3],
|
|
3945
|
+
weekdays_p2_minute: value[4],
|
|
3946
|
+
weekdays_p2_temperature: value[5] / 2,
|
|
3947
|
+
weekdays_p3_hour: value[6],
|
|
3948
|
+
weekdays_p3_minute: value[7],
|
|
3949
|
+
weekdays_p3_temperature: value[8] / 2,
|
|
3950
|
+
weekdays_p4_hour: value[9],
|
|
3951
|
+
weekdays_p4_minute: value[10],
|
|
3952
|
+
weekdays_p4_temperature: value[11] / 2,
|
|
3953
|
+
saturday_p1_hour: value[12],
|
|
3954
|
+
saturday_p1_minute: value[13],
|
|
3955
|
+
saturday_p1_temperature: value[14] / 2,
|
|
3956
|
+
saturday_p2_hour: value[15],
|
|
3957
|
+
saturday_p2_minute: value[16],
|
|
3958
|
+
saturday_p2_temperature: value[17] / 2,
|
|
3959
|
+
saturday_p3_hour: value[18],
|
|
3960
|
+
saturday_p3_minute: value[19],
|
|
3961
|
+
saturday_p3_temperature: value[20] / 2,
|
|
3962
|
+
saturday_p4_hour: value[21],
|
|
3963
|
+
saturday_p4_minute: value[22],
|
|
3964
|
+
saturday_p4_temperature: value[23] / 2,
|
|
3965
|
+
sunday_p1_hour: value[24],
|
|
3966
|
+
sunday_p1_minute: value[25],
|
|
3967
|
+
sunday_p1_temperature: value[26] / 2,
|
|
3968
|
+
sunday_p2_hour: value[27],
|
|
3969
|
+
sunday_p2_minute: value[28],
|
|
3970
|
+
sunday_p2_temperature: value[29] / 2,
|
|
3971
|
+
sunday_p3_hour: value[30],
|
|
3972
|
+
sunday_p3_minute: value[31],
|
|
3973
|
+
sunday_p3_temperature: value[32] / 2,
|
|
3974
|
+
sunday_p4_hour: value[33],
|
|
3975
|
+
sunday_p4_minute: value[34],
|
|
3976
|
+
sunday_p4_temperature: value[35] / 2,
|
|
3977
|
+
},
|
|
3954
3978
|
};
|
|
3955
3979
|
case tuya.dataPoints.state: // Thermostat on standby = OFF, running = ON
|
|
3956
3980
|
if (model.model === 'BAC-002-ALZB') {
|
package/converters/toZigbee.js
CHANGED
|
@@ -3369,6 +3369,61 @@ const converters = {
|
|
|
3369
3369
|
await tuya.sendDataPointBool(entity, tuya.dataPoints.state, value === 'heat');
|
|
3370
3370
|
},
|
|
3371
3371
|
},
|
|
3372
|
+
moes_thermostat_program_schedule: {
|
|
3373
|
+
key: ['program'],
|
|
3374
|
+
convertSet: async (entity, key, value, meta) => {
|
|
3375
|
+
if (!meta.state.program) {
|
|
3376
|
+
meta.logger.warn(`zigbee-herdsman-converters:Moes BHT-002: existing program state not set.`);
|
|
3377
|
+
return;
|
|
3378
|
+
}
|
|
3379
|
+
|
|
3380
|
+
/* Merge modified value into existing state and send all over in one go */
|
|
3381
|
+
const newProgram = {
|
|
3382
|
+
...meta.state.program,
|
|
3383
|
+
...value,
|
|
3384
|
+
};
|
|
3385
|
+
|
|
3386
|
+
const payload = [
|
|
3387
|
+
Math.floor(newProgram.weekdays_p1_hour),
|
|
3388
|
+
Math.floor(newProgram.weekdays_p1_minute),
|
|
3389
|
+
Math.round(newProgram.weekdays_p1_temperature * 2),
|
|
3390
|
+
Math.floor(newProgram.weekdays_p2_hour),
|
|
3391
|
+
Math.floor(newProgram.weekdays_p2_minute),
|
|
3392
|
+
Math.round(newProgram.weekdays_p2_temperature * 2),
|
|
3393
|
+
Math.floor(newProgram.weekdays_p3_hour),
|
|
3394
|
+
Math.floor(newProgram.weekdays_p3_minute),
|
|
3395
|
+
Math.round(newProgram.weekdays_p3_temperature * 2),
|
|
3396
|
+
Math.floor(newProgram.weekdays_p4_hour),
|
|
3397
|
+
Math.floor(newProgram.weekdays_p4_minute),
|
|
3398
|
+
Math.round(newProgram.weekdays_p4_temperature * 2),
|
|
3399
|
+
Math.floor(newProgram.saturday_p1_hour),
|
|
3400
|
+
Math.floor(newProgram.saturday_p1_minute),
|
|
3401
|
+
Math.round(newProgram.saturday_p1_temperature * 2),
|
|
3402
|
+
Math.floor(newProgram.saturday_p2_hour),
|
|
3403
|
+
Math.floor(newProgram.saturday_p2_minute),
|
|
3404
|
+
Math.round(newProgram.saturday_p2_temperature * 2),
|
|
3405
|
+
Math.floor(newProgram.saturday_p3_hour),
|
|
3406
|
+
Math.floor(newProgram.saturday_p3_minute),
|
|
3407
|
+
Math.round(newProgram.saturday_p3_temperature * 2),
|
|
3408
|
+
Math.floor(newProgram.saturday_p4_hour),
|
|
3409
|
+
Math.floor(newProgram.saturday_p4_minute),
|
|
3410
|
+
Math.round(newProgram.saturday_p4_temperature * 2),
|
|
3411
|
+
Math.floor(newProgram.sunday_p1_hour),
|
|
3412
|
+
Math.floor(newProgram.sunday_p1_minute),
|
|
3413
|
+
Math.round(newProgram.sunday_p1_temperature * 2),
|
|
3414
|
+
Math.floor(newProgram.sunday_p2_hour),
|
|
3415
|
+
Math.floor(newProgram.sunday_p2_minute),
|
|
3416
|
+
Math.round(newProgram.sunday_p2_temperature * 2),
|
|
3417
|
+
Math.floor(newProgram.sunday_p3_hour),
|
|
3418
|
+
Math.floor(newProgram.sunday_p3_minute),
|
|
3419
|
+
Math.round(newProgram.sunday_p3_temperature * 2),
|
|
3420
|
+
Math.floor(newProgram.sunday_p4_hour),
|
|
3421
|
+
Math.floor(newProgram.sunday_p4_minute),
|
|
3422
|
+
Math.round(newProgram.sunday_p4_temperature * 2),
|
|
3423
|
+
];
|
|
3424
|
+
return tuya.sendDataPointRaw(entity, tuya.dataPoints.moesSchedule, payload);
|
|
3425
|
+
},
|
|
3426
|
+
},
|
|
3372
3427
|
moesS_thermostat_system_mode: {
|
|
3373
3428
|
key: ['preset'],
|
|
3374
3429
|
convertSet: async (entity, key, value, meta) => {
|
package/devices/hzc_electric.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const reporting = require('../lib/reporting');
|
|
2
2
|
const extend = require('../lib/extend');
|
|
3
3
|
const exposes = require('../lib/exposes');
|
|
4
|
+
const fz = require('../converters/fromZigbee');
|
|
4
5
|
const e = exposes.presets;
|
|
5
6
|
|
|
6
7
|
module.exports = [
|
|
@@ -26,4 +27,13 @@ module.exports = [
|
|
|
26
27
|
return {l1: 1, l2: 2};
|
|
27
28
|
},
|
|
28
29
|
},
|
|
30
|
+
{
|
|
31
|
+
zigbeeModel: ['TempAndHumSensor-ZB3.0'],
|
|
32
|
+
model: 'S093TH-ZG',
|
|
33
|
+
vendor: 'HZC Electric',
|
|
34
|
+
description: 'Temperature and humidity sensor',
|
|
35
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.linkquality_from_basic],
|
|
36
|
+
toZigbee: [],
|
|
37
|
+
exposes: [e.temperature(), e.humidity()], // Unfortunately, battery percentage is not reported by this device
|
|
38
|
+
},
|
|
29
39
|
];
|
package/devices/legrand.js
CHANGED
|
@@ -107,6 +107,7 @@ module.exports = [
|
|
|
107
107
|
// support binary report on moving state (supposed)
|
|
108
108
|
fz.legrand_binary_input_moving, fz.cover_position_tilt],
|
|
109
109
|
toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.legrand_identify, tz.legrand_settingEnableLedInDark],
|
|
110
|
+
meta: {coverInverted: true},
|
|
110
111
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
111
112
|
const endpoint = device.getEndpoint(1);
|
|
112
113
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
package/devices/moes.js
CHANGED
|
@@ -80,6 +80,13 @@ const tzLocal = {
|
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
const exposesLocal = {
|
|
84
|
+
hour: (name) => exposes.numeric(name, ea.STATE_SET).withUnit('h').withValueMin(0).withValueMax(23),
|
|
85
|
+
minute: (name) => exposes.numeric(name, ea.STATE_SET).withUnit('m').withValueMin(0).withValueMax(59),
|
|
86
|
+
program_temperature: (name) => exposes.numeric(name, ea.STATE_SET).withUnit('°C')
|
|
87
|
+
.withValueMin(5).withValueMax(35).withValueStep(0.5),
|
|
88
|
+
};
|
|
89
|
+
|
|
83
90
|
module.exports = [
|
|
84
91
|
{
|
|
85
92
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cymsnfvf'},
|
|
@@ -181,13 +188,52 @@ module.exports = [
|
|
|
181
188
|
fromZigbee: [fz.moes_thermostat],
|
|
182
189
|
toZigbee: [tz.moes_thermostat_child_lock, tz.moes_thermostat_current_heating_setpoint, tz.moes_thermostat_mode,
|
|
183
190
|
tz.moes_thermostat_standby, tz.moes_thermostat_sensor, tz.moes_thermostat_calibration,
|
|
184
|
-
tz.moes_thermostat_deadzone_temperature, tz.moes_thermostat_max_temperature_limit, tz.moes_thermostat_min_temperature_limit
|
|
191
|
+
tz.moes_thermostat_deadzone_temperature, tz.moes_thermostat_max_temperature_limit, tz.moes_thermostat_min_temperature_limit,
|
|
192
|
+
tz.moes_thermostat_program_schedule],
|
|
185
193
|
exposes: [e.child_lock(), e.deadzone_temperature(), e.max_temperature_limit(), e.min_temperature_limit(),
|
|
186
194
|
exposes.climate().withSetpoint('current_heating_setpoint', 5, 30, 1, ea.STATE_SET)
|
|
187
195
|
.withLocalTemperature(ea.STATE).withLocalTemperatureCalibration(-30, 30, 0.1, ea.STATE_SET)
|
|
188
196
|
.withSystemMode(['off', 'heat'], ea.STATE_SET).withRunningState(['idle', 'heat', 'cool'], ea.STATE)
|
|
189
197
|
.withPreset(['hold', 'program']),
|
|
190
|
-
e.temperature_sensor_select(['IN', 'AL', 'OU'])
|
|
198
|
+
e.temperature_sensor_select(['IN', 'AL', 'OU']),
|
|
199
|
+
exposes.composite('program', 'program').withDescription('Time of day and setpoint to use when in program mode')
|
|
200
|
+
.withFeature(exposesLocal.hour('weekdays_p1_hour'))
|
|
201
|
+
.withFeature(exposesLocal.minute('weekdays_p1_minute'))
|
|
202
|
+
.withFeature(exposesLocal.program_temperature('weekdays_p1_temperature'))
|
|
203
|
+
.withFeature(exposesLocal.hour('weekdays_p2_hour'))
|
|
204
|
+
.withFeature(exposesLocal.minute('weekdays_p2_minute'))
|
|
205
|
+
.withFeature(exposesLocal.program_temperature('weekdays_p2_temperature'))
|
|
206
|
+
.withFeature(exposesLocal.hour('weekdays_p3_hour'))
|
|
207
|
+
.withFeature(exposesLocal.minute('weekdays_p3_minute'))
|
|
208
|
+
.withFeature(exposesLocal.program_temperature('weekdays_p3_temperature'))
|
|
209
|
+
.withFeature(exposesLocal.hour('weekdays_p4_hour'))
|
|
210
|
+
.withFeature(exposesLocal.minute('weekdays_p4_minute'))
|
|
211
|
+
.withFeature(exposesLocal.program_temperature('weekdays_p4_temperature'))
|
|
212
|
+
.withFeature(exposesLocal.hour('saturday_p1_hour'))
|
|
213
|
+
.withFeature(exposesLocal.minute('saturday_p1_minute'))
|
|
214
|
+
.withFeature(exposesLocal.program_temperature('saturday_p1_temperature'))
|
|
215
|
+
.withFeature(exposesLocal.hour('saturday_p2_hour'))
|
|
216
|
+
.withFeature(exposesLocal.minute('saturday_p2_minute'))
|
|
217
|
+
.withFeature(exposesLocal.program_temperature('saturday_p2_temperature'))
|
|
218
|
+
.withFeature(exposesLocal.hour('saturday_p3_hour'))
|
|
219
|
+
.withFeature(exposesLocal.minute('saturday_p3_minute'))
|
|
220
|
+
.withFeature(exposesLocal.program_temperature('saturday_p3_temperature'))
|
|
221
|
+
.withFeature(exposesLocal.hour('saturday_p4_hour'))
|
|
222
|
+
.withFeature(exposesLocal.minute('saturday_p4_minute'))
|
|
223
|
+
.withFeature(exposesLocal.program_temperature('saturday_p4_temperature'))
|
|
224
|
+
.withFeature(exposesLocal.hour('sunday_p1_hour'))
|
|
225
|
+
.withFeature(exposesLocal.minute('sunday_p1_minute'))
|
|
226
|
+
.withFeature(exposesLocal.program_temperature('sunday_p1_temperature'))
|
|
227
|
+
.withFeature(exposesLocal.hour('sunday_p2_hour'))
|
|
228
|
+
.withFeature(exposesLocal.minute('sunday_p2_minute'))
|
|
229
|
+
.withFeature(exposesLocal.program_temperature('sunday_p2_temperature'))
|
|
230
|
+
.withFeature(exposesLocal.hour('sunday_p3_hour'))
|
|
231
|
+
.withFeature(exposesLocal.minute('sunday_p3_minute'))
|
|
232
|
+
.withFeature(exposesLocal.program_temperature('sunday_p3_temperature'))
|
|
233
|
+
.withFeature(exposesLocal.hour('sunday_p4_hour'))
|
|
234
|
+
.withFeature(exposesLocal.minute('sunday_p4_minute'))
|
|
235
|
+
.withFeature(exposesLocal.program_temperature('sunday_p4_temperature')),
|
|
236
|
+
],
|
|
191
237
|
onEvent: tuya.onEventSetLocalTime,
|
|
192
238
|
},
|
|
193
239
|
{
|
package/devices/philips.js
CHANGED
|
@@ -2834,4 +2834,11 @@ module.exports = [
|
|
|
2834
2834
|
description: 'Hue white ambiance pendant white Enrave',
|
|
2835
2835
|
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2836
2836
|
},
|
|
2837
|
+
{
|
|
2838
|
+
zigbeeModel: ['929003054601'],
|
|
2839
|
+
model: '929003054601',
|
|
2840
|
+
vendor: 'Philips',
|
|
2841
|
+
description: 'Hue white ambiance Fair ceiling with Bluetooth white',
|
|
2842
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2843
|
+
},
|
|
2837
2844
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -21,7 +21,8 @@ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak',
|
|
|
21
21
|
'_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit', '_TZ3000_cjrngdr3',
|
|
22
22
|
'_TZ3000_zloso4jk', '_TZ3000_r6buo8ba', '_TZ3000_iksasdbv', '_TZ3000_idrffznf', '_TZ3000_okaz9tjs', '_TZ3210_q7oryllx',
|
|
23
23
|
'_TZ3000_ss98ec5d', '_TZ3000_gznh2xla', '_TZ3000_hdopuwv6', '_TZ3000_gvn91tmx', '_TZ3000_dksbtrzs', '_TZ3000_b28wrpvx',
|
|
24
|
-
'_TZ3000_aim0ztek', '_TZ3000_mlswgkc3', '_TZ3000_7dndcnnb', '_TZ3000_waho4jtj', '_TZ3000_nmsciidq', '_TZ3000_jtgxgmks'
|
|
24
|
+
'_TZ3000_aim0ztek', '_TZ3000_mlswgkc3', '_TZ3000_7dndcnnb', '_TZ3000_waho4jtj', '_TZ3000_nmsciidq', '_TZ3000_jtgxgmks',
|
|
25
|
+
'_TZ3000_rdfh8cfs'];
|
|
25
26
|
|
|
26
27
|
const tzLocal = {
|
|
27
28
|
SA12IZL_silence_siren: {
|
|
@@ -1990,12 +1991,14 @@ module.exports = [
|
|
|
1990
1991
|
{modelID: 'TS0601', manufacturerName: '_TZE200_mudxchsu'}, /* model: 'TV05-ZG curve', vendor: 'TuYa' */
|
|
1991
1992
|
{modelID: 'TS0601', manufacturerName: '_TZE200_7yoranx2'}, /* model: 'TV01-ZB', vendor: 'Moes' */
|
|
1992
1993
|
{modelID: 'TS0601', manufacturerName: '_TZE200_kds0pmmv'}, /* model: 'TV01-ZB', vendor: 'Moes' */
|
|
1994
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_bvu2wnxz'}, /* model: 'TRV06', vendor: 'AVATTO' */
|
|
1993
1995
|
],
|
|
1994
1996
|
model: 'TV02-Zigbee',
|
|
1995
1997
|
vendor: 'TuYa',
|
|
1996
1998
|
description: 'Thermostat radiator valve',
|
|
1997
1999
|
whiteLabel: [
|
|
1998
2000
|
{vendor: 'Moes', model: 'TV01-ZB'},
|
|
2001
|
+
{vendor: 'AVATTO', model: 'TRV06'},
|
|
1999
2002
|
{vendor: 'Tesla Smart', model: 'TSL-TRV-TV01ZG'},
|
|
2000
2003
|
{vendor: 'Unknown/id3.pl', model: 'GTZ08'},
|
|
2001
2004
|
],
|
|
@@ -2676,7 +2679,8 @@ module.exports = [
|
|
|
2676
2679
|
},
|
|
2677
2680
|
},
|
|
2678
2681
|
{
|
|
2679
|
-
fingerprint: [{modelID: 'TS0006', manufacturerName: '_TYZB01_ltundz9m'}
|
|
2682
|
+
fingerprint: [{modelID: 'TS0006', manufacturerName: '_TYZB01_ltundz9m'},
|
|
2683
|
+
{modelID: 'TS0006', manufacturerName: '_TZ3000_jyupj3fw'}],
|
|
2680
2684
|
model: 'TS0006',
|
|
2681
2685
|
vendor: 'TuYa',
|
|
2682
2686
|
description: '6 gang switch module with neutral wire',
|
package/devices/xiaomi.js
CHANGED
|
@@ -2403,4 +2403,15 @@ module.exports = [
|
|
|
2403
2403
|
await endpoint.read('aqaraOpple', [0x040a], {manufacturerCode: 0x115f});
|
|
2404
2404
|
},
|
|
2405
2405
|
},
|
|
2406
|
+
{
|
|
2407
|
+
zigbeeModel: ['lumi.remote.acn007'],
|
|
2408
|
+
model: 'WXKG20LM',
|
|
2409
|
+
vendor: 'Xiaomi',
|
|
2410
|
+
description: 'Aqara E1 wireless mini switch',
|
|
2411
|
+
fromZigbee: [fz.battery, fz.aqara_opple_multistate, fz.aqara_opple],
|
|
2412
|
+
toZigbee: [],
|
|
2413
|
+
meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
|
|
2414
|
+
exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold', 'release']),
|
|
2415
|
+
e.device_temperature(), e.power_outage_count()],
|
|
2416
|
+
},
|
|
2406
2417
|
];
|