zigbee-herdsman-converters 15.0.84 → 15.0.85
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/bosch.js +45 -5
- package/devices/namron.js +10 -1
- package/devices/tuya.js +9 -1
- package/devices/xiaomi.js +8 -0
- package/package.json +1 -1
package/devices/bosch.js
CHANGED
|
@@ -46,6 +46,12 @@ const displayOrientation = {
|
|
|
46
46
|
'flipped': 1,
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
+
// Radiator Thermostat II
|
|
50
|
+
const displayedTemperature = {
|
|
51
|
+
'target': 0,
|
|
52
|
+
'measured': 1,
|
|
53
|
+
};
|
|
54
|
+
|
|
49
55
|
// Radiator Thermostat II
|
|
50
56
|
const tzLocal = {
|
|
51
57
|
bwa1: {
|
|
@@ -69,7 +75,7 @@ const tzLocal = {
|
|
|
69
75
|
},
|
|
70
76
|
},
|
|
71
77
|
bosch_thermostat: {
|
|
72
|
-
key: ['window_open', 'boost', 'system_mode', 'pi_heating_demand'],
|
|
78
|
+
key: ['window_open', 'boost', 'system_mode', 'pi_heating_demand', 'remote_temperature'],
|
|
73
79
|
convertSet: async (entity, key, value, meta) => {
|
|
74
80
|
if (key === 'window_open') {
|
|
75
81
|
value = value.toUpperCase();
|
|
@@ -105,6 +111,12 @@ const tzLocal = {
|
|
|
105
111
|
boschManufacturer);
|
|
106
112
|
return {state: {pi_heating_demand: value}};
|
|
107
113
|
}
|
|
114
|
+
if (key === 'remote_temperature') {
|
|
115
|
+
const remoteTemperature = (Math.round((value * 2).toFixed(1)) / 2).toFixed(1) * 100;
|
|
116
|
+
await entity.write('hvacThermostat',
|
|
117
|
+
{0x4040: {value: remoteTemperature, type: herdsman.Zcl.DataType.int16}}, boschManufacturer);
|
|
118
|
+
return {state: {remote_temperature: value}};
|
|
119
|
+
}
|
|
108
120
|
},
|
|
109
121
|
convertGet: async (entity, key, meta) => {
|
|
110
122
|
switch (key) {
|
|
@@ -120,6 +132,9 @@ const tzLocal = {
|
|
|
120
132
|
case 'pi_heating_demand':
|
|
121
133
|
await entity.read('hvacThermostat', [0x4020], boschManufacturer);
|
|
122
134
|
break;
|
|
135
|
+
case 'remote_temperature':
|
|
136
|
+
await entity.read('hvacThermostat', [0x4040], boschManufacturer);
|
|
137
|
+
break;
|
|
123
138
|
|
|
124
139
|
default: // Unknown key
|
|
125
140
|
throw new Error(`Unhandled key toZigbee.bosch_thermostat.convertGet ${key}`);
|
|
@@ -127,7 +142,7 @@ const tzLocal = {
|
|
|
127
142
|
},
|
|
128
143
|
},
|
|
129
144
|
bosch_userInterface: {
|
|
130
|
-
key: ['display_orientation', 'display_ontime', 'display_brightness', 'child_lock'],
|
|
145
|
+
key: ['display_orientation', 'display_ontime', 'display_brightness', 'child_lock', 'displayed_temperature'],
|
|
131
146
|
convertSet: async (entity, key, value, meta) => {
|
|
132
147
|
if (key === 'display_orientation') {
|
|
133
148
|
const index = displayOrientation[value];
|
|
@@ -147,6 +162,11 @@ const tzLocal = {
|
|
|
147
162
|
await entity.write('hvacUserInterfaceCfg', {keypadLockout});
|
|
148
163
|
return {state: {child_lock: value}};
|
|
149
164
|
}
|
|
165
|
+
if (key === 'displayed_temperature') {
|
|
166
|
+
const index = displayedTemperature[value];
|
|
167
|
+
await entity.write('hvacUserInterfaceCfg', {0x4039: {value: index, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
168
|
+
return {state: {displayed_temperature: value}};
|
|
169
|
+
}
|
|
150
170
|
},
|
|
151
171
|
convertGet: async (entity, key, meta) => {
|
|
152
172
|
switch (key) {
|
|
@@ -162,6 +182,9 @@ const tzLocal = {
|
|
|
162
182
|
case 'child_lock':
|
|
163
183
|
await entity.read('hvacUserInterfaceCfg', ['keypadLockout']);
|
|
164
184
|
break;
|
|
185
|
+
case 'displayed_temperature':
|
|
186
|
+
await entity.read('hvacUserInterfaceCfg', [0x4039], boschManufacturer);
|
|
187
|
+
break;
|
|
165
188
|
default: // Unknown key
|
|
166
189
|
throw new Error(`Unhandled key toZigbee.bosch_userInterface.convertGet ${key}`);
|
|
167
190
|
}
|
|
@@ -281,6 +304,9 @@ const fzLocal = {
|
|
|
281
304
|
convert: (model, msg, publish, options, meta) => {
|
|
282
305
|
const result = {};
|
|
283
306
|
const data = msg.data;
|
|
307
|
+
if (data.hasOwnProperty(0x4040)) {
|
|
308
|
+
result.remote_temperature = utils.precisionRound(data[0x4040], 2) / 100;
|
|
309
|
+
}
|
|
284
310
|
if (data.hasOwnProperty(0x4042)) {
|
|
285
311
|
result.window_open = (Object.keys(stateOffOn)[data[0x4042]]);
|
|
286
312
|
}
|
|
@@ -293,6 +319,7 @@ const fzLocal = {
|
|
|
293
319
|
}
|
|
294
320
|
if (data.hasOwnProperty(0x4020)) {
|
|
295
321
|
result.pi_heating_demand = data[0x4020];
|
|
322
|
+
result.running_state = result.pi_heating_demand >= 10 ? 'heat' : 'idle';
|
|
296
323
|
}
|
|
297
324
|
|
|
298
325
|
return result;
|
|
@@ -307,6 +334,9 @@ const fzLocal = {
|
|
|
307
334
|
if (data.hasOwnProperty(0x400b)) {
|
|
308
335
|
result.display_orientation = (Object.keys(displayOrientation)[data[0x400b]]);
|
|
309
336
|
}
|
|
337
|
+
if (data.hasOwnProperty(0x4039)) {
|
|
338
|
+
result.displayed_temperature = (Object.keys(displayedTemperature)[data[0x4039]]);
|
|
339
|
+
}
|
|
310
340
|
if (data.hasOwnProperty(0x403a)) {
|
|
311
341
|
result.display_ontime = data[0x403a];
|
|
312
342
|
}
|
|
@@ -529,13 +559,21 @@ const definition = [
|
|
|
529
559
|
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
|
|
530
560
|
.withLocalTemperatureCalibration(-5, 5, 0.1)
|
|
531
561
|
.withSystemMode(['off', 'heat', 'auto'])
|
|
532
|
-
.withPiHeatingDemand(ea.ALL)
|
|
562
|
+
.withPiHeatingDemand(ea.ALL)
|
|
563
|
+
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
533
564
|
exposes.binary('boost', ea.ALL, 'ON', 'OFF')
|
|
534
565
|
.withDescription('Activate Boost heating'),
|
|
535
566
|
exposes.binary('window_open', ea.ALL, 'ON', 'OFF')
|
|
536
567
|
.withDescription('Window open'),
|
|
537
568
|
exposes.enum('display_orientation', ea.ALL, Object.keys(displayOrientation))
|
|
538
569
|
.withDescription('Display orientation'),
|
|
570
|
+
exposes.numeric('remote_temperature', ea.ALL)
|
|
571
|
+
.withValueMin(0)
|
|
572
|
+
.withValueMax(30)
|
|
573
|
+
.withValueStep(0.1)
|
|
574
|
+
.withUnit('°C')
|
|
575
|
+
.withDescription('Input for remote temperature sensor. ' +
|
|
576
|
+
'Setting this will disable the internal temperature sensor until batteries are removed!'),
|
|
539
577
|
exposes.numeric('display_ontime', ea.ALL)
|
|
540
578
|
.withValueMin(5)
|
|
541
579
|
.withValueMax(30)
|
|
@@ -544,6 +582,8 @@ const definition = [
|
|
|
544
582
|
.withValueMin(0)
|
|
545
583
|
.withValueMax(10)
|
|
546
584
|
.withDescription('Specifies the brightness value of the display'),
|
|
585
|
+
exposes.enum('displayed_temperature', ea.ALL, Object.keys(displayedTemperature))
|
|
586
|
+
.withDescription('Temperature displayed on the thermostat'),
|
|
547
587
|
e.child_lock().setAccess('state', ea.ALL),
|
|
548
588
|
e.battery(),
|
|
549
589
|
],
|
|
@@ -585,10 +625,10 @@ const definition = [
|
|
|
585
625
|
}], boschManufacturer);
|
|
586
626
|
|
|
587
627
|
await endpoint.read('hvacThermostat', ['localTemperatureCalibration']);
|
|
588
|
-
await endpoint.read('hvacThermostat', [0x4007, 0x4020, 0x4042, 0x4043], boschManufacturer);
|
|
628
|
+
await endpoint.read('hvacThermostat', [0x4007, 0x4020, 0x4040, 0x4042, 0x4043], boschManufacturer);
|
|
589
629
|
|
|
590
630
|
await endpoint.read('hvacUserInterfaceCfg', ['keypadLockout']);
|
|
591
|
-
await endpoint.read('hvacUserInterfaceCfg', [0x400b, 0x403a, 0x403b], boschManufacturer);
|
|
631
|
+
await endpoint.read('hvacUserInterfaceCfg', [0x400b, 0x4039, 0x403a, 0x403b], boschManufacturer);
|
|
592
632
|
},
|
|
593
633
|
},
|
|
594
634
|
{
|
package/devices/namron.js
CHANGED
|
@@ -217,7 +217,16 @@ module.exports = [
|
|
|
217
217
|
zigbeeModel: ['4512701'],
|
|
218
218
|
model: '4512701',
|
|
219
219
|
vendor: 'Namron',
|
|
220
|
-
description: 'Zigbee 1 channel switch K2',
|
|
220
|
+
description: 'Zigbee 1 channel switch K2 (White)',
|
|
221
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
222
|
+
exposes: [e.battery(), e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop'])],
|
|
223
|
+
toZigbee: [],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
zigbeeModel: ['4512728'],
|
|
227
|
+
model: '4512728',
|
|
228
|
+
vendor: 'Namron',
|
|
229
|
+
description: 'Zigbee 1 channel switch K2 (Black)',
|
|
221
230
|
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
|
|
222
231
|
exposes: [e.battery(), e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop'])],
|
|
223
232
|
toZigbee: [],
|
package/devices/tuya.js
CHANGED
|
@@ -1450,7 +1450,7 @@ module.exports = [
|
|
|
1450
1450
|
whiteLabel: [{vendor: 'LoraTap', model: 'SC400'}],
|
|
1451
1451
|
exposes: [e.cover_position(), exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
|
|
1452
1452
|
exposes.binary('calibration', ea.ALL, 'ON', 'OFF'), exposes.binary('motor_reversal', ea.ALL, 'ON', 'OFF'),
|
|
1453
|
-
exposes.enum('backlight_mode', ea.ALL, ['
|
|
1453
|
+
exposes.enum('backlight_mode', ea.ALL, ['low', 'medium', 'high']),
|
|
1454
1454
|
exposes.numeric('calibration_time', ea.STATE).withUnit('S').withDescription('Calibration time')],
|
|
1455
1455
|
},
|
|
1456
1456
|
{
|
|
@@ -3770,11 +3770,19 @@ module.exports = [
|
|
|
3770
3770
|
fromZigbee: [fz.tuya_remote],
|
|
3771
3771
|
toZigbee: [],
|
|
3772
3772
|
},
|
|
3773
|
+
{
|
|
3774
|
+
zigbeeModel: ['TS0052'],
|
|
3775
|
+
model: 'TS0052',
|
|
3776
|
+
vendor: 'TuYa',
|
|
3777
|
+
description: 'Zigbee dimmer module 1 channel',
|
|
3778
|
+
extend: tuya.extend.light_onoff_brightness({minBrightness: true}),
|
|
3779
|
+
},
|
|
3773
3780
|
{
|
|
3774
3781
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_ikvncluo'},
|
|
3775
3782
|
{modelID: 'TS0601', manufacturerName: '_TZE200_lyetpprm'},
|
|
3776
3783
|
{modelID: 'TS0601', manufacturerName: '_TZE200_jva8ink8'},
|
|
3777
3784
|
{modelID: 'TS0601', manufacturerName: '_TZE200_holel4dk'},
|
|
3785
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_xpq2rzhq'},
|
|
3778
3786
|
{modelID: 'TS0601', manufacturerName: '_TZE200_wukb7rhc'},
|
|
3779
3787
|
{modelID: 'TS0601', manufacturerName: '_TZE204_ztc6ggyl'},
|
|
3780
3788
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ztc6ggyl'}],
|
package/devices/xiaomi.js
CHANGED
|
@@ -2239,6 +2239,14 @@ module.exports = [
|
|
|
2239
2239
|
vendor: 'Xiaomi',
|
|
2240
2240
|
fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt],
|
|
2241
2241
|
toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
|
|
2242
|
+
onEvent: async (type, data, device) => {
|
|
2243
|
+
if (type === 'message' && data.type === 'attributeReport' && data.cluster === 'genBasic' &&
|
|
2244
|
+
data.data.hasOwnProperty('1028') && data.data['1028'] == 0) {
|
|
2245
|
+
// Try to read the position after the motor stops, the device occasionally report wrong data right after stopping
|
|
2246
|
+
// Might need to add delay, seems to be working without one but needs more tests.
|
|
2247
|
+
await device.getEndpoint(1).read('genAnalogOutput', ['presentValue']);
|
|
2248
|
+
}
|
|
2249
|
+
},
|
|
2242
2250
|
exposes: [e.cover_position().setAccess('state', ea.ALL),
|
|
2243
2251
|
exposes.binary('running', ea.STATE, true, false)
|
|
2244
2252
|
.withDescription('Whether the motor is moving or not'),
|