zigbee-herdsman-converters 14.0.641 → 14.0.643
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 +39 -16
- package/converters/toZigbee.js +56 -1
- package/devices/hzc_electric.js +10 -0
- package/devices/legrand.js +1 -0
- package/devices/lixee.js +3 -3
- package/devices/moes.js +48 -15
- package/devices/philips.js +14 -0
- package/devices/sunricher.js +52 -9
- package/devices/tuya.js +16 -5
- package/devices/xiaomi.js +11 -0
- package/lib/exposes.js +1 -0
- package/package.json +1 -1
- package/devices/lerlink.js +0 -19
package/converters/fromZigbee.js
CHANGED
|
@@ -1760,8 +1760,7 @@ const converters = {
|
|
|
1760
1760
|
result.hysterersis = precisionRound(data[0x100A], 2) / 10;
|
|
1761
1761
|
}
|
|
1762
1762
|
if (data.hasOwnProperty(0x100B)) { // DisplayAutoOffEnable
|
|
1763
|
-
|
|
1764
|
-
result.display_auto_off_enabled = lookup[data[0x100B]];
|
|
1763
|
+
result.display_auto_off_enabled = data[0x100B] ? 'enabled' : 'disabled';
|
|
1765
1764
|
}
|
|
1766
1765
|
if (data.hasOwnProperty(0x2001)) { // AlarmAirTempOverValue
|
|
1767
1766
|
result.alarm_airtemp_overvalue = data[0x2001];
|
|
@@ -3937,20 +3936,44 @@ const converters = {
|
|
|
3937
3936
|
switch (dp) {
|
|
3938
3937
|
case tuya.dataPoints.moesSchedule:
|
|
3939
3938
|
return {
|
|
3940
|
-
program:
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3939
|
+
program: {
|
|
3940
|
+
weekdays_p1_hour: value[0],
|
|
3941
|
+
weekdays_p1_minute: value[1],
|
|
3942
|
+
weekdays_p1_temperature: value[2] / 2,
|
|
3943
|
+
weekdays_p2_hour: value[3],
|
|
3944
|
+
weekdays_p2_minute: value[4],
|
|
3945
|
+
weekdays_p2_temperature: value[5] / 2,
|
|
3946
|
+
weekdays_p3_hour: value[6],
|
|
3947
|
+
weekdays_p3_minute: value[7],
|
|
3948
|
+
weekdays_p3_temperature: value[8] / 2,
|
|
3949
|
+
weekdays_p4_hour: value[9],
|
|
3950
|
+
weekdays_p4_minute: value[10],
|
|
3951
|
+
weekdays_p4_temperature: value[11] / 2,
|
|
3952
|
+
saturday_p1_hour: value[12],
|
|
3953
|
+
saturday_p1_minute: value[13],
|
|
3954
|
+
saturday_p1_temperature: value[14] / 2,
|
|
3955
|
+
saturday_p2_hour: value[15],
|
|
3956
|
+
saturday_p2_minute: value[16],
|
|
3957
|
+
saturday_p2_temperature: value[17] / 2,
|
|
3958
|
+
saturday_p3_hour: value[18],
|
|
3959
|
+
saturday_p3_minute: value[19],
|
|
3960
|
+
saturday_p3_temperature: value[20] / 2,
|
|
3961
|
+
saturday_p4_hour: value[21],
|
|
3962
|
+
saturday_p4_minute: value[22],
|
|
3963
|
+
saturday_p4_temperature: value[23] / 2,
|
|
3964
|
+
sunday_p1_hour: value[24],
|
|
3965
|
+
sunday_p1_minute: value[25],
|
|
3966
|
+
sunday_p1_temperature: value[26] / 2,
|
|
3967
|
+
sunday_p2_hour: value[27],
|
|
3968
|
+
sunday_p2_minute: value[28],
|
|
3969
|
+
sunday_p2_temperature: value[29] / 2,
|
|
3970
|
+
sunday_p3_hour: value[30],
|
|
3971
|
+
sunday_p3_minute: value[31],
|
|
3972
|
+
sunday_p3_temperature: value[32] / 2,
|
|
3973
|
+
sunday_p4_hour: value[33],
|
|
3974
|
+
sunday_p4_minute: value[34],
|
|
3975
|
+
sunday_p4_temperature: value[35] / 2,
|
|
3976
|
+
},
|
|
3954
3977
|
};
|
|
3955
3978
|
case tuya.dataPoints.state: // Thermostat on standby = OFF, running = ON
|
|
3956
3979
|
if (model.model === 'BAC-002-ALZB') {
|
package/converters/toZigbee.js
CHANGED
|
@@ -3182,7 +3182,7 @@ const converters = {
|
|
|
3182
3182
|
const payload = {0x100A: {value: value * 10, type: 0x20}};
|
|
3183
3183
|
await entity.write('hvacThermostat', payload, manufacturerOptions.sunricher);
|
|
3184
3184
|
} else if (key==='display_auto_off_enabled') {
|
|
3185
|
-
const lookup = {'
|
|
3185
|
+
const lookup = {'disabled': 0, 'enabled': 1};
|
|
3186
3186
|
const payload = {0x100B: {value: lookup[value], type: herdsman.Zcl.DataType.enum8}};
|
|
3187
3187
|
await entity.write('hvacThermostat', payload, manufacturerOptions.sunricher);
|
|
3188
3188
|
} else if (key==='alarm_airtemp_overvalue') {
|
|
@@ -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/lixee.js
CHANGED
|
@@ -48,7 +48,7 @@ const fzLocal = {
|
|
|
48
48
|
|
|
49
49
|
for (const at of elements) {
|
|
50
50
|
const at_snake = at.split(/(?=[A-Z])/).join('_').toLowerCase();
|
|
51
|
-
if (msg.data[at]) {
|
|
51
|
+
if (msg.data[at] != null) {
|
|
52
52
|
result[at_snake] = msg.data[at];
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -104,7 +104,7 @@ const fzLocal = {
|
|
|
104
104
|
for (const at of elements) {
|
|
105
105
|
const at_snake = at.split(/(?=[A-Z])/).join('_').toLowerCase();
|
|
106
106
|
let val = msg.data[at];
|
|
107
|
-
if (val) {
|
|
107
|
+
if (val != null) {
|
|
108
108
|
if (val.hasOwnProperty('type') && val.type === 'Buffer') {
|
|
109
109
|
val = Buffer.from(val.data);
|
|
110
110
|
}
|
|
@@ -155,7 +155,7 @@ const fzLocal = {
|
|
|
155
155
|
for (const at of elements) {
|
|
156
156
|
const at_snake = at.split(/(?=[A-Z])/).join('_').toLowerCase();
|
|
157
157
|
const val = msg.data[at];
|
|
158
|
-
if (val) {
|
|
158
|
+
if (val != null) {
|
|
159
159
|
result[at_snake] = val; // By default we assign raw value
|
|
160
160
|
switch (at) {
|
|
161
161
|
// If we receive a Buffer, transform to human readable text
|
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
|
{
|
|
@@ -345,19 +391,6 @@ module.exports = [
|
|
|
345
391
|
exposes.numeric('boost_heating_countdown_time_set', ea.STATE_SET).withUnit('second')
|
|
346
392
|
.withDescription('Boost Time Setting 100 sec - 900 sec, (default = 300 sec)').withValueMin(100).withValueMax(900)],
|
|
347
393
|
},
|
|
348
|
-
{
|
|
349
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_la2c2uo9'}],
|
|
350
|
-
model: 'MS-105Z',
|
|
351
|
-
vendor: 'Moes',
|
|
352
|
-
description: '1 gang 2 way Zigbee dimmer switch',
|
|
353
|
-
fromZigbee: [fz.moes_105_dimmer, fz.ignore_basic_report],
|
|
354
|
-
toZigbee: [tz.moes_105_dimmer],
|
|
355
|
-
meta: {turnsOffAtBrightness1: true},
|
|
356
|
-
configure: async (device, coordinatorEndpoint, logger) => {
|
|
357
|
-
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
358
|
-
},
|
|
359
|
-
exposes: [e.light_brightness().setAccess('state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET)],
|
|
360
|
-
},
|
|
361
394
|
{
|
|
362
395
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_fjjbhx9d'}],
|
|
363
396
|
model: 'ZS-EUD',
|
package/devices/philips.js
CHANGED
|
@@ -2834,4 +2834,18 @@ 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
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
zigbeeModel: ['929003048301'],
|
|
2846
|
+
model: '8719514339163',
|
|
2847
|
+
vendor: 'Philips',
|
|
2848
|
+
description: 'Hue white ambiance Buckram quadruple spotlight with Bluetooth',
|
|
2849
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2850
|
+
},
|
|
2837
2851
|
];
|
package/devices/sunricher.js
CHANGED
|
@@ -2,6 +2,7 @@ const exposes = require('../lib/exposes');
|
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
|
+
const globalStore = require('../lib/store');
|
|
5
6
|
const constants = require('../lib/constants');
|
|
6
7
|
const extend = require('../lib/extend');
|
|
7
8
|
const utils = require('../lib/utils');
|
|
@@ -40,6 +41,14 @@ const fzLocal = {
|
|
|
40
41
|
},
|
|
41
42
|
};
|
|
42
43
|
|
|
44
|
+
function syncTime(endpoint) {
|
|
45
|
+
try {
|
|
46
|
+
const time = Math.round(((new Date()).getTime() - constants.OneJanuary2000) / 1000 + ((new Date()).getTimezoneOffset() * -1) * 60);
|
|
47
|
+
const values = {time: time};
|
|
48
|
+
endpoint.write('genTime', values);
|
|
49
|
+
} catch (error) {/* Do nothing*/}
|
|
50
|
+
}
|
|
51
|
+
|
|
43
52
|
module.exports = [
|
|
44
53
|
{
|
|
45
54
|
zigbeeModel: ['SR-ZG9023A-EU'],
|
|
@@ -351,13 +360,12 @@ module.exports = [
|
|
|
351
360
|
model: 'SR-ZG9092A',
|
|
352
361
|
vendor: 'Sunricher',
|
|
353
362
|
description: 'Touch thermostat',
|
|
354
|
-
fromZigbee: [fz.thermostat, fz.namron_thermostat, fz.metering, fz.electrical_measurement],
|
|
363
|
+
fromZigbee: [fz.thermostat, fz.namron_thermostat, fz.metering, fz.electrical_measurement, fz.namron_hvac_user_interface],
|
|
355
364
|
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint, tz.thermostat_occupancy,
|
|
356
365
|
tz.thermostat_local_temperature_calibration, tz.thermostat_local_temperature, tz.thermostat_outdoor_temperature,
|
|
357
366
|
tz.thermostat_system_mode, tz.thermostat_control_sequence_of_operation, tz.thermostat_running_state,
|
|
358
|
-
tz.namron_thermostat],
|
|
367
|
+
tz.namron_thermostat, tz.namron_thermostat_child_lock],
|
|
359
368
|
exposes: [
|
|
360
|
-
e.local_temperature(),
|
|
361
369
|
exposes.numeric('outdoor_temperature', ea.STATE_GET).withUnit('°C')
|
|
362
370
|
.withDescription('Current temperature measured from the floor sensor'),
|
|
363
371
|
exposes.climate()
|
|
@@ -369,7 +377,11 @@ module.exports = [
|
|
|
369
377
|
.withRunningState(['idle', 'heat']),
|
|
370
378
|
exposes.binary('away_mode', ea.ALL, 'ON', 'OFF')
|
|
371
379
|
.withDescription('Enable/disable away mode'),
|
|
380
|
+
exposes.binary('child_lock', ea.ALL, 'UNLOCK', 'LOCK')
|
|
381
|
+
.withDescription('Enables/disables physical input on the device'),
|
|
372
382
|
e.power(), e.current(), e.voltage(), e.energy(),
|
|
383
|
+
exposes.enum('lcd_brightness', ea.ALL, ['low', 'mid', 'high'])
|
|
384
|
+
.withDescription('OLED brightness when operating the buttons. Default: Medium.'),
|
|
373
385
|
exposes.enum('button_vibration_level', ea.ALL, ['off', 'low', 'high'])
|
|
374
386
|
.withDescription('Key beep volume and vibration level. Default: Low.'),
|
|
375
387
|
exposes.enum('floor_sensor_type', ea.ALL, ['10k', '15k', '50k', '100k', '12k'])
|
|
@@ -398,11 +410,24 @@ module.exports = [
|
|
|
398
410
|
.withUnit('°C')
|
|
399
411
|
.withValueMin(0.5).withValueMax(2).withValueStep(0.1)
|
|
400
412
|
.withDescription('Hysteresis setting, between 0.5 and 2 in 0.1 °C. Default: 0.5.'),
|
|
413
|
+
exposes.enum('display_auto_off_enabled', ea.ALL, ['disabled', 'enabled']),
|
|
401
414
|
exposes.numeric('alarm_airtemp_overvalue', ea.ALL)
|
|
402
415
|
.withUnit('°C')
|
|
403
416
|
.withValueMin(20).withValueMax(60)
|
|
404
417
|
.withDescription('Room temperature alarm threshold, between 20 and 60 in °C. 0 means disabled. Default: 45.'),
|
|
405
418
|
],
|
|
419
|
+
onEvent: async (type, data, device, options) => {
|
|
420
|
+
if (type === 'stop') {
|
|
421
|
+
clearInterval(globalStore.getValue(device, 'time'));
|
|
422
|
+
globalStore.clearValue(device, 'time');
|
|
423
|
+
} else if (!globalStore.hasValue(device, 'time')) {
|
|
424
|
+
const endpoint = device.getEndpoint(1);
|
|
425
|
+
const hours24 = 1000 * 60 * 60 * 24;
|
|
426
|
+
// Device does not ask for the time with binding, therefore we write the time every 24 hours
|
|
427
|
+
const interval = setInterval(async () => syncTime(endpoint), hours24);
|
|
428
|
+
globalStore.putValue(device, 'time', interval);
|
|
429
|
+
}
|
|
430
|
+
},
|
|
406
431
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
407
432
|
const endpoint = device.getEndpoint(1);
|
|
408
433
|
const binds = [
|
|
@@ -415,6 +440,7 @@ module.exports = [
|
|
|
415
440
|
await reporting.thermostatTemperature(endpoint);
|
|
416
441
|
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
417
442
|
await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint);
|
|
443
|
+
await reporting.thermostatKeypadLockMode(endpoint);
|
|
418
444
|
|
|
419
445
|
await endpoint.configureReporting('hvacThermostat', [{
|
|
420
446
|
attribute: 'ocupancy',
|
|
@@ -425,16 +451,24 @@ module.exports = [
|
|
|
425
451
|
|
|
426
452
|
await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier']);
|
|
427
453
|
await endpoint.read('haElectricalMeasurement', ['acCurrentDivisor']);
|
|
454
|
+
await endpoint.read('seMetering', ['multiplier', 'divisor']);
|
|
428
455
|
|
|
429
|
-
await reporting.activePower(endpoint);
|
|
430
|
-
await reporting.rmsCurrent(endpoint, {min:
|
|
431
|
-
await reporting.rmsVoltage(endpoint, {min:
|
|
456
|
+
await reporting.activePower(endpoint, {min: 30, change: 10}); // Min report change 10W
|
|
457
|
+
await reporting.rmsCurrent(endpoint, {min: 30, change: 50}); // Min report change 0.05A
|
|
458
|
+
await reporting.rmsVoltage(endpoint, {min: 30, change: 20}); // Min report change 2V
|
|
459
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
432
460
|
await reporting.currentSummDelivered(endpoint);
|
|
433
461
|
|
|
434
462
|
// Custom attributes
|
|
435
463
|
const options = {manufacturerCode: 0x1224}; // Sunricher Manufacturer Code
|
|
436
464
|
|
|
437
|
-
// OperateDisplayLcdBrightnesss
|
|
465
|
+
// OperateDisplayLcdBrightnesss
|
|
466
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
467
|
+
attribute: {ID: 0x1000, type: 0x30},
|
|
468
|
+
minimumReportInterval: 0,
|
|
469
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
470
|
+
reportableChange: null}],
|
|
471
|
+
options);
|
|
438
472
|
// ButtonVibrationLevel
|
|
439
473
|
await endpoint.configureReporting('hvacThermostat', [{
|
|
440
474
|
attribute: {ID: 0x1001, type: 0x30},
|
|
@@ -507,6 +541,14 @@ module.exports = [
|
|
|
507
541
|
reportableChange: 0}],
|
|
508
542
|
options);
|
|
509
543
|
|
|
544
|
+
// DisplayAutoOffEnable
|
|
545
|
+
await endpoint.configureReporting('hvacThermostat', [{
|
|
546
|
+
attribute: {ID: 0x100B, type: 0x30},
|
|
547
|
+
minimumReportInterval: 0,
|
|
548
|
+
maximumReportInterval: constants.repInterval.HOUR,
|
|
549
|
+
reportableChange: null}],
|
|
550
|
+
options);
|
|
551
|
+
|
|
510
552
|
// AlarmAirTempOverValue
|
|
511
553
|
await endpoint.configureReporting('hvacThermostat', [{
|
|
512
554
|
attribute: {ID: 0x2001, type: 0x20},
|
|
@@ -523,12 +565,13 @@ module.exports = [
|
|
|
523
565
|
options);
|
|
524
566
|
|
|
525
567
|
// Device does not asks for the time with binding, we need to write time during configure
|
|
568
|
+
syncTime(endpoint);
|
|
526
569
|
|
|
527
570
|
// Trigger initial read
|
|
528
571
|
await endpoint.read('hvacThermostat', ['systemMode', 'runningState', 'occupiedHeatingSetpoint']);
|
|
529
|
-
await endpoint.read('hvacThermostat', [0x1001, 0x1002, 0x1003], options);
|
|
572
|
+
await endpoint.read('hvacThermostat', [0x1000, 0x1001, 0x1002, 0x1003], options);
|
|
530
573
|
await endpoint.read('hvacThermostat', [0x1004, 0x1005, 0x1006, 0x1007], options);
|
|
531
|
-
await endpoint.read('hvacThermostat', [0x1008, 0x1009, 0x100A], options);
|
|
574
|
+
await endpoint.read('hvacThermostat', [0x1008, 0x1009, 0x100A, 0x100B], options);
|
|
532
575
|
await endpoint.read('hvacThermostat', [0x2001, 0x2002], options);
|
|
533
576
|
},
|
|
534
577
|
},
|
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: {
|
|
@@ -792,6 +793,7 @@ module.exports = [
|
|
|
792
793
|
fingerprint: [{modelID: 'TS0001', manufacturerName: '_TZ3000_hktqahrq'}, {manufacturerName: '_TZ3000_hktqahrq'},
|
|
793
794
|
{manufacturerName: '_TZ3000_q6a3tepg'}, {modelID: 'TS000F', manufacturerName: '_TZ3000_m9af2l6g'},
|
|
794
795
|
{modelID: 'TS000F', manufacturerName: '_TZ3000_mx3vgyea'},
|
|
796
|
+
{modelID: 'TS000F', manufacturerName: '_TZ3000_xkap8wtb'},
|
|
795
797
|
{modelID: 'TS0001', manufacturerName: '_TZ3000_npzfdcof'},
|
|
796
798
|
{modelID: 'TS0001', manufacturerName: '_TZ3000_5ng23zjs'},
|
|
797
799
|
{modelID: 'TS0001', manufacturerName: '_TZ3000_rmjr4ufz'},
|
|
@@ -1167,7 +1169,7 @@ module.exports = [
|
|
|
1167
1169
|
],
|
|
1168
1170
|
},
|
|
1169
1171
|
{
|
|
1170
|
-
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ip2akl4w', '_TZE200_1agwnems']),
|
|
1172
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ip2akl4w', '_TZE200_1agwnems', '_TZE200_la2c2uo9', '_TZE200_579lguh2']),
|
|
1171
1173
|
model: 'TS0601_dimmer_1',
|
|
1172
1174
|
vendor: 'TuYa',
|
|
1173
1175
|
description: 'Zigbee smart dimmer',
|
|
@@ -1187,6 +1189,10 @@ module.exports = [
|
|
|
1187
1189
|
[14, 'power_on_behavior', tuya.valueConverter.powerOnBehavior],
|
|
1188
1190
|
],
|
|
1189
1191
|
},
|
|
1192
|
+
whiteLabel: [
|
|
1193
|
+
{vendor: 'Moes', model: 'MS-105Z'},
|
|
1194
|
+
{vendor: 'Lerlink', model: 'X706U'},
|
|
1195
|
+
],
|
|
1190
1196
|
},
|
|
1191
1197
|
{
|
|
1192
1198
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_oiymh3qu'}],
|
|
@@ -1990,12 +1996,14 @@ module.exports = [
|
|
|
1990
1996
|
{modelID: 'TS0601', manufacturerName: '_TZE200_mudxchsu'}, /* model: 'TV05-ZG curve', vendor: 'TuYa' */
|
|
1991
1997
|
{modelID: 'TS0601', manufacturerName: '_TZE200_7yoranx2'}, /* model: 'TV01-ZB', vendor: 'Moes' */
|
|
1992
1998
|
{modelID: 'TS0601', manufacturerName: '_TZE200_kds0pmmv'}, /* model: 'TV01-ZB', vendor: 'Moes' */
|
|
1999
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_bvu2wnxz'}, /* model: 'TRV06', vendor: 'AVATTO' */
|
|
1993
2000
|
],
|
|
1994
2001
|
model: 'TV02-Zigbee',
|
|
1995
2002
|
vendor: 'TuYa',
|
|
1996
2003
|
description: 'Thermostat radiator valve',
|
|
1997
2004
|
whiteLabel: [
|
|
1998
2005
|
{vendor: 'Moes', model: 'TV01-ZB'},
|
|
2006
|
+
{vendor: 'AVATTO', model: 'TRV06'},
|
|
1999
2007
|
{vendor: 'Tesla Smart', model: 'TSL-TRV-TV01ZG'},
|
|
2000
2008
|
{vendor: 'Unknown/id3.pl', model: 'GTZ08'},
|
|
2001
2009
|
],
|
|
@@ -2312,19 +2320,20 @@ module.exports = [
|
|
|
2312
2320
|
fromZigbee: [tuya.fzDataPoints],
|
|
2313
2321
|
toZigbee: [tuya.tzDataPoints],
|
|
2314
2322
|
configure: tuya.configureMagicPacket,
|
|
2315
|
-
exposes: [tuya.exposes.switch(), e.ac_frequency(), e.energy(), e.power(), e.power_factor(), e.voltage(), e.current()
|
|
2323
|
+
exposes: [tuya.exposes.switch(), e.ac_frequency(), e.energy(), e.power(), e.power_factor(), e.voltage(), e.current(),
|
|
2324
|
+
e.produced_energy()],
|
|
2316
2325
|
meta: {
|
|
2317
2326
|
tuyaDatapoints: [
|
|
2318
2327
|
[1, 'energy', tuya.valueConverter.divideBy100],
|
|
2319
2328
|
[6, null, tuya.valueConverter.phaseA], // voltage and current
|
|
2320
2329
|
[16, 'state', tuya.valueConverter.onOff],
|
|
2330
|
+
[102, 'produced_energy', tuya.valueConverter.divideBy100],
|
|
2321
2331
|
[103, 'power', tuya.valueConverter.raw],
|
|
2322
2332
|
[105, 'ac_frequency', tuya.valueConverter.divideBy100],
|
|
2323
2333
|
[111, 'power_factor', tuya.valueConverter.divideBy10],
|
|
2324
2334
|
// Ignored for now; we don't know what the values mean
|
|
2325
2335
|
[109, null, null], // reactive_power in VArh, ignored for now
|
|
2326
2336
|
[101, null, null], // total active power (translated from chinese) - same as energy dp 1??
|
|
2327
|
-
[102, null, null], // Reverse active power (translated from chinese), produced power? (e.g. if solar panels are connected)
|
|
2328
2337
|
[9, null, null], // Fault - we don't know the possible values here
|
|
2329
2338
|
[110, null, null], // total reactive power (translated from chinese) - value is 0.03kvar, we already have kvarh on dp 109
|
|
2330
2339
|
[17, null, null], // Alarm set1 - value seems garbage "AAAAAAAAAAAAAABkAAEOAACqAAAAAAAKAAAAAAAA"
|
|
@@ -2676,7 +2685,8 @@ module.exports = [
|
|
|
2676
2685
|
},
|
|
2677
2686
|
},
|
|
2678
2687
|
{
|
|
2679
|
-
fingerprint: [{modelID: 'TS0006', manufacturerName: '_TYZB01_ltundz9m'}
|
|
2688
|
+
fingerprint: [{modelID: 'TS0006', manufacturerName: '_TYZB01_ltundz9m'},
|
|
2689
|
+
{modelID: 'TS0006', manufacturerName: '_TZ3000_jyupj3fw'}],
|
|
2680
2690
|
model: 'TS0006',
|
|
2681
2691
|
vendor: 'TuYa',
|
|
2682
2692
|
description: '6 gang switch module with neutral wire',
|
|
@@ -3217,6 +3227,7 @@ module.exports = [
|
|
|
3217
3227
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_ikvncluo'},
|
|
3218
3228
|
{modelID: 'TS0601', manufacturerName: '_TZE200_lyetpprm'},
|
|
3219
3229
|
{modelID: 'TS0601', manufacturerName: '_TZE200_jva8ink8'},
|
|
3230
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_holel4dk'},
|
|
3220
3231
|
{modelID: 'TS0601', manufacturerName: '_TZE200_wukb7rhc'},
|
|
3221
3232
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ztc6ggyl'}],
|
|
3222
3233
|
model: 'TS0601_smart_human_presense_sensor',
|
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
|
];
|
package/lib/exposes.js
CHANGED
|
@@ -549,6 +549,7 @@ module.exports = {
|
|
|
549
549
|
eco_temperature: () => new Numeric('eco_temperature', access.STATE_SET).withUnit('°C').withDescription('Eco temperature').withValueMin(0).withValueMax(35),
|
|
550
550
|
effect: () => new Enum('effect', access.SET, ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect']).withDescription('Triggers an effect on the light (e.g. make light blink for a few seconds)'),
|
|
551
551
|
energy: () => new Numeric('energy', access.STATE).withUnit('kWh').withDescription('Sum of consumed energy'),
|
|
552
|
+
produced_energy: () => new Numeric('produced_energy', access.STATE).withUnit('kWh').withDescription('Sum of produced energy'),
|
|
552
553
|
fan: () => new Fan(),
|
|
553
554
|
flip_indicator_light: () => new Binary('flip_indicator_light', access.ALL, 'ON', 'OFF').withDescription('After turn on, the indicator light turns on while switch is off, and vice versa'),
|
|
554
555
|
force: () => new Enum('force', access.STATE_SET, ['normal', 'open', 'close']).withDescription('Force the valve position'),
|
package/package.json
CHANGED
package/devices/lerlink.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const exposes = require('../lib/exposes');
|
|
2
|
-
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
-
const tz = require('../converters/toZigbee');
|
|
4
|
-
const e = exposes.presets;
|
|
5
|
-
const ea = exposes.access;
|
|
6
|
-
|
|
7
|
-
module.exports = [
|
|
8
|
-
{
|
|
9
|
-
fingerprint: [
|
|
10
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_579lguh2'},
|
|
11
|
-
],
|
|
12
|
-
model: 'X706U',
|
|
13
|
-
vendor: 'Lerlink',
|
|
14
|
-
description: 'Zigbee dimmer switch',
|
|
15
|
-
fromZigbee: [fz.moes_105_dimmer, fz.ignore_basic_report],
|
|
16
|
-
toZigbee: [tz.moes_105_dimmer],
|
|
17
|
-
exposes: [e.light_brightness().setAccess('state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET)],
|
|
18
|
-
},
|
|
19
|
-
];
|