zigbee-herdsman-converters 14.0.677 → 14.0.678
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 +203 -7
- package/devices/innr.js +8 -0
- package/devices/ledvance.js +13 -0
- package/devices/owon.js +16 -0
- package/devices/philips.js +3 -0
- package/devices/schneider_electric.js +14 -7
- package/devices/tuya.js +1 -0
- package/package.json +1 -1
package/devices/bosch.js
CHANGED
|
@@ -1,10 +1,176 @@
|
|
|
1
|
+
const herdsman = require('zigbee-herdsman');
|
|
1
2
|
const exposes = require('../lib/exposes');
|
|
2
3
|
const fz = require('../converters/fromZigbee');
|
|
3
4
|
const tz = require('../converters/toZigbee');
|
|
4
5
|
const reporting = require('../lib/reporting');
|
|
6
|
+
const utils = require('../lib/utils');
|
|
5
7
|
const e = exposes.presets;
|
|
8
|
+
const ea = exposes.access;
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
// Radiator Thermostat II
|
|
11
|
+
const boschManufacturer = {manufacturerCode: 0x1209};
|
|
12
|
+
|
|
13
|
+
// Radiator Thermostat II
|
|
14
|
+
const operatingModes = {
|
|
15
|
+
'automatic': 0,
|
|
16
|
+
'manual': 1,
|
|
17
|
+
'pause': 5,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Radiator Thermostat II
|
|
21
|
+
const stateOffOn = {
|
|
22
|
+
'OFF': 0,
|
|
23
|
+
'ON': 1,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Radiator Thermostat II
|
|
27
|
+
const displayOrientation = {
|
|
28
|
+
'normal': 0,
|
|
29
|
+
'flipped': 1,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Radiator Thermostat II
|
|
33
|
+
const tzLocal = {
|
|
34
|
+
bosch_thermostat: {
|
|
35
|
+
key: ['window_open', 'boost', 'system_mode'],
|
|
36
|
+
convertSet: async (entity, key, value, meta) => {
|
|
37
|
+
if (key === 'window_open') {
|
|
38
|
+
value = value.toUpperCase();
|
|
39
|
+
utils.validateValue(value, Object.keys(stateOffOn));
|
|
40
|
+
const index = stateOffOn[value];
|
|
41
|
+
await entity.write('hvacThermostat', {0x4042: {value: index, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
42
|
+
return {state: {window_open: value}};
|
|
43
|
+
}
|
|
44
|
+
if (key === 'boost') {
|
|
45
|
+
value = value.toUpperCase();
|
|
46
|
+
utils.validateValue(value, Object.keys(stateOffOn));
|
|
47
|
+
const index = stateOffOn[value];
|
|
48
|
+
await entity.write('hvacThermostat', {0x4043: {value: index, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
49
|
+
return {state: {boost: value}};
|
|
50
|
+
}
|
|
51
|
+
if (key === 'system_mode') {
|
|
52
|
+
// Map system_mode (Off/Auto/Heat) to Boschg operating mode
|
|
53
|
+
value = value.toLowerCase();
|
|
54
|
+
|
|
55
|
+
let opMode = operatingModes.manual; // OperatingMode 1 = Manual (Default)
|
|
56
|
+
|
|
57
|
+
if (value=='off') {
|
|
58
|
+
opMode = operatingModes.pause; // OperatingMode 5 = Pause
|
|
59
|
+
} else if (value == 'auto') {
|
|
60
|
+
opMode = operatingModes.automatic; // OperatingMOde 1 = Automatic
|
|
61
|
+
}
|
|
62
|
+
await entity.write('hvacThermostat', {0x4007: {value: opMode, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
63
|
+
return {state: {system_mode: value}};
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
convertGet: async (entity, key, meta) => {
|
|
67
|
+
switch (key) {
|
|
68
|
+
case 'window_open':
|
|
69
|
+
await entity.read('hvacThermostat', [0x4042], boschManufacturer);
|
|
70
|
+
break;
|
|
71
|
+
case 'boost':
|
|
72
|
+
await entity.read('hvacThermostat', [0x4043], boschManufacturer);
|
|
73
|
+
break;
|
|
74
|
+
case 'system_mode':
|
|
75
|
+
await entity.read('hvacThermostat', [0x4007], boschManufacturer);
|
|
76
|
+
break;
|
|
77
|
+
|
|
78
|
+
default: // Unknown key
|
|
79
|
+
throw new Error(`Unhandled key toZigbee.bosch_thermostat.convertGet ${key}`);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
bosch_userInterface: {
|
|
84
|
+
key: ['display_orientation', 'display_ontime', 'display_brightness', 'child_lock'],
|
|
85
|
+
convertSet: async (entity, key, value, meta) => {
|
|
86
|
+
if (key === 'display_orientation') {
|
|
87
|
+
const index = displayOrientation[value];
|
|
88
|
+
await entity.write('hvacUserInterfaceCfg', {0x400b: {value: index, type: herdsman.Zcl.DataType.uint8}}, boschManufacturer);
|
|
89
|
+
return {state: {display_orientation: value}};
|
|
90
|
+
}
|
|
91
|
+
if (key === 'display_ontime') {
|
|
92
|
+
await entity.write('hvacUserInterfaceCfg', {0x403a: {value: value, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
93
|
+
return {state: {display_onTime: value}};
|
|
94
|
+
}
|
|
95
|
+
if (key === 'display_brightness') {
|
|
96
|
+
await entity.write('hvacUserInterfaceCfg', {0x403b: {value: value, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
|
|
97
|
+
return {state: {display_brightness: value}};
|
|
98
|
+
}
|
|
99
|
+
if (key === 'child_lock') {
|
|
100
|
+
const keypadLockout = Number(value === 'LOCK');
|
|
101
|
+
await entity.write('hvacUserInterfaceCfg', {keypadLockout});
|
|
102
|
+
return {state: {child_lock: value}};
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
convertGet: async (entity, key, meta) => {
|
|
106
|
+
switch (key) {
|
|
107
|
+
case 'display_orientation':
|
|
108
|
+
await entity.read('hvacUserInterfaceCfg', [0x400b], boschManufacturer);
|
|
109
|
+
break;
|
|
110
|
+
case 'display_ontime':
|
|
111
|
+
await entity.read('hvacUserInterfaceCfg', [0x403a], boschManufacturer);
|
|
112
|
+
break;
|
|
113
|
+
case 'display_brightness':
|
|
114
|
+
await entity.read('hvacUserInterfaceCfg', [0x403b], boschManufacturer);
|
|
115
|
+
break;
|
|
116
|
+
case 'child_lock':
|
|
117
|
+
await entity.read('hvacUserInterfaceCfg', ['keypadLockout']);
|
|
118
|
+
break;
|
|
119
|
+
default: // Unknown key
|
|
120
|
+
throw new Error(`Unhandled key toZigbee.bosch_userInterface.convertGet ${key}`);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
// Radiator Thermostat II
|
|
128
|
+
const fzLocal = {
|
|
129
|
+
bosch_thermostat: {
|
|
130
|
+
cluster: 'hvacThermostat',
|
|
131
|
+
type: ['attributeReport', 'readResponse'],
|
|
132
|
+
convert: (model, msg, publish, options, meta) => {
|
|
133
|
+
const result = {};
|
|
134
|
+
const data = msg.data;
|
|
135
|
+
if (data.hasOwnProperty(0x4042)) {
|
|
136
|
+
result.window_open = (Object.keys(stateOffOn)[data[0x4042]]);
|
|
137
|
+
}
|
|
138
|
+
if (data.hasOwnProperty(0x4043)) {
|
|
139
|
+
result.boost = (Object.keys(stateOffOn)[data[0x4043]]);
|
|
140
|
+
}
|
|
141
|
+
if (data.hasOwnProperty(0x4007)) {
|
|
142
|
+
const opModes = {0: 'auto', 1: 'heat', 2: 'unknowm 2', 3: 'unknonw 3', 4: 'unknown 4', 5: 'off'};
|
|
143
|
+
result.system_mode = opModes[data[0x4007]];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return result;
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
bosch_userInterface: {
|
|
150
|
+
cluster: 'hvacUserInterfaceCfg',
|
|
151
|
+
type: ['attributeReport', 'readResponse'],
|
|
152
|
+
convert: (model, msg, publish, options, meta) => {
|
|
153
|
+
const result = {};
|
|
154
|
+
const data = msg.data;
|
|
155
|
+
if (data.hasOwnProperty(0x400b)) {
|
|
156
|
+
result.display_orientation = (Object.keys(displayOrientation)[data[0x400b]]);
|
|
157
|
+
}
|
|
158
|
+
if (data.hasOwnProperty(0x403a)) {
|
|
159
|
+
result.display_ontime = data[0x403a];
|
|
160
|
+
}
|
|
161
|
+
if (data.hasOwnProperty(0x403b)) {
|
|
162
|
+
result.display_brightness = data[0x403b];
|
|
163
|
+
}
|
|
164
|
+
if (data.hasOwnProperty('keypadLockout')) {
|
|
165
|
+
result.child_lock = (data['keypadLockout'] == 1 ? 'LOCK' : 'UNLOCK');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return result;
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const definition = [
|
|
8
174
|
{
|
|
9
175
|
zigbeeModel: ['RFDL-ZB', 'RFDL-ZB-EU', 'RFDL-ZB-H', 'RFDL-ZB-K', 'RFDL-ZB-CHI', 'RFDL-ZB-MS', 'RFDL-ZB-ES', 'RFPR-ZB',
|
|
10
176
|
'RFPR-ZB-EU', 'RFPR-ZB-CHI', 'RFPR-ZB-ES', 'RFPR-ZB-MS'],
|
|
@@ -44,21 +210,51 @@ module.exports = [
|
|
|
44
210
|
model: 'BTH-RA',
|
|
45
211
|
vendor: 'Bosch',
|
|
46
212
|
description: 'Radiator thermostat II',
|
|
47
|
-
fromZigbee: [fz.thermostat, fz.battery],
|
|
48
|
-
toZigbee: [
|
|
213
|
+
fromZigbee: [fz.thermostat, fz.battery, fzLocal.bosch_thermostat, fzLocal.bosch_userInterface],
|
|
214
|
+
toZigbee: [
|
|
215
|
+
tz.thermostat_occupied_heating_setpoint,
|
|
216
|
+
tz.thermostat_local_temperature_calibration,
|
|
217
|
+
tz.thermostat_local_temperature,
|
|
218
|
+
tz.thermostat_keypad_lockout,
|
|
219
|
+
tzLocal.bosch_thermostat,
|
|
220
|
+
tzLocal.bosch_userInterface],
|
|
49
221
|
exposes: [
|
|
50
|
-
e.battery(),
|
|
51
222
|
exposes.climate()
|
|
52
|
-
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
|
|
53
223
|
.withLocalTemperature()
|
|
54
|
-
.
|
|
224
|
+
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
|
|
225
|
+
.withLocalTemperatureCalibration(-12, 12, 0.5)
|
|
226
|
+
.withSystemMode(['off', 'heat', 'auto']),
|
|
227
|
+
exposes.binary('boost', ea.ALL, 'ON', 'OFF')
|
|
228
|
+
.withDescription('Activate Boost heating'),
|
|
229
|
+
exposes.binary('window_open', ea.ALL, 'ON', 'OFF')
|
|
230
|
+
.withDescription('Window open'),
|
|
231
|
+
exposes.enum('display_orientation', ea.ALL, Object.keys(displayOrientation))
|
|
232
|
+
.withDescription('Display orientation'),
|
|
233
|
+
exposes.numeric('display_ontime', ea.ALL)
|
|
234
|
+
.withValueMin(5)
|
|
235
|
+
.withValueMax(30)
|
|
236
|
+
.withDescription('Specifies the diplay On-time'),
|
|
237
|
+
exposes.numeric('display_brightness', ea.ALL)
|
|
238
|
+
.withValueMin(0)
|
|
239
|
+
.withValueMax(10)
|
|
240
|
+
.withDescription('Specifies the brightness value of the display'),
|
|
241
|
+
e.child_lock().setAccess('state', ea.ALL),
|
|
242
|
+
e.battery(),
|
|
55
243
|
],
|
|
56
244
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
57
245
|
const endpoint = device.getEndpoint(1);
|
|
58
|
-
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat']);
|
|
246
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat', 'hvacUserInterfaceCfg']);
|
|
59
247
|
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
60
248
|
await reporting.thermostatTemperature(endpoint);
|
|
61
249
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
250
|
+
|
|
251
|
+
await endpoint.read('hvacThermostat', ['localTemperatureCalibration']);
|
|
252
|
+
await endpoint.read('hvacThermostat', [0x4007, 0x4042, 0x4043], boschManufacturer);
|
|
253
|
+
|
|
254
|
+
await endpoint.read('hvacUserInterfaceCfg', ['keypadLockout']);
|
|
255
|
+
await endpoint.read('hvacUserInterfaceCfg', [0x400b, 0x403a, 0x403b], boschManufacturer);
|
|
62
256
|
},
|
|
63
257
|
},
|
|
64
258
|
];
|
|
259
|
+
|
|
260
|
+
module.exports = definition;
|
package/devices/innr.js
CHANGED
|
@@ -621,6 +621,14 @@ module.exports = [
|
|
|
621
621
|
extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true}),
|
|
622
622
|
meta: {applyRedFix: true, turnsOffAtBrightness1: true},
|
|
623
623
|
},
|
|
624
|
+
{
|
|
625
|
+
zigbeeModel: ['OFL 142 C'],
|
|
626
|
+
model: 'OFL 142 C',
|
|
627
|
+
vendor: 'Innr',
|
|
628
|
+
description: 'Outdoor flex light colour LED strip 4m, 1440lm, RGBW',
|
|
629
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [100, 350], supportsHS: true}),
|
|
630
|
+
meta: {applyRedFix: true, turnsOffAtBrightness1: true},
|
|
631
|
+
},
|
|
624
632
|
{
|
|
625
633
|
zigbeeModel: ['OSL 130 C'],
|
|
626
634
|
model: 'OSL 130 C',
|
package/devices/ledvance.js
CHANGED
|
@@ -285,6 +285,19 @@ module.exports = [
|
|
|
285
285
|
await reporting.onOff(endpoint);
|
|
286
286
|
},
|
|
287
287
|
},
|
|
288
|
+
{
|
|
289
|
+
zigbeeModel: ['PLUG EU T'],
|
|
290
|
+
model: '4058075729261',
|
|
291
|
+
vendor: 'LEDVANCE',
|
|
292
|
+
description: 'SMART+ Plug EU',
|
|
293
|
+
extend: extend.switch(),
|
|
294
|
+
ota: ota.ledvance,
|
|
295
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
296
|
+
const endpoint = device.getEndpoint(1);
|
|
297
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
298
|
+
await reporting.onOff(endpoint);
|
|
299
|
+
},
|
|
300
|
+
},
|
|
288
301
|
{
|
|
289
302
|
zigbeeModel: ['PLUG OUTDOOR EU T'],
|
|
290
303
|
model: '4058075729308',
|
package/devices/owon.js
CHANGED
|
@@ -87,6 +87,22 @@ const fzLocal = {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
module.exports = [
|
|
90
|
+
{
|
|
91
|
+
zigbeeModel: ['WSP402'],
|
|
92
|
+
model: 'WSP402',
|
|
93
|
+
vendor: 'OWON',
|
|
94
|
+
description: 'Smart plug',
|
|
95
|
+
fromZigbee: [fz.on_off, fz.metering],
|
|
96
|
+
toZigbee: [tz.on_off],
|
|
97
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
98
|
+
const endpoint = device.getEndpoint(1);
|
|
99
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
100
|
+
await reporting.onOff(endpoint);
|
|
101
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
102
|
+
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2});
|
|
103
|
+
},
|
|
104
|
+
exposes: [e.switch(), e.power(), e.energy()],
|
|
105
|
+
},
|
|
90
106
|
{
|
|
91
107
|
zigbeeModel: ['WSP404'],
|
|
92
108
|
model: 'WSP404',
|
package/devices/philips.js
CHANGED
|
@@ -2933,6 +2933,9 @@ module.exports = [
|
|
|
2933
2933
|
model: '929003535301',
|
|
2934
2934
|
vendor: 'Philips',
|
|
2935
2935
|
description: 'Hue Festavia gradient light string 250',
|
|
2936
|
+
toZigbee: [tzLocal.gradient_scene, ...hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}).toZigbee],
|
|
2937
|
+
exposes: [exposes.enum('gradient_scene', ea.SET, Object.keys(gradientScenes)),
|
|
2938
|
+
...hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}).exposes],
|
|
2936
2939
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2937
2940
|
},
|
|
2938
2941
|
{
|
|
@@ -759,16 +759,23 @@ module.exports = [
|
|
|
759
759
|
zigbeeModel: ['FLS/SYSTEM-M/4'],
|
|
760
760
|
model: 'WDE002906',
|
|
761
761
|
vendor: 'Schneider Electric',
|
|
762
|
-
description: 'Wiser wireless switch 1-gang',
|
|
762
|
+
description: 'Wiser wireless switch 1-gang or 2-gang',
|
|
763
763
|
fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.battery],
|
|
764
764
|
toZigbee: [],
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
765
|
+
endpoint: (device) => {
|
|
766
|
+
return {'right': 21, 'left': 22};
|
|
767
|
+
},
|
|
768
|
+
meta: {multiEndpoint: true},
|
|
769
|
+
exposes: [e.action(['on_left', 'off_left', 'on_right', 'off_right', 'brightness_move_up_left', 'brightness_stop_left',
|
|
770
|
+
'brightness_move_down_left', 'brightness_stop_left', 'brightness_move_up_right', 'brightness_stop_right',
|
|
771
|
+
'brightness_move_down_right', 'brightness_stop_right']), e.battery()],
|
|
768
772
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
await reporting.
|
|
773
|
+
// When in 2-gang operation mode, unit operates out of endpoints 21 and 22, otherwise just 21
|
|
774
|
+
const leftButtonsEndpoint = device.getEndpoint(21);
|
|
775
|
+
await reporting.bind(leftButtonsEndpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'genPowerCfg']);
|
|
776
|
+
const rightButtonsEndpoint = device.getEndpoint(22);
|
|
777
|
+
await reporting.bind(rightButtonsEndpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
778
|
+
await reporting.batteryPercentageRemaining(leftButtonsEndpoint);
|
|
772
779
|
},
|
|
773
780
|
},
|
|
774
781
|
{
|
package/devices/tuya.js
CHANGED
|
@@ -2208,6 +2208,7 @@ module.exports = [
|
|
|
2208
2208
|
fingerprint: [
|
|
2209
2209
|
{modelID: 'TS0601', manufacturerName: '_TZE200_a4bpgplm'},
|
|
2210
2210
|
{modelID: 'TS0601', manufacturerName: '_TZE200_dv8abrrz'},
|
|
2211
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_z1tyspqw'},
|
|
2211
2212
|
],
|
|
2212
2213
|
model: 'TS0601_thermostat_1',
|
|
2213
2214
|
vendor: 'TuYa',
|