zigbee-herdsman-converters 15.0.54 → 15.0.55
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 +9 -9
- package/devices/heiman.js +3 -3
- package/devices/ikea.js +26 -0
- package/devices/ledvance.js +7 -0
- package/devices/lidl.js +7 -10
- package/devices/miboxer.js +1 -1
- package/devices/tuya.js +28 -0
- package/devices/xiaomi.js +1 -1
- package/lib/tuya.js +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -408,6 +408,15 @@ const converters = {
|
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
},
|
|
411
|
+
pm25: {
|
|
412
|
+
cluster: 'pm25Measurement',
|
|
413
|
+
type: ['attributeReport', 'readResponse'],
|
|
414
|
+
convert: (model, msg, publish, options, meta) => {
|
|
415
|
+
if (msg.data['measuredValue']) {
|
|
416
|
+
return {pm25: msg.data['measuredValue']};
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
},
|
|
411
420
|
soil_moisture: {
|
|
412
421
|
cluster: 'msSoilMoisture',
|
|
413
422
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -5926,15 +5935,6 @@ const converters = {
|
|
|
5926
5935
|
};
|
|
5927
5936
|
},
|
|
5928
5937
|
},
|
|
5929
|
-
heiman_pm25: {
|
|
5930
|
-
cluster: 'heimanSpecificPM25Measurement',
|
|
5931
|
-
type: ['attributeReport', 'readResponse'],
|
|
5932
|
-
convert: (model, msg, publish, options, meta) => {
|
|
5933
|
-
if (msg.data['measuredValue']) {
|
|
5934
|
-
return {pm25: msg.data['measuredValue']};
|
|
5935
|
-
}
|
|
5936
|
-
},
|
|
5937
|
-
},
|
|
5938
5938
|
heiman_hcho: {
|
|
5939
5939
|
cluster: 'heimanSpecificFormaldehydeMeasurement',
|
|
5940
5940
|
type: ['attributeReport', 'readResponse'],
|
package/devices/heiman.js
CHANGED
|
@@ -557,14 +557,14 @@ module.exports = [
|
|
|
557
557
|
model: 'HS2AQ-EM',
|
|
558
558
|
vendor: 'HEIMAN',
|
|
559
559
|
description: 'Air quality monitor',
|
|
560
|
-
fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.
|
|
560
|
+
fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.pm25, fz.heiman_hcho, fz.heiman_air_quality],
|
|
561
561
|
toZigbee: [],
|
|
562
562
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
563
563
|
const heiman = {
|
|
564
564
|
configureReporting: {
|
|
565
565
|
pm25MeasuredValue: async (endpoint, overrides) => {
|
|
566
566
|
const payload = reporting.payload('measuredValue', 0, constants.repInterval.HOUR, 1, overrides);
|
|
567
|
-
await endpoint.configureReporting('
|
|
567
|
+
await endpoint.configureReporting('pm25Measurement', payload);
|
|
568
568
|
},
|
|
569
569
|
formAldehydeMeasuredValue: async (endpoint, overrides) => {
|
|
570
570
|
const payload = reporting.payload('measuredValue', 0, constants.repInterval.HOUR, 1, overrides);
|
|
@@ -591,7 +591,7 @@ module.exports = [
|
|
|
591
591
|
|
|
592
592
|
const endpoint = device.getEndpoint(1);
|
|
593
593
|
await reporting.bind(endpoint, coordinatorEndpoint, [
|
|
594
|
-
'genPowerCfg', 'genTime', 'msTemperatureMeasurement', 'msRelativeHumidity', '
|
|
594
|
+
'genPowerCfg', 'genTime', 'msTemperatureMeasurement', 'msRelativeHumidity', 'pm25Measurement',
|
|
595
595
|
'heimanSpecificFormaldehydeMeasurement', 'heimanSpecificAirQuality']);
|
|
596
596
|
|
|
597
597
|
await reporting.batteryPercentageRemaining(endpoint);
|
package/devices/ikea.js
CHANGED
|
@@ -1025,4 +1025,30 @@ module.exports = [
|
|
|
1025
1025
|
description: 'PILSKOTT LED floor lamp',
|
|
1026
1026
|
extend: tradfriExtend.light_onoff_brightness(),
|
|
1027
1027
|
},
|
|
1028
|
+
{
|
|
1029
|
+
zigbeeModel: ['VINDSTYRKA'],
|
|
1030
|
+
model: 'E2112',
|
|
1031
|
+
vendor: 'IKEA',
|
|
1032
|
+
description: 'Vindstyrka air quality and humidity sensor',
|
|
1033
|
+
fromZigbee: [fz.temperature, fz.humidity, fz.pm25],
|
|
1034
|
+
toZigbee: [],
|
|
1035
|
+
exposes: [e.temperature(), e.humidity(), e.pm25()],
|
|
1036
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1037
|
+
const ep = device.getEndpoint(1);
|
|
1038
|
+
await reporting.bind(ep, coordinatorEndpoint,
|
|
1039
|
+
['msTemperatureMeasurement', 'msRelativeHumidity', 'pm25Measurement']);
|
|
1040
|
+
await ep.configureReporting('msTemperatureMeasurement', [{
|
|
1041
|
+
attribute: 'measuredValue',
|
|
1042
|
+
minimumReportInterval: 60, maximumReportInterval: 120,
|
|
1043
|
+
}]);
|
|
1044
|
+
await ep.configureReporting('msRelativeHumidity', [{
|
|
1045
|
+
attribute: 'measuredValue',
|
|
1046
|
+
minimumReportInterval: 60, maximumReportInterval: 120,
|
|
1047
|
+
}]);
|
|
1048
|
+
await ep.configureReporting('pm25Measurement', [{
|
|
1049
|
+
attribute: 'measuredValueIkea',
|
|
1050
|
+
minimumReportInterval: 60, maximumReportInterval: 120, reportableChange: 2,
|
|
1051
|
+
}]);
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1028
1054
|
];
|
package/devices/ledvance.js
CHANGED
|
@@ -35,6 +35,13 @@ module.exports = [
|
|
|
35
35
|
extend: extend.ledvance.light_onoff_brightness_colortemp(),
|
|
36
36
|
ota: ota.ledvance,
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
zigbeeModel: ['Panel Light 2x2 TW'],
|
|
40
|
+
model: '74746',
|
|
41
|
+
vendor: 'LEDVANCE',
|
|
42
|
+
description: 'LEDVANCE 74746 Sylvania smart+ Zigbee dimmable edge-lit panel',
|
|
43
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [200, 370]}),
|
|
44
|
+
},
|
|
38
45
|
{
|
|
39
46
|
zigbeeModel: ['Panel TW 620 UGR19'],
|
|
40
47
|
model: 'GPDRPLOP401100CE',
|
package/devices/lidl.js
CHANGED
|
@@ -152,7 +152,7 @@ const tzLocal = {
|
|
|
152
152
|
const newState = {};
|
|
153
153
|
|
|
154
154
|
// The color mode encodes whether the light is using its white LEDs or its color LEDs
|
|
155
|
-
let colorMode = meta.state.color_mode
|
|
155
|
+
let colorMode = meta.state.color_mode ?? ColorMode.ColorTemp;
|
|
156
156
|
|
|
157
157
|
// Color mode switching is done by setting color temperature (switch to white LEDs) or setting color (switch
|
|
158
158
|
// to color LEDs)
|
|
@@ -162,12 +162,9 @@ const tzLocal = {
|
|
|
162
162
|
if (colorMode != meta.state.color_mode) {
|
|
163
163
|
newState.color_mode = colorMode;
|
|
164
164
|
|
|
165
|
-
//
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (colorMode == ColorMode.HS) {
|
|
169
|
-
await entity.command('lightingColorCtrl', 'tuyaRgbMode', {enable: 1}, {}, {disableDefaultResponse: true});
|
|
170
|
-
}
|
|
165
|
+
// To switch between white mode and color mode, we have to send a special command:
|
|
166
|
+
const rgbMode = (colorMode == ColorMode.HS);
|
|
167
|
+
await entity.command('lightingColorCtrl', 'tuyaRgbMode', {enable: rgbMode}, {}, {disableDefaultResponse: true});
|
|
171
168
|
}
|
|
172
169
|
|
|
173
170
|
// A transition time of 0 would be treated as about 1 second, probably some kind of fallback/default
|
|
@@ -195,9 +192,9 @@ const tzLocal = {
|
|
|
195
192
|
|
|
196
193
|
// Load current state or defaults
|
|
197
194
|
const newSettings = {
|
|
198
|
-
brightness: meta.state.brightness
|
|
199
|
-
hue: (meta.state.color
|
|
200
|
-
saturation: (meta.state.color
|
|
195
|
+
brightness: meta.state.brightness ?? 254, // full brightness
|
|
196
|
+
hue: (meta.state.color ?? {}).h ?? 0, // red
|
|
197
|
+
saturation: (meta.state.color ?? {}).s ?? 100, // full saturation
|
|
201
198
|
};
|
|
202
199
|
|
|
203
200
|
// Apply changes
|
package/devices/miboxer.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = [
|
|
|
36
36
|
model: 'FUT035Z',
|
|
37
37
|
description: 'Dual white LED controller',
|
|
38
38
|
vendor: 'Miboxer',
|
|
39
|
-
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500]}),
|
|
39
|
+
extend: tuya.extend.light_onoff_brightness_colortemp({colorTempRange: [153, 500], disablePowerOnBehavior: true}),
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
fingerprint: [{modelID: 'TS0504B', manufacturerName: '_TZ3210_ttkgurpb'}],
|
package/devices/tuya.js
CHANGED
|
@@ -2133,6 +2133,7 @@ module.exports = [
|
|
|
2133
2133
|
{modelID: 'TS0601', manufacturerName: '_TZE200_5sbebbzs'},
|
|
2134
2134
|
{modelID: 'TS0601', manufacturerName: '_TZE200_udank5zs'},
|
|
2135
2135
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zuz7f94z'},
|
|
2136
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_nv6nxo0c'},
|
|
2136
2137
|
{modelID: 'TS0601', manufacturerName: '_TZE200_68nvbio9'},
|
|
2137
2138
|
{modelID: 'TS0601', manufacturerName: '_TZE200_3ylew7b4'},
|
|
2138
2139
|
{modelID: 'TS0601', manufacturerName: '_TZE200_llm0epxg'},
|
|
@@ -4114,4 +4115,31 @@ module.exports = [
|
|
|
4114
4115
|
],
|
|
4115
4116
|
},
|
|
4116
4117
|
},
|
|
4118
|
+
{
|
|
4119
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_r32ctezx']),
|
|
4120
|
+
model: 'TS0601_fan_switch',
|
|
4121
|
+
vendor: 'TuYa',
|
|
4122
|
+
description: 'Fan switch',
|
|
4123
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
4124
|
+
toZigbee: [tuya.tz.datapoints],
|
|
4125
|
+
configure: tuya.configureMagicPacket,
|
|
4126
|
+
exposes: [
|
|
4127
|
+
tuya.exposes.switch(), e.power_on_behavior(['off', 'on']).withAccess(ea.STATE_SET),
|
|
4128
|
+
tuya.exposes.countdown().withValueMin(0).withValueMax(43200).withUnit('s').withDescription('Max ON time in seconds'),
|
|
4129
|
+
exposes.numeric('fan_speed', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
|
|
4130
|
+
.withDescription('Speed off the fan'),
|
|
4131
|
+
],
|
|
4132
|
+
meta: {
|
|
4133
|
+
tuyaDatapoints: [
|
|
4134
|
+
[1, 'state', tuya.valueConverter.onOff],
|
|
4135
|
+
[2, 'countdown', tuya.valueConverter.countdown],
|
|
4136
|
+
[3, 'fan_speed', tuya.valueConverterBasic
|
|
4137
|
+
.lookup({'1': tuya.enum(0), '2': tuya.enum(1), '3': tuya.enum(2), '4': tuya.enum(3), '5': tuya.enum(4)})],
|
|
4138
|
+
[11, 'power_on_behavior', tuya.valueConverterBasic.lookup({'off': tuya.enum(0), 'on': tuya.enum(1)})],
|
|
4139
|
+
],
|
|
4140
|
+
},
|
|
4141
|
+
whiteLabel: [
|
|
4142
|
+
{vendor: 'Lerlink', model: 'T2-Z67/T2-W67'},
|
|
4143
|
+
],
|
|
4144
|
+
},
|
|
4117
4145
|
];
|
package/devices/xiaomi.js
CHANGED
|
@@ -68,7 +68,7 @@ const fzLocal = {
|
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
aqara_s1_pm25: {
|
|
71
|
-
cluster: '
|
|
71
|
+
cluster: 'pm25Measurement',
|
|
72
72
|
type: ['attributeReport', 'readResponse'],
|
|
73
73
|
convert: (model, msg, publish, options, meta) => {
|
|
74
74
|
if (msg.data['measuredValue']) {
|
package/lib/tuya.js
CHANGED
|
@@ -1615,7 +1615,7 @@ const tuyaTz = {
|
|
|
1615
1615
|
'week_schedule_programming', 'online', 'holiday_mode_date', 'schedule', 'schedule_monday', 'schedule_tuesday',
|
|
1616
1616
|
'schedule_wednesday', 'schedule_thursday', 'schedule_friday', 'schedule_saturday', 'schedule_sunday', 'clear_fault',
|
|
1617
1617
|
'scale_protection', 'error', 'radar_scene', 'radar_sensitivity', 'tumble_alarm_time', 'tumble_switch', 'fall_sensitivity',
|
|
1618
|
-
'min_temperature', 'max_temperature', 'window_detection', 'boost_heating', 'alarm_ringtone', 'alarm_time',
|
|
1618
|
+
'min_temperature', 'max_temperature', 'window_detection', 'boost_heating', 'alarm_ringtone', 'alarm_time', 'fan_speed',
|
|
1619
1619
|
],
|
|
1620
1620
|
convertSet: async (entity, key, value, meta) => {
|
|
1621
1621
|
// A set converter is only called once; therefore we need to loop
|