zigbee-herdsman-converters 15.0.54 → 15.0.56

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.
@@ -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'],
@@ -534,6 +534,26 @@ module.exports = [
534
534
  await reporting.batteryVoltage(endpoint38);
535
535
  },
536
536
  },
537
+ {
538
+ zigbeeModel: ['WISZB-138'],
539
+ model: 'WISZB-138',
540
+ vendor: 'Develco',
541
+ description: 'Window sensor',
542
+ fromZigbee: [fz.ias_contact_alarm_1, fz.battery, develco.fz.temperature],
543
+ toZigbee: [],
544
+ exposes: [e.contact(), e.battery(), e.battery_low(), e.temperature()],
545
+ meta: {battery: {voltageToPercentage: '3V_2500'}},
546
+ configure: async (device, coordinatorEndpoint, logger) => {
547
+ const endpoint35 = device.getEndpoint(35);
548
+ const endpoint38 = device.getEndpoint(38);
549
+ await reporting.bind(endpoint35, coordinatorEndpoint, ['genPowerCfg']);
550
+ await reporting.bind(endpoint38, coordinatorEndpoint, ['msTemperatureMeasurement']);
551
+ await reporting.batteryVoltage(endpoint35);
552
+ await reporting.temperature(endpoint38);
553
+
554
+ await develco.configure.read_sw_hw_version(device, logger);
555
+ },
556
+ },
537
557
  {
538
558
  zigbeeModel: ['MOSZB-130'],
539
559
  model: 'MOSZB-130',
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.heiman_pm25, fz.heiman_hcho, fz.heiman_air_quality],
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('heimanSpecificPM25Measurement', payload);
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', 'heimanSpecificPM25Measurement',
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
  ];
@@ -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 || ColorMode.ColorTemp;
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
- // We need to send a command to switch from white LEDs to color LEDs. We don't need to send one to
166
- // switch back because the color LEDs are automatically turned off by the moveToColorTemp and
167
- // moveToLevel commands.
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 || 254, // full brightness
199
- hue: (meta.state.color || {}).h || 0, // red
200
- saturation: (meta.state.color || {}).s || 100, // full saturation
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
@@ -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
@@ -117,6 +117,22 @@ const tzLocal = {
117
117
  }
118
118
  },
119
119
  },
120
+ TS0224: {
121
+ key: ['light', 'duration', 'volume'],
122
+ convertSet: async (entity, key, value, meta) => {
123
+ if (key === 'light') {
124
+ await entity.command('genOnOff', value.toLowerCase() === 'on' ? 'on' : 'off', {}, utils.getOptions(meta.mapped, entity));
125
+ } else if (key === 'duration') {
126
+ await entity.write('ssIasWd', {'maxDuration': value}, utils.getOptions(meta.mapped, entity));
127
+ } else if (key === 'volume') {
128
+ const lookup = {'mute': 0, 'low': 10, 'medium': 30, 'high': 50};
129
+ value = value.toLowerCase();
130
+ utils.validateValue(value, Object.keys(lookup));
131
+ await entity.write('ssIasWd', {0x0002: {value: lookup[value], type: 0x0a}}, utils.getOptions(meta.mapped, entity));
132
+ }
133
+ return {state: {[key]: value}};
134
+ },
135
+ },
120
136
  power_on_behavior: {
121
137
  key: ['power_on_behavior'],
122
138
  convertSet: async (entity, key, value, meta) => {
@@ -2115,6 +2131,7 @@ module.exports = [
2115
2131
  {modelID: 'TS0601', manufacturerName: '_TZE200_cowvfni3'},
2116
2132
  {modelID: 'TS0601', manufacturerName: '_TZE200_rddyvrci'},
2117
2133
  {modelID: 'TS0601', manufacturerName: '_TZE200_nueqqe6k'},
2134
+ {modelID: 'TS0601', manufacturerName: '_TZE200_bqcqqjpb'},
2118
2135
  {modelID: 'TS0601', manufacturerName: '_TZE200_xaabybja'},
2119
2136
  {modelID: 'TS0601', manufacturerName: '_TZE200_rmymn92d'},
2120
2137
  {modelID: 'TS0601', manufacturerName: '_TZE200_3i3exuay'},
@@ -2133,6 +2150,7 @@ module.exports = [
2133
2150
  {modelID: 'TS0601', manufacturerName: '_TZE200_5sbebbzs'},
2134
2151
  {modelID: 'TS0601', manufacturerName: '_TZE200_udank5zs'},
2135
2152
  {modelID: 'TS0601', manufacturerName: '_TZE200_zuz7f94z'},
2153
+ {modelID: 'TS0601', manufacturerName: '_TZE200_nv6nxo0c'},
2136
2154
  {modelID: 'TS0601', manufacturerName: '_TZE200_68nvbio9'},
2137
2155
  {modelID: 'TS0601', manufacturerName: '_TZE200_3ylew7b4'},
2138
2156
  {modelID: 'TS0601', manufacturerName: '_TZE200_llm0epxg'},
@@ -4114,4 +4132,46 @@ module.exports = [
4114
4132
  ],
4115
4133
  },
4116
4134
  },
4135
+ {
4136
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_r32ctezx']),
4137
+ model: 'TS0601_fan_switch',
4138
+ vendor: 'TuYa',
4139
+ description: 'Fan switch',
4140
+ fromZigbee: [tuya.fz.datapoints],
4141
+ toZigbee: [tuya.tz.datapoints],
4142
+ configure: tuya.configureMagicPacket,
4143
+ exposes: [
4144
+ tuya.exposes.switch(), e.power_on_behavior(['off', 'on']).withAccess(ea.STATE_SET),
4145
+ tuya.exposes.countdown().withValueMin(0).withValueMax(43200).withUnit('s').withDescription('Max ON time in seconds'),
4146
+ exposes.numeric('fan_speed', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
4147
+ .withDescription('Speed off the fan'),
4148
+ ],
4149
+ meta: {
4150
+ tuyaDatapoints: [
4151
+ [1, 'state', tuya.valueConverter.onOff],
4152
+ [2, 'countdown', tuya.valueConverter.countdown],
4153
+ [3, 'fan_speed', tuya.valueConverterBasic
4154
+ .lookup({'1': tuya.enum(0), '2': tuya.enum(1), '3': tuya.enum(2), '4': tuya.enum(3), '5': tuya.enum(4)})],
4155
+ [11, 'power_on_behavior', tuya.valueConverterBasic.lookup({'off': tuya.enum(0), 'on': tuya.enum(1)})],
4156
+ ],
4157
+ },
4158
+ whiteLabel: [
4159
+ {vendor: 'Lerlink', model: 'T2-Z67/T2-W67'},
4160
+ ],
4161
+ },
4162
+ {
4163
+ zigbeeModel: ['TS0224'],
4164
+ model: 'TS0224',
4165
+ vendor: 'TuYa',
4166
+ description: 'Smart light & sound siren',
4167
+ fromZigbee: [],
4168
+ toZigbee: [tz.warning, tzLocal.TS0224],
4169
+ exposes: [e.warning(),
4170
+ exposes.binary('light', ea.STATE_SET, 'ON', 'OFF').withDescription('Turn the light of the alarm ON/OFF'),
4171
+ exposes.numeric('duration', ea.STATE_SET).withValueMin(60).withValueMax(3600).withValueStep(1).withUnit('s')
4172
+ .withDescription('Duration of the alarm'),
4173
+ exposes.enum('volume', ea.STATE_SET, ['mute', 'low', 'medium', 'high'])
4174
+ .withDescription('Volume of the alarm'),
4175
+ ],
4176
+ },
4117
4177
  ];
package/devices/xiaomi.js CHANGED
@@ -68,7 +68,7 @@ const fzLocal = {
68
68
  },
69
69
  },
70
70
  aqara_s1_pm25: {
71
- cluster: 'heimanSpecificPM25Measurement',
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "15.0.54",
3
+ "version": "15.0.56",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
36
36
  "dependencies": {
37
- "axios": "^1.3.3",
37
+ "axios": "^1.3.4",
38
38
  "buffer-crc32": "^0.2.13",
39
39
  "https-proxy-agent": "^5.0.1",
40
40
  "tar-stream": "^3.0.0",
41
- "zigbee-herdsman": "^0.14.93"
41
+ "zigbee-herdsman": "^0.14.95"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint": "*",