zigbee-herdsman-converters 14.0.325 → 14.0.326
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/devices/ikea.js +1 -1
- package/devices/lidl.js +403 -0
- package/devices/tuya.js +3 -2
- package/devices/xiaomi.js +7 -8
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/devices/ikea.js
CHANGED
|
@@ -760,7 +760,7 @@ module.exports = [
|
|
|
760
760
|
extend: tradfriExtend.light_onoff_brightness_colortemp_color(),
|
|
761
761
|
},
|
|
762
762
|
{
|
|
763
|
-
zigbeeModel: ['TRADFRI bulb E14 CWS 470lm'],
|
|
763
|
+
zigbeeModel: ['TRADFRI bulb E14 CWS 470lm', 'TRADFRI bulb E12 CWS 450lm'],
|
|
764
764
|
model: 'LED1925G6',
|
|
765
765
|
vendor: 'IKEA',
|
|
766
766
|
description: 'TRADFRI LED bulb E14 470 lumen, opal, dimmable, white spectrum, color spectrum',
|
package/devices/lidl.js
CHANGED
|
@@ -6,6 +6,356 @@ const extend = require('../lib/extend');
|
|
|
6
6
|
const e = exposes.presets;
|
|
7
7
|
const ea = exposes.access;
|
|
8
8
|
const tuya = require('../lib/tuya');
|
|
9
|
+
const globalStore = require('../lib/store');
|
|
10
|
+
|
|
11
|
+
const tuyaLocal = {
|
|
12
|
+
dataPoints: {
|
|
13
|
+
zsHeatingSetpoint: 16,
|
|
14
|
+
zsChildLock: 40,
|
|
15
|
+
zsTempCalibration: 104,
|
|
16
|
+
zsLocalTemp: 24,
|
|
17
|
+
zsBatteryVoltage: 35,
|
|
18
|
+
zsComfortTemp: 101,
|
|
19
|
+
zsEcoTemp: 102,
|
|
20
|
+
zsHeatingSetpointAuto: 105,
|
|
21
|
+
zsOpenwindowTemp: 116,
|
|
22
|
+
zsOpenwindowTime: 117,
|
|
23
|
+
zsErrorStatus: 45,
|
|
24
|
+
zsMode: 2,
|
|
25
|
+
zsAwaySetting: 103,
|
|
26
|
+
zsBinaryOne: 106,
|
|
27
|
+
zsBinaryTwo: 107,
|
|
28
|
+
zsScheduleMonday: 109,
|
|
29
|
+
zsScheduleTuesday: 110,
|
|
30
|
+
zsScheduleWednesday: 111,
|
|
31
|
+
zsScheduleThursday: 112,
|
|
32
|
+
zsScheduleFriday: 113,
|
|
33
|
+
zsScheduleSaturday: 114,
|
|
34
|
+
zsScheduleSunday: 115,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const fzLocal = {
|
|
39
|
+
zs_thermostat: {
|
|
40
|
+
cluster: 'manuSpecificTuya',
|
|
41
|
+
type: ['commandGetData', 'commandSetDataResponse'],
|
|
42
|
+
convert: (model, msg, publish, options, meta) => {
|
|
43
|
+
const dp = msg.data.dp;
|
|
44
|
+
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
45
|
+
const ret = {};
|
|
46
|
+
const daysMap = {1: 'monday', 2: 'tuesday', 3: 'wednesday', 4: 'thursday', 5: 'friday', 6: 'saturday', 7: 'sunday'};
|
|
47
|
+
const day = daysMap[value[0]];
|
|
48
|
+
|
|
49
|
+
switch (dp) {
|
|
50
|
+
case tuyaLocal.dataPoints.zsChildLock:
|
|
51
|
+
return {child_lock: value ? 'LOCK' : 'UNLOCK'};
|
|
52
|
+
|
|
53
|
+
case tuyaLocal.dataPoints.zsHeatingSetpoint:
|
|
54
|
+
if (value==0) ret.system_mode='off';
|
|
55
|
+
if (value==60) {
|
|
56
|
+
ret.system_mode='heat';
|
|
57
|
+
ret.preset = 'boost';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
ret.current_heating_setpoint= (value / 2).toFixed(1);
|
|
61
|
+
if (value>0 && value<60) globalStore.putValue(msg.endpoint, 'current_heating_setpoint', ret.current_heating_setpoint);
|
|
62
|
+
return ret;
|
|
63
|
+
case tuyaLocal.dataPoints.zsHeatingSetpointAuto:
|
|
64
|
+
return {current_heating_setpoint_auto: (value / 2).toFixed(1)};
|
|
65
|
+
|
|
66
|
+
case tuyaLocal.dataPoints.zsOpenwindowTemp:
|
|
67
|
+
return {detectwindow_temperature: (value / 2).toFixed(1)};
|
|
68
|
+
|
|
69
|
+
case tuyaLocal.dataPoints.zsOpenwindowTime:
|
|
70
|
+
return {detectwindow_timeminute: value};
|
|
71
|
+
|
|
72
|
+
case tuyaLocal.dataPoints.zsLocalTemp:
|
|
73
|
+
return {local_temperature: (value / 10).toFixed(1)};
|
|
74
|
+
|
|
75
|
+
case tuyaLocal.dataPoints.zsBatteryVoltage:
|
|
76
|
+
return {voltage: Math.round(value * 10)};
|
|
77
|
+
|
|
78
|
+
case tuyaLocal.dataPoints.zsTempCalibration:
|
|
79
|
+
return {local_temperature_calibration: value > 55 ?
|
|
80
|
+
((value - 0x100000000)/10).toFixed(1): (value/ 10).toFixed(1)};
|
|
81
|
+
|
|
82
|
+
case tuyaLocal.dataPoints.zsBinaryOne:
|
|
83
|
+
return {binary_one: value ? 'ON' : 'OFF'};
|
|
84
|
+
|
|
85
|
+
case tuyaLocal.dataPoints.zsBinaryTwo:
|
|
86
|
+
return {binary_two: value ? 'ON' : 'OFF'};
|
|
87
|
+
|
|
88
|
+
case tuyaLocal.dataPoints.zsComfortTemp:
|
|
89
|
+
return {comfort_temperature: (value / 2).toFixed(1)};
|
|
90
|
+
|
|
91
|
+
case tuyaLocal.dataPoints.zsEcoTemp:
|
|
92
|
+
return {eco_temperature: (value / 2).toFixed(1)};
|
|
93
|
+
|
|
94
|
+
case tuyaLocal.dataPoints.zsAwayTemp:
|
|
95
|
+
return {away_preset_temperature: (value / 2).toFixed(1)};
|
|
96
|
+
|
|
97
|
+
case tuyaLocal.dataPoints.zsMode:
|
|
98
|
+
switch (value) {
|
|
99
|
+
case 1: // manual
|
|
100
|
+
return {system_mode: 'heat', away_mode: 'OFF', preset: 'manual'};
|
|
101
|
+
case 2: // away
|
|
102
|
+
return {system_mode: 'auto', away_mode: 'ON', preset: 'holiday'};
|
|
103
|
+
case 0: // auto
|
|
104
|
+
return {system_mode: 'auto', away_mode: 'OFF', preset: 'schedule'};
|
|
105
|
+
default:
|
|
106
|
+
meta.logger.warn('zigbee-herdsman-converters:zsThermostat: ' +
|
|
107
|
+
`preset ${value} is not recognized.`);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
case tuyaLocal.dataPoints.zsScheduleMonday:
|
|
112
|
+
case tuyaLocal.dataPoints.zsScheduleTuesday:
|
|
113
|
+
case tuyaLocal.dataPoints.zsScheduleWednesday:
|
|
114
|
+
case tuyaLocal.dataPoints.zsScheduleThursday:
|
|
115
|
+
case tuyaLocal.dataPoints.zsScheduleFriday:
|
|
116
|
+
case tuyaLocal.dataPoints.zsScheduleSaturday:
|
|
117
|
+
case tuyaLocal.dataPoints.zsScheduleSunday:
|
|
118
|
+
for (let i = 1; i <= 9; i++) {
|
|
119
|
+
const tempId = ((i-1) * 2) +1;
|
|
120
|
+
const timeId = ((i-1) * 2) +2;
|
|
121
|
+
ret[`${day}_temp_${i}`] = (value[tempId] / 2).toFixed(1);
|
|
122
|
+
if (i!=9) {
|
|
123
|
+
ret[`${day}_hour_${i}`] = Math.floor(value[timeId] / 4).toString().padStart(2, '0');
|
|
124
|
+
ret[`${day}_minute_${i}`] = ((value[timeId] % 4) *15).toString().padStart(2, '0');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return ret;
|
|
128
|
+
case tuyaLocal.dataPoints.zsAwaySetting:
|
|
129
|
+
ret.away_preset_year = value[0];
|
|
130
|
+
ret.away_preset_month = value[1];
|
|
131
|
+
ret.away_preset_day = value[2];
|
|
132
|
+
ret.away_preset_hour = value[3];
|
|
133
|
+
ret.away_preset_minute = value[4];
|
|
134
|
+
ret.away_preset_temperature = (value[5] / 2).toFixed(1);
|
|
135
|
+
ret.away_preset_days = (value[6]<<8)+value[7];
|
|
136
|
+
return ret;
|
|
137
|
+
default:
|
|
138
|
+
meta.logger.warn(`zigbee-herdsman-converters:zsThermostat: Unrecognized DP #${dp} with data ${JSON.stringify(msg.data)}`);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
const tzLocal = {
|
|
144
|
+
zs_thermostat_child_lock: {
|
|
145
|
+
key: ['child_lock'],
|
|
146
|
+
convertSet: async (entity, key, value, meta) => {
|
|
147
|
+
await tuya.sendDataPointBool(entity, tuyaLocal.dataPoints.zsChildLock, value === 'LOCK');
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
zs_thermostat_binary_one: {
|
|
151
|
+
key: ['binary_one'],
|
|
152
|
+
convertSet: async (entity, key, value, meta) => {
|
|
153
|
+
await tuya.sendDataPointBool(entity, tuyaLocal.dataPoints.zsBinaryOne, value === 'ON');
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
zs_thermostat_binary_two: {
|
|
157
|
+
key: ['binary_two'],
|
|
158
|
+
convertSet: async (entity, key, value, meta) => {
|
|
159
|
+
await tuya.sendDataPointBool(entity, tuyaLocal.dataPoints.zsBinaryTwo, value === 'ON');
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
zs_thermostat_current_heating_setpoint: {
|
|
163
|
+
key: ['current_heating_setpoint'],
|
|
164
|
+
convertSet: async (entity, key, value, meta) => {
|
|
165
|
+
let temp = Math.round(value * 2);
|
|
166
|
+
if (temp<=0) temp = 1;
|
|
167
|
+
if (temp>=60) temp = 59;
|
|
168
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsHeatingSetpoint, temp);
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
zs_thermostat_current_heating_setpoint_auto: {
|
|
172
|
+
key: ['current_heating_setpoint_auto'],
|
|
173
|
+
convertSet: async (entity, key, value, meta) => {
|
|
174
|
+
let temp = Math.round(value * 2);
|
|
175
|
+
if (temp<=0) temp = 1;
|
|
176
|
+
if (temp>=60) temp = 59;
|
|
177
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsHeatingSetpointAuto, temp);
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
zs_thermostat_comfort_temp: {
|
|
181
|
+
key: ['comfort_temperature'],
|
|
182
|
+
convertSet: async (entity, key, value, meta) => {
|
|
183
|
+
meta.logger.debug(JSON.stringify(entity));
|
|
184
|
+
const temp = Math.round(value * 2);
|
|
185
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsComfortTemp, temp);
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
zs_thermostat_openwindow_temp: {
|
|
189
|
+
key: ['detectwindow_temperature'],
|
|
190
|
+
convertSet: async (entity, key, value, meta) => {
|
|
191
|
+
let temp = Math.round(value * 2);
|
|
192
|
+
if (temp<=0) temp = 1;
|
|
193
|
+
if (temp>=60) temp = 59;
|
|
194
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsOpenwindowTemp, temp);
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
zs_thermostat_openwindow_time: {
|
|
198
|
+
key: ['detectwindow_timeminute'],
|
|
199
|
+
convertSet: async (entity, key, value, meta) => {
|
|
200
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsOpenwindowTime, value);
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
zs_thermostat_eco_temp: {
|
|
204
|
+
key: ['eco_temperature'],
|
|
205
|
+
convertSet: async (entity, key, value, meta) => {
|
|
206
|
+
const temp = Math.round(value * 2);
|
|
207
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsEcoTemp, temp);
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
zs_thermostat_preset_mode: {
|
|
211
|
+
key: ['preset'],
|
|
212
|
+
convertSet: async (entity, key, value, meta) => {
|
|
213
|
+
const lookup = {'schedule': 0, 'manual': 1, 'holiday': 2};
|
|
214
|
+
if (value == 'boost') {
|
|
215
|
+
await tuya.sendDataPointEnum(entity, tuyaLocal.dataPoints.zsMode, lookup['manual']);
|
|
216
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsHeatingSetpoint, 60);
|
|
217
|
+
} else {
|
|
218
|
+
await tuya.sendDataPointEnum(entity, tuyaLocal.dataPoints.zsMode, lookup[value]);
|
|
219
|
+
if (value == 'manual') {
|
|
220
|
+
const temp = globalStore.getValue(entity, 'current_heating_setpoint');
|
|
221
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsHeatingSetpoint, temp ? Math.round(temp * 2) : 43 );
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
zs_thermostat_system_mode: {
|
|
227
|
+
key: ['system_mode'],
|
|
228
|
+
convertSet: async (entity, key, value, meta) => {
|
|
229
|
+
if (value == 'off') {
|
|
230
|
+
await tuya.sendDataPointEnum(entity, tuyaLocal.dataPoints.zsMode, 1);
|
|
231
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsHeatingSetpoint, 0);
|
|
232
|
+
} else if (value == 'auto') {
|
|
233
|
+
await tuya.sendDataPointEnum(entity, tuyaLocal.dataPoints.zsMode, 0);
|
|
234
|
+
} else if (value == 'heat') {
|
|
235
|
+
// manual
|
|
236
|
+
const temp = globalStore.getValue(entity, 'current_heating_setpoint');
|
|
237
|
+
await tuya.sendDataPointEnum(entity, tuyaLocal.dataPoints.zsMode, 1);
|
|
238
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsHeatingSetpoint, temp ? Math.round(temp * 2) : 43 );
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
zs_thermostat_local_temperature_calibration: {
|
|
243
|
+
key: ['local_temperature_calibration'],
|
|
244
|
+
convertSet: async (entity, key, value, meta) => {
|
|
245
|
+
if (value > 0) value = value*10;
|
|
246
|
+
if (value < 0) value = value*10 + 0x100000000;
|
|
247
|
+
await tuya.sendDataPointValue(entity, tuyaLocal.dataPoints.zsTempCalibration, value);
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
zs_thermostat_away_setting: {
|
|
251
|
+
key: ['away_setting'],
|
|
252
|
+
convertSet: async (entity, key, value, meta) => {
|
|
253
|
+
const result = [];
|
|
254
|
+
const daysInMonth = new Date(2000+result[0], result[1], 0).getDate();
|
|
255
|
+
|
|
256
|
+
for (const attrName of ['away_preset_year',
|
|
257
|
+
'away_preset_month',
|
|
258
|
+
'away_preset_day',
|
|
259
|
+
'away_preset_hour',
|
|
260
|
+
'away_preset_minute',
|
|
261
|
+
'away_preset_temperature',
|
|
262
|
+
'away_preset_days']) {
|
|
263
|
+
let v = 0;
|
|
264
|
+
if (value.hasOwnProperty(attrName)) {
|
|
265
|
+
v = value[attrName];
|
|
266
|
+
} else if (meta.state.hasOwnProperty(attrName)) {
|
|
267
|
+
v = meta.state[attrName];
|
|
268
|
+
}
|
|
269
|
+
switch (attrName) {
|
|
270
|
+
case 'away_preset_year':
|
|
271
|
+
if (v<17 || v>99) v = 17;
|
|
272
|
+
result.push(Math.round(v));
|
|
273
|
+
break;
|
|
274
|
+
case 'away_preset_month':
|
|
275
|
+
if (v<1 || v>12) v = 1;
|
|
276
|
+
result.push(Math.round(v));
|
|
277
|
+
break;
|
|
278
|
+
case 'away_preset_day':
|
|
279
|
+
if (v<1) {
|
|
280
|
+
v = 1;
|
|
281
|
+
} else if (v>daysInMonth) {
|
|
282
|
+
v = daysInMonth;
|
|
283
|
+
}
|
|
284
|
+
result.push(Math.round(v));
|
|
285
|
+
break;
|
|
286
|
+
case 'away_preset_hour':
|
|
287
|
+
if (v<0 || v>23) v = 0;
|
|
288
|
+
result.push(Math.round(v));
|
|
289
|
+
break;
|
|
290
|
+
case 'away_preset_minute':
|
|
291
|
+
if (v<0 || v>59) v = 0;
|
|
292
|
+
result.push(Math.round(v));
|
|
293
|
+
break;
|
|
294
|
+
case 'away_preset_temperature':
|
|
295
|
+
if (v<0.5 || v>29.5) v = 17;
|
|
296
|
+
result.push(Math.round(v * 2));
|
|
297
|
+
break;
|
|
298
|
+
case 'away_preset_days':
|
|
299
|
+
if (v<1 || v>9999) v = 1;
|
|
300
|
+
result.push((v & 0xff00)>>8);
|
|
301
|
+
result.push((v & 0x00ff));
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
await tuya.sendDataPointRaw(entity, tuyaLocal.dataPoints.zsAwaySetting, result);
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
zs_thermostat_local_schedule: {
|
|
310
|
+
key: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'],
|
|
311
|
+
convertSet: async (entity, key, value, meta) => {
|
|
312
|
+
const daysMap = {'monday': 1, 'tuesday': 2, 'wednesday': 3, 'thursday': 4, 'friday': 5, 'saturday': 6, 'sunday': 7};
|
|
313
|
+
const day = daysMap[key];
|
|
314
|
+
const results = [];
|
|
315
|
+
results.push(day);
|
|
316
|
+
for (let i = 1; i <= 9; i++) {
|
|
317
|
+
// temperature
|
|
318
|
+
const attrName = `${key}_temp_${i}`;
|
|
319
|
+
let v = 17;
|
|
320
|
+
if (value.hasOwnProperty(attrName)) {
|
|
321
|
+
v = value[attrName];
|
|
322
|
+
} else if (meta.state.hasOwnProperty(attrName)) {
|
|
323
|
+
v = meta.state[attrName];
|
|
324
|
+
}
|
|
325
|
+
if (v<0.5 || v>29.5) v = 17;
|
|
326
|
+
results.push(Math.round(v * 2));
|
|
327
|
+
if (i!=9) {
|
|
328
|
+
// hour
|
|
329
|
+
let attrName = `${key}_hour_${i}`;
|
|
330
|
+
let h = 0;
|
|
331
|
+
if (value.hasOwnProperty(attrName)) {
|
|
332
|
+
h = value[attrName];
|
|
333
|
+
} else if (meta.state.hasOwnProperty(attrName)) {
|
|
334
|
+
h = meta.state[attrName];
|
|
335
|
+
}
|
|
336
|
+
// minute
|
|
337
|
+
attrName = `${key}_minute_${i}`;
|
|
338
|
+
let m = 0;
|
|
339
|
+
if (value.hasOwnProperty(attrName)) {
|
|
340
|
+
m = value[attrName];
|
|
341
|
+
} else if (meta.state.hasOwnProperty(attrName)) {
|
|
342
|
+
m = meta.state[attrName];
|
|
343
|
+
}
|
|
344
|
+
let rt = h*4 + m/15;
|
|
345
|
+
if (rt<1) {
|
|
346
|
+
rt =1;
|
|
347
|
+
} else if (rt>96) {
|
|
348
|
+
rt = 96;
|
|
349
|
+
}
|
|
350
|
+
results.push(Math.round(rt));
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (value > 0) value = value*10;
|
|
354
|
+
if (value < 0) value = value*10 + 0x100000000;
|
|
355
|
+
await tuya.sendDataPointRaw(entity, (109+day-1), results);
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
};
|
|
9
359
|
|
|
10
360
|
module.exports = [
|
|
11
361
|
{
|
|
@@ -301,4 +651,57 @@ module.exports = [
|
|
|
301
651
|
await reporting.onOff(endpoint);
|
|
302
652
|
},
|
|
303
653
|
},
|
|
654
|
+
{
|
|
655
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_chyvmhay'}],
|
|
656
|
+
model: '368308_2010',
|
|
657
|
+
vendor: 'Lidl',
|
|
658
|
+
description: 'Silvercrest rdiator valve with thermostat',
|
|
659
|
+
fromZigbee: [fz.ignore_tuya_set_time, fzLocal.zs_thermostat, fz.tuya_data_point_dump],
|
|
660
|
+
toZigbee: [tzLocal.zs_thermostat_current_heating_setpoint, tzLocal.zs_thermostat_child_lock,
|
|
661
|
+
tzLocal.zs_thermostat_comfort_temp, tzLocal.zs_thermostat_eco_temp, tzLocal.zs_thermostat_preset_mode,
|
|
662
|
+
tzLocal.zs_thermostat_system_mode, tzLocal.zs_thermostat_local_temperature_calibration,
|
|
663
|
+
tzLocal.zs_thermostat_current_heating_setpoint_auto, tzLocal.zs_thermostat_openwindow_time,
|
|
664
|
+
tzLocal.zs_thermostat_openwindow_temp, tzLocal.zs_thermostat_binary_one, tzLocal.zs_thermostat_binary_two,
|
|
665
|
+
tzLocal.zs_thermostat_away_setting, tzLocal.zs_thermostat_local_schedule],
|
|
666
|
+
onEvent: tuya.onEventSetLocalTime,
|
|
667
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
668
|
+
const endpoint = device.getEndpoint(1);
|
|
669
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
670
|
+
},
|
|
671
|
+
exposes: [
|
|
672
|
+
e.child_lock(), e.comfort_temperature(), e.eco_temperature(), e.battery_voltage(),
|
|
673
|
+
exposes.numeric('current_heating_setpoint_auto', ea.STATE_SET).withValueMin(0.5).withValueMax(29.5)
|
|
674
|
+
.withValueStep(0.5).withUnit('°C').withDescription('Temperature setpoint automatic'),
|
|
675
|
+
exposes.climate().withSetpoint('current_heating_setpoint', 0.5, 29.5, 0.5, ea.STATE_SET)
|
|
676
|
+
.withLocalTemperature(ea.STATE).withLocalTemperatureCalibration(-20, 20, 1, ea.STATE_SET)
|
|
677
|
+
.withSystemMode(['off', 'heat', 'auto'], ea.STATE_SET)
|
|
678
|
+
.withPreset(['schedule', 'manual', 'holiday', 'boost']),
|
|
679
|
+
exposes.numeric('detectwindow_temperature', ea.STATE_SET).withUnit('°C').withDescription('Open window detection temperature'),
|
|
680
|
+
exposes.numeric('detectwindow_timeminute', ea.STATE_SET).withUnit('min').withDescription('Open window time in minute'),
|
|
681
|
+
exposes.binary('binary_one', ea.STATE_SET, 'ON', 'OFF').withDescription('Unknown binary one'),
|
|
682
|
+
exposes.binary('binary_two', ea.STATE_SET, 'ON', 'OFF').withDescription('Unknown binary two'),
|
|
683
|
+
exposes.binary('away_mode', ea.STATE, 'ON', 'OFF').withDescription('Away mode'),
|
|
684
|
+
exposes.composite('away_setting', 'away_setting').withFeature(e.away_preset_days()).setAccess('away_preset_days', ea.ALL)
|
|
685
|
+
.withFeature(e.away_preset_temperature()).setAccess('away_preset_temperature', ea.ALL)
|
|
686
|
+
.withFeature(exposes.numeric('away_preset_year', ea.ALL).withUnit('year').withDescription('Start away year 20xx'))
|
|
687
|
+
.withFeature(exposes.numeric('away_preset_month', ea.ALL).withUnit('month').withDescription('Start away month'))
|
|
688
|
+
.withFeature(exposes.numeric('away_preset_day', ea.ALL).withUnit('day').withDescription('Start away day'))
|
|
689
|
+
.withFeature(exposes.numeric('away_preset_hour', ea.ALL).withUnit('hour').withDescription('Start away hours'))
|
|
690
|
+
.withFeature(exposes.numeric('away_preset_minute', ea.ALL).withUnit('min').withDescription('Start away minutes')),
|
|
691
|
+
...['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'].map((day) => {
|
|
692
|
+
const expose = exposes.composite(day, day);
|
|
693
|
+
[1, 2, 3, 4, 5, 6, 7, 8, 9].forEach((i) => {
|
|
694
|
+
expose.withFeature(exposes.numeric(`${day}_temp_${i}`, ea.ALL).withValueMin(0.5)
|
|
695
|
+
.withValueMax(29.5).withValueStep(0.5).withUnit('°C').withDescription(`Temperature ${i}`));
|
|
696
|
+
expose.withFeature(exposes.enum(`${day}_hour_${i}`, ea.STATE_SET,
|
|
697
|
+
['00', '01', '02', '03', '04', '05', '06', '07', '08', '09',
|
|
698
|
+
'10', '11', '12', '13', '14', '15', '16', '17', '18', '19',
|
|
699
|
+
'20', '21', '22', '23', '24']).withDescription(`Hour TO for temp ${i}`));
|
|
700
|
+
expose.withFeature(exposes.enum(`${day}_minute_${i}`, ea.STATE_SET, ['00', '15', '30', '45'])
|
|
701
|
+
.withDescription(`Minute TO for temp ${i}`));
|
|
702
|
+
});
|
|
703
|
+
return expose;
|
|
704
|
+
}),
|
|
705
|
+
],
|
|
706
|
+
},
|
|
304
707
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -756,7 +756,6 @@ module.exports = [
|
|
|
756
756
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ckud7u2l'},
|
|
757
757
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ywdxldoj'},
|
|
758
758
|
{modelID: 'TS0601', manufacturerName: '_TZE200_cwnjrr72'},
|
|
759
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_chyvmhay'},
|
|
760
759
|
{modelID: 'TS0601', manufacturerName: '_TZE200_pvvbommb'},
|
|
761
760
|
{modelID: 'TS0601', manufacturerName: '_TZE200_2atgpdho'}, // HY367
|
|
762
761
|
],
|
|
@@ -1000,7 +999,9 @@ module.exports = [
|
|
|
1000
999
|
.withDescription('Recover state after power outage')],
|
|
1001
1000
|
},
|
|
1002
1001
|
{
|
|
1003
|
-
fingerprint: [
|
|
1002
|
+
fingerprint: [
|
|
1003
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_hyfvrar3'},
|
|
1004
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_cymsnfvf'}],
|
|
1004
1005
|
model: 'TS011F_plug_2',
|
|
1005
1006
|
description: 'Smart plug (without power monitoring)',
|
|
1006
1007
|
vendor: 'TuYa',
|
package/devices/xiaomi.js
CHANGED
|
@@ -108,8 +108,9 @@ module.exports = [
|
|
|
108
108
|
zigbeeModel: ['lumi.light.cwjwcn01'],
|
|
109
109
|
model: 'JWSP001A',
|
|
110
110
|
vendor: 'Xiaomi',
|
|
111
|
-
description: '
|
|
112
|
-
extend: xiaomiExtend.light_onoff_brightness_colortemp({
|
|
111
|
+
description: 'Jiawen LED Driver & Dimmer',
|
|
112
|
+
extend: xiaomiExtend.light_onoff_brightness_colortemp({disableEffect: true, disableColorTempStartup: true,
|
|
113
|
+
colorTempRange: [153, 370]}),
|
|
113
114
|
},
|
|
114
115
|
{
|
|
115
116
|
zigbeeModel: ['lumi.light.cwjwcn02'],
|
|
@@ -1605,8 +1606,8 @@ module.exports = [
|
|
|
1605
1606
|
model: 'QBKG41LM',
|
|
1606
1607
|
vendor: 'Xiaomi',
|
|
1607
1608
|
description: 'Aqara E1 2 gang switch (with neutral)',
|
|
1608
|
-
fromZigbee: [fz.on_off, fz.
|
|
1609
|
-
toZigbee: [tz.on_off, tz.
|
|
1609
|
+
fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.xiaomi_switch_opple_basic],
|
|
1610
|
+
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory],
|
|
1610
1611
|
meta: {multiEndpoint: true},
|
|
1611
1612
|
endpoint: (device) => {
|
|
1612
1613
|
return {'left': 1, 'right': 2};
|
|
@@ -1624,11 +1625,9 @@ module.exports = [
|
|
|
1624
1625
|
],
|
|
1625
1626
|
onEvent: preventReset,
|
|
1626
1627
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1627
|
-
|
|
1628
|
-
// set "event" mode
|
|
1629
|
-
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f,
|
|
1630
|
-
disableDefaultResponse: true, disableResponse: true});
|
|
1628
|
+
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
1631
1629
|
},
|
|
1630
|
+
ota: ota.zigbeeOTA,
|
|
1632
1631
|
},
|
|
1633
1632
|
{
|
|
1634
1633
|
zigbeeModel: ['lumi.plug.macn01'],
|
package/npm-shrinkwrap.json
CHANGED