zigbee-herdsman-converters 14.0.690 → 14.0.692

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.
@@ -750,6 +750,7 @@ const converters = {
750
750
  {key: 'activePower', name: 'power', factor: 'acPower'},
751
751
  {key: 'activePowerPhB', name: 'power_phase_b', factor: 'acPower'},
752
752
  {key: 'activePowerPhC', name: 'power_phase_c', factor: 'acPower'},
753
+ {key: 'apparentPower', name: 'power_apparent', factor: 'acPower'},
753
754
  {key: 'rmsCurrent', name: 'current', factor: 'acCurrent'},
754
755
  {key: 'rmsCurrentPhB', name: 'current_phase_b', factor: 'acCurrent'},
755
756
  {key: 'rmsCurrentPhC', name: 'current_phase_c', factor: 'acCurrent'},
@@ -5448,6 +5449,9 @@ const converters = {
5448
5449
  61: 'all',
5449
5450
  };
5450
5451
  }
5452
+ if (['WS-USC02'].includes(model.model)) {
5453
+ buttonLookup = {41: 'top', 42: 'bottom', 51: 'both'};
5454
+ }
5451
5455
 
5452
5456
  const action = actionLookup[msg.data['presentValue']];
5453
5457
  if (buttonLookup) {
@@ -5724,8 +5728,9 @@ const converters = {
5724
5728
  type: ['attributeReport', 'readResponse'],
5725
5729
  options: [exposes.options.invert_cover()],
5726
5730
  convert: (model, msg, publish, options, meta) => {
5727
- if (model.model === 'ZNCLDJ12LM' && msg.type === 'attributeReport' && [0, 2].includes(msg.data['presentValue'])) {
5728
- // Incorrect reports from the device, ignore (re-read by onEvent of ZNCLDJ12LM)
5731
+ if ((model.model === 'ZNCLDJ12LM' || model.model === 'ZNCLDJ14LM') &&
5732
+ msg.type === 'attributeReport' && [0, 2].includes(msg.data['presentValue'])) {
5733
+ // Incorrect reports from the device, ignore (re-read by onEvent of ZNCLDJ12LM and ZNCLDJ14LM)
5729
5734
  // https://github.com/Koenkk/zigbee-herdsman-converters/pull/1427#issuecomment-663862724
5730
5735
  return;
5731
5736
  }
@@ -5779,6 +5784,29 @@ const converters = {
5779
5784
  }
5780
5785
  },
5781
5786
  },
5787
+ xiaomi_curtain_hagl07_status: {
5788
+ cluster: 'genMultistateOutput',
5789
+ type: ['attributeReport'],
5790
+ convert: (model, msg, publish, options, meta) => {
5791
+ let running = false;
5792
+ const data = msg.data;
5793
+ const lookup = {
5794
+ 0: 'closing',
5795
+ 1: 'opening',
5796
+ 2: 'stop',
5797
+ };
5798
+ if (data && data.hasOwnProperty('presentValue')) {
5799
+ const value = data['presentValue'];
5800
+ if (value < 2) {
5801
+ running = true;
5802
+ }
5803
+ return {
5804
+ motor_state: lookup[value],
5805
+ running: running,
5806
+ };
5807
+ }
5808
+ },
5809
+ },
5782
5810
  xiaomi_curtain_acn002_status: {
5783
5811
  cluster: 'genMultistateOutput',
5784
5812
  type: ['attributeReport'],
@@ -6260,17 +6288,6 @@ const converters = {
6260
6288
  return result;
6261
6289
  },
6262
6290
  },
6263
- D10110_cover_position_tilt: {
6264
- cluster: 'closuresWindowCovering',
6265
- type: ['attributeReport', 'readResponse'],
6266
- convert: (model, msg, publish, options, meta) => {
6267
- if (msg.data.hasOwnProperty('currentPositionLiftPercentage') && msg.data['currentPositionLiftPercentage'] <= 100) {
6268
- // The Yookee D10110 SENDs it's position reversed, relative to the spec.
6269
- msg.data['currentPositionLiftPercentage'] = 100 - msg.data['currentPositionLiftPercentage'];
6270
- }
6271
- return converters.cover_position_tilt.convert(model, msg, publish, options, meta);
6272
- },
6273
- },
6274
6291
  PGC410EU_presence: {
6275
6292
  cluster: 'manuSpecificSmartThingsArrivalSensor',
6276
6293
  type: 'commandArrivalSensorNotify',
@@ -2503,7 +2503,7 @@ const converters = {
2503
2503
  if (value.hasOwnProperty('auto_close')) opts.hand_open = value.auto_close;
2504
2504
  if (value.hasOwnProperty('reset_move')) opts.reset_limits = value.reset_move;
2505
2505
 
2506
- if (meta.mapped.model === 'ZNCLDJ12LM') {
2506
+ if (meta.mapped.model === 'ZNCLDJ12LM' || meta.mapped.model === 'ZNCLDJ14LM') {
2507
2507
  await entity.write('genBasic', {0xff28: {value: opts.reverse_direction, type: 0x10}}, manufacturerOptions.xiaomi);
2508
2508
  await entity.write('genBasic', {0xff29: {value: !opts.hand_open, type: 0x10}}, manufacturerOptions.xiaomi);
2509
2509
 
@@ -100,6 +100,13 @@ module.exports = [
100
100
  description: 'AOne 5.4W smart tuneable GU10 lamp',
101
101
  extend: extend.light_onoff_brightness_colortemp(),
102
102
  },
103
+ {
104
+ zigbeeModel: ['TWMPROZXBulb50AU'],
105
+ model: 'AU-A1ZBMPRO1ZX',
106
+ vendor: 'Aurora Lighting',
107
+ description: 'AOne MPROZX fixed IP65 fire rated smart tuneable LED downlight',
108
+ extend: extend.light_onoff_brightness_colortemp({colorTempRange: [200, 455]}),
109
+ },
103
110
  {
104
111
  zigbeeModel: ['FWG125Bulb50AU'],
105
112
  model: 'AU-A1VG125Z5E/19',
package/devices/bosch.js CHANGED
@@ -4,6 +4,7 @@ const fz = require('../converters/fromZigbee');
4
4
  const tz = require('../converters/toZigbee');
5
5
  const reporting = require('../lib/reporting');
6
6
  const utils = require('../lib/utils');
7
+ const constants = require('../lib/constants');
7
8
  const e = exposes.presets;
8
9
  const ea = exposes.access;
9
10
 
@@ -57,7 +58,7 @@ const tzLocal = {
57
58
  if (value=='off') {
58
59
  opMode = operatingModes.pause; // OperatingMode 5 = Pause
59
60
  } else if (value == 'auto') {
60
- opMode = operatingModes.automatic; // OperatingMOde 1 = Automatic
61
+ opMode = operatingModes.automatic; // OperatingMode 0 = Automatic
61
62
  }
62
63
  await entity.write('hvacThermostat', {0x4007: {value: opMode, type: herdsman.Zcl.DataType.enum8}}, boschManufacturer);
63
64
  return {state: {system_mode: value}};
@@ -139,9 +140,12 @@ const fzLocal = {
139
140
  result.boost = (Object.keys(stateOffOn)[data[0x4043]]);
140
141
  }
141
142
  if (data.hasOwnProperty(0x4007)) {
142
- const opModes = {0: 'auto', 1: 'heat', 2: 'unknowm 2', 3: 'unknonw 3', 4: 'unknown 4', 5: 'off'};
143
+ const opModes = {0: 'auto', 1: 'heat', 2: 'unknown_2', 3: 'unknown_3', 4: 'unknown_4', 5: 'off'};
143
144
  result.system_mode = opModes[data[0x4007]];
144
145
  }
146
+ if (data.hasOwnProperty(0x4020)) {
147
+ result.pi_heating_demand = data[0x4020];
148
+ }
145
149
 
146
150
  return result;
147
151
  },
@@ -214,16 +218,17 @@ const definition = [
214
218
  toZigbee: [
215
219
  tz.thermostat_occupied_heating_setpoint,
216
220
  tz.thermostat_local_temperature_calibration,
217
- tz.thermostat_local_temperature,
218
221
  tz.thermostat_keypad_lockout,
219
222
  tzLocal.bosch_thermostat,
220
- tzLocal.bosch_userInterface],
223
+ tzLocal.bosch_userInterface,
224
+ ],
221
225
  exposes: [
222
226
  exposes.climate()
223
- .withLocalTemperature()
227
+ .withLocalTemperature(ea.STATE)
224
228
  .withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
225
229
  .withLocalTemperatureCalibration(-12, 12, 0.5)
226
- .withSystemMode(['off', 'heat', 'auto']),
230
+ .withSystemMode(['off', 'heat', 'auto'])
231
+ .withPiHeatingDemand(ea.STATE),
227
232
  exposes.binary('boost', ea.ALL, 'ON', 'OFF')
228
233
  .withDescription('Activate Boost heating'),
229
234
  exposes.binary('window_open', ea.ALL, 'ON', 'OFF')
@@ -246,10 +251,33 @@ const definition = [
246
251
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat', 'hvacUserInterfaceCfg']);
247
252
  await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
248
253
  await reporting.thermostatTemperature(endpoint);
254
+ await reporting.thermostatKeypadLockMode(endpoint);
249
255
  await reporting.batteryPercentageRemaining(endpoint);
250
256
 
257
+ // report operating_mode (system_mode)
258
+ await endpoint.configureReporting('hvacThermostat', [{
259
+ attribute: {ID: 0x4007, type: herdsman.Zcl.DataType.enum8},
260
+ minimumReportInterval: 0,
261
+ maximumReportInterval: constants.repInterval.HOUR,
262
+ reportableChange: 1,
263
+ }], boschManufacturer);
264
+ // report pi_heating_demand (valve opening)
265
+ await endpoint.configureReporting('hvacThermostat', [{
266
+ attribute: {ID: 0x4020, type: herdsman.Zcl.DataType.enum8},
267
+ minimumReportInterval: 0,
268
+ maximumReportInterval: constants.repInterval.HOUR,
269
+ reportableChange: 1,
270
+ }], boschManufacturer);
271
+ // report window_open
272
+ await endpoint.configureReporting('hvacThermostat', [{
273
+ attribute: {ID: 0x4042, type: herdsman.Zcl.DataType.enum8},
274
+ minimumReportInterval: 0,
275
+ maximumReportInterval: constants.repInterval.HOUR,
276
+ reportableChange: 1,
277
+ }], boschManufacturer);
278
+
251
279
  await endpoint.read('hvacThermostat', ['localTemperatureCalibration']);
252
- await endpoint.read('hvacThermostat', [0x4007, 0x4042, 0x4043], boschManufacturer);
280
+ await endpoint.read('hvacThermostat', [0x4007, 0x4020, 0x4042, 0x4043], boschManufacturer);
253
281
 
254
282
  await endpoint.read('hvacUserInterfaceCfg', ['keypadLockout']);
255
283
  await endpoint.read('hvacUserInterfaceCfg', [0x400b, 0x403a, 0x403b], boschManufacturer);
@@ -556,6 +556,7 @@ module.exports = [
556
556
  dynExposes.push(e.linkquality());
557
557
  return dynExposes;
558
558
  },
559
+ ota: ota.zigbeeOTA,
559
560
  meta: {battery: {voltageToPercentage: '3V_2500'}},
560
561
  endpoint: (device) => {
561
562
  return {default: 35};
package/devices/fantem.js CHANGED
@@ -49,6 +49,7 @@ module.exports = [
49
49
  {
50
50
  fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_rxqls8v0'},
51
51
  {modelID: 'TS0202', manufacturerName: '_TZ3210_zmy9hjay'},
52
+ {modelID: 'TS0202', manufacturerName: '_TZ3000_6ygjfyll'},
52
53
  {modelID: 'TS0202', manufacturerName: '_TZ3210_wuhzzfqg'}],
53
54
  model: 'ZB003-X',
54
55
  vendor: 'Fantem',
@@ -48,7 +48,7 @@ module.exports = [
48
48
  model: 'AC25697',
49
49
  vendor: 'LEDVANCE',
50
50
  description: 'SMART+ CLASSIC MULTICOLOUR 60 10W E27',
51
- extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
51
+ extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], disablePowerOnBehavior: true}),
52
52
  ota: ota.ledvance,
53
53
  },
54
54
  {
@@ -209,8 +209,8 @@ module.exports = [
209
209
  exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
210
210
  .withDescription('Specifies the maximum brightness value'),
211
211
  exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'),
212
- exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to
213
- see the switch in the dark`),
212
+ exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
213
+ ` see the switch in the dark`),
214
214
  exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
215
215
  e.power_on_behavior()],
216
216
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -231,7 +231,7 @@ module.exports = [
231
231
  fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.power_on_behavior],
232
232
  toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn,
233
233
  tz.power_on_behavior],
234
- exposes: [e.switch(), e.action(['identify']), e.power(),
234
+ exposes: [e.switch(), e.action(['identify']), e.power(), e.power_apparent(),
235
235
  exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
236
236
  allowing to see it in the dark`),
237
237
  exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on'),
@@ -383,8 +383,8 @@ module.exports = [
383
383
  toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn],
384
384
  exposes: [e.switch().withEndpoint('left'),
385
385
  e.switch().withEndpoint('right'),
386
- exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to
387
- see the switch in the dark`),
386
+ exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to` +
387
+ ` see the switch in the dark`),
388
388
  exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on')],
389
389
  meta: {multiEndpoint: true},
390
390
  configure: async (device, coordinatorEndpoint, logger) => {
package/devices/lidl.js CHANGED
@@ -671,7 +671,7 @@ module.exports = [
671
671
  model: 'HG06106C',
672
672
  vendor: 'Lidl',
673
673
  description: 'Livarno Lux E27 bulb RGB',
674
- ...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
674
+ ...extend.light_onoff_brightness_colortemp_color({disableColorTempStartup: true, disablePowerOnBehavior: true}),
675
675
  meta: {applyRedFix: true, enhancedHue: false},
676
676
  configure: async (device, coordinatorEndpoint, logger) => {
677
677
  device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
package/devices/namron.js CHANGED
@@ -590,6 +590,28 @@ module.exports = [
590
590
  await endpoint.read('hvacThermostat', [0x2001, 0x2002], options);
591
591
  },
592
592
  },
593
+ {
594
+ zigbeeModel: ['4512735'],
595
+ model: '4512735',
596
+ vendor: 'Namron',
597
+ description: 'Multiprise with 4 AC outlets and 2 USB super charging ports (16A)',
598
+ fromZigbee: [fz.on_off],
599
+ toZigbee: [tz.on_off],
600
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
601
+ e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
602
+ endpoint: (device) => {
603
+ return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
604
+ },
605
+ meta: {multiEndpoint: true},
606
+ configure: async (device, coordinatorEndpoint, logger) => {
607
+ for (const ID of [1, 2, 3, 4, 5]) {
608
+ const endpoint = device.getEndpoint(ID);
609
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
610
+ }
611
+ device.powerSource = 'Mains (single phase)';
612
+ device.save();
613
+ },
614
+ },
593
615
  {
594
616
  zigbeeModel: ['5401392', '5401396', '5401393', '5401397', '5401394', '5401398', '5401395', '5401399', '5401395'],
595
617
  model: '540139X',
@@ -3025,4 +3025,11 @@ module.exports = [
3025
3025
  description: 'Hue White E17 470 lumen',
3026
3026
  extend: hueExtend.light_onoff_brightness(),
3027
3027
  },
3028
+ {
3029
+ zigbeeModel: ['929003046901'],
3030
+ model: '8719514338524',
3031
+ vendor: 'Philips',
3032
+ description: 'Hue white ambiance Pillar spotlight with Bluetooth (black)',
3033
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
3034
+ },
3028
3035
  ];
@@ -307,6 +307,27 @@ module.exports = [
307
307
  await reporting.brightness(endpoint);
308
308
  },
309
309
  },
310
+ {
311
+ zigbeeModel: ['NHROTARY/UNIDIM/1'],
312
+ model: 'WDE002961',
313
+ vendor: 'Schneider Electric',
314
+ description: 'Rotary dimmer',
315
+ fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
316
+ toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
317
+ exposes: [e.light_brightness().withLevelConfig(),
318
+ exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
319
+ .withDescription('Specifies the minimum light output of the ballast'),
320
+ exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
321
+ .withDescription('Specifies the maximum light output of the ballast'),
322
+ exposes.enum('dimmer_mode', ea.ALL, ['auto', 'rc', 'rl', 'rl_led'])
323
+ .withDescription('Sets dimming mode to autodetect or fixed RC/RL/RL_LED mode (max load is reduced in RL_LED)')],
324
+ configure: async (device, coordinatorEndpoint, logger) => {
325
+ const endpoint = device.getEndpoint(3);
326
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
327
+ await reporting.onOff(endpoint);
328
+ await reporting.brightness(endpoint);
329
+ },
330
+ },
310
331
  {
311
332
  zigbeeModel: ['NHPB/DIMMER/1'],
312
333
  model: 'WDE002386',
package/devices/sinope.js CHANGED
@@ -990,4 +990,31 @@ module.exports = [
990
990
  await reporting.brightness(endpoint); // valve position
991
991
  },
992
992
  },
993
+ {
994
+ zigbeeModel: ['VA4220ZB'],
995
+ model: 'VA4220ZB',
996
+ vendor: 'Sinopé',
997
+ description: 'Sedna smart water valve',
998
+ fromZigbee: [fz.ignore_iaszone_statuschange, fz.cover_position_via_brightness, fz.cover_state_via_onoff,
999
+ fz.battery, fz.metering],
1000
+ toZigbee: [tz.cover_via_brightness],
1001
+ meta: {battery: {voltageToPercentage: {min: 5400, max: 6800}}},
1002
+ exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery(), e.battery_voltage()],
1003
+ configure: async (device, coordinatorEndpoint) => {
1004
+ const endpoint = device.getEndpoint(1);
1005
+ const binds = [
1006
+ 'genBasic', 'genGroups', 'genOnOff', 'ssIasZone', 'genLevelCtrl',
1007
+ 'genPowerCfg', 'seMetering', 'manuSpecificSinope'];
1008
+ await reporting.bind(endpoint, coordinatorEndpoint, binds);
1009
+ await reporting.batteryPercentageRemaining(endpoint);
1010
+ await reporting.onOff(endpoint);
1011
+ await reporting.brightness(endpoint); // valve position
1012
+ try {
1013
+ await reporting.batteryVoltage(endpoint);
1014
+ } catch (error) {/* Do Nothing */}
1015
+ try {
1016
+ await reporting.batteryAlarmState(endpoint);
1017
+ } catch (error) {/* Do Nothing */}
1018
+ },
1019
+ },
993
1020
  ];
package/devices/tuya.js CHANGED
@@ -1207,6 +1207,7 @@ module.exports = [
1207
1207
  {modelID: 'TS0601', manufacturerName: '_TZE200_ojzhk75b'},
1208
1208
  {modelID: 'TS0601', manufacturerName: '_TZE200_swaamsoy'},
1209
1209
  {modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'},
1210
+ {modelID: 'TS0601', manufacturerName: '_TZE200_p0gzbqct'},
1210
1211
  ],
1211
1212
  model: 'TS0601_dimmer',
1212
1213
  vendor: 'TuYa',
@@ -3103,7 +3104,7 @@ module.exports = [
3103
3104
  description: 'Vibration sensor',
3104
3105
  fromZigbee: [fz.battery, fz.ias_vibration_alarm_1_with_timeout],
3105
3106
  toZigbee: [tz.TS0210_sensitivity],
3106
- exposes: [e.battery(), e.vibration(), exposes.enum('sensitivity', exposes.access.STATE_SET, ['low', 'medium', 'high'])],
3107
+ exposes: [e.battery(), e.battery_voltage(), e.vibration(), exposes.enum('sensitivity', ea.STATE_SET, ['low', 'medium', 'high'])],
3107
3108
  },
3108
3109
  {
3109
3110
  fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_8bxrzyxz'},
package/devices/ubisys.js CHANGED
@@ -20,6 +20,14 @@ const manufacturerOptions = {
20
20
  tint: {manufacturerCode: herdsman.Zcl.ManufacturerCode.MUELLER_LICHT_INT},
21
21
  };
22
22
 
23
+ const ubisysOnEventReadCurrentSummDelivered = async function(type, data, devic) {
24
+ if (data.type === 'attributeReport' && data.cluster === 'seMetering') {
25
+ try {
26
+ await data.endpoint.read('seMetering', ['currentSummDelivered']);
27
+ } catch (error) {/* Do nothing*/}
28
+ }
29
+ };
30
+
23
31
  const ubisys = {
24
32
  fz: {
25
33
  dimmer_setup: {
@@ -533,7 +541,7 @@ module.exports = [
533
541
  'toggle', 'on', 'off', 'recall_*',
534
542
  'brightness_move_up', 'brightness_move_down', 'brightness_stop',
535
543
  ]),
536
- e.power_on_behavior()],
544
+ e.power_on_behavior(), e.energy()],
537
545
  fromZigbee: [fz.on_off, fz.metering, fz.command_toggle, fz.command_on, fz.command_off, fz.command_recall, fz.command_move,
538
546
  fz.command_stop, fz.power_on_behavior, ubisys.fz.configure_device_setup],
539
547
  toZigbee: [tz.on_off, tz.metering_power, ubisys.tz.configure_device_setup, tz.power_on_behavior],
@@ -561,6 +569,8 @@ module.exports = [
561
569
  const ep1 = device.getEndpoint(1);
562
570
  const ep2 = device.getEndpoint(2);
563
571
  ep2.addBinding('genOnOff', ep1);
572
+ } else {
573
+ await ubisysOnEventReadCurrentSummDelivered(type, data, device);
564
574
  }
565
575
  },
566
576
  ota: ota.ubisys,
@@ -575,7 +585,7 @@ module.exports = [
575
585
  'toggle', 'on', 'off', 'recall_*',
576
586
  'brightness_move_up', 'brightness_move_down', 'brightness_stop',
577
587
  ]),
578
- e.power_on_behavior()],
588
+ e.power_on_behavior(), e.energy()],
579
589
  fromZigbee: [fz.on_off, fz.metering, fz.command_toggle, fz.command_on, fz.command_off, fz.command_recall, fz.command_move,
580
590
  fz.command_stop, fz.power_on_behavior, ubisys.fz.configure_device_setup],
581
591
  toZigbee: [tz.on_off, tz.metering_power, ubisys.tz.configure_device_setup, tz.power_on_behavior],
@@ -603,6 +613,8 @@ module.exports = [
603
613
  const ep1 = device.getEndpoint(1);
604
614
  const ep2 = device.getEndpoint(2);
605
615
  ep2.addBinding('genOnOff', ep1);
616
+ } else {
617
+ await ubisysOnEventReadCurrentSummDelivered(type, data, device);
606
618
  }
607
619
  },
608
620
  ota: ota.ubisys,
@@ -615,6 +627,7 @@ module.exports = [
615
627
  exposes: [
616
628
  e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
617
629
  e.power().withAccess(ea.STATE_GET).withEndpoint('meter').withProperty('power'),
630
+ e.energy(),
618
631
  e.action(['toggle_s1', 'toggle_s2', 'on_s1', 'on_s2', 'off_s1', 'off_s2', 'recall_*_s1', 'recal_*_s2', 'brightness_move_up_s1',
619
632
  'brightness_move_up_s2', 'brightness_move_down_s1', 'brightness_move_down_s2', 'brightness_stop_s1',
620
633
  'brightness_stop_s2']),
@@ -655,6 +668,8 @@ module.exports = [
655
668
  const ep4 = device.getEndpoint(4);
656
669
  ep3.addBinding('genOnOff', ep1);
657
670
  ep4.addBinding('genOnOff', ep2);
671
+ } else {
672
+ await ubisysOnEventReadCurrentSummDelivered(type, data, device);
658
673
  }
659
674
  },
660
675
  ota: ota.ubisys,
@@ -670,13 +685,41 @@ module.exports = [
670
685
  toZigbee: [tz.light_onoff_brightness, tz.ballast_config, tz.level_config, ubisys.tz.dimmer_setup,
671
686
  ubisys.tz.dimmer_setup_genLevelCtrl, ubisys.tz.configure_device_setup, tz.ignore_transition, tz.light_brightness_move,
672
687
  tz.light_brightness_step],
673
- exposes: [e.light_brightness().withLevelConfig(), e.power(), e.energy(),
688
+ exposes: [
689
+ e.action(['toggle_s1', 'toggle_s2', 'on_s1', 'on_s2', 'off_s1', 'off_s2', 'recall_*_s1', 'recal_*_s2', 'brightness_move_up_s1',
690
+ 'brightness_move_up_s2', 'brightness_move_down_s1', 'brightness_move_down_s2', 'brightness_stop_s1',
691
+ 'brightness_stop_s2']),
692
+ e.light_brightness(),
693
+ exposes.composite('level_config', 'level_config')
694
+ .withFeature(exposes.numeric('on_off_transition_time', ea.ALL)
695
+ .withDescription('Specifies the amount of time, in units of 0.1 seconds, which will be used during a transition to ' +
696
+ 'either the on or off state, when an on/off/toggle command of the on/off cluster is used to turn the light on or off'))
697
+ .withFeature(exposes.numeric('on_level', ea.ALL)
698
+ .withValueMin(1).withValueMax(254)
699
+ .withPreset('previous', 255, 'Use previous value')
700
+ .withDescription('Specifies the level that shall be applied, when an on/toggle command causes the light to turn on.'))
701
+ .withFeature(exposes.binary('execute_if_off', ea.ALL, true, false)
702
+ .withDescription('Defines if you can send a brightness change without to turn on the light'))
703
+ .withFeature(exposes.numeric('current_level_startup', ea.ALL)
704
+ .withValueMin(1).withValueMax(254)
705
+ .withPreset('previous', 255, 'Use previous value')
706
+ .withDescription('Specifies the initial level to be applied after the device is supplied with power')),
707
+ e.power(), e.energy(),
674
708
  exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
675
709
  .withDescription('Specifies the minimum light output of the ballast'),
676
710
  exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
677
711
  .withDescription('Specifies the maximum light output of the ballast'),
678
712
  exposes.numeric('minimum_on_level', ea.ALL).withValueMin(0).withValueMax(255)
679
- .withDescription('Specifies the minimum light output after switching on'),
713
+ .withDescription('Specifies the minimum level that shall be applied, when an on/toggle command causes the ' +
714
+ 'light to turn on. When this attribute is set to the invalid value (255) this feature is disabled ' +
715
+ 'and standard rules apply: The light will either return to the previously active level (before it ' +
716
+ 'was turned off) if the OnLevel attribute is set to the invalid value (255/previous); or to the specified ' +
717
+ 'value of the OnLevel attribute if this value is in the range 0…254. Otherwise, if the ' +
718
+ 'MinimumOnLevel is in the range 0…254, the light will be set to the the previously ' +
719
+ 'active level (before it was turned off), or the value specified here, whichever is the larger ' +
720
+ 'value. For example, if the previous level was 30 and the MinimumOnLevel was 40 then ' +
721
+ 'the light would turn on and move to level 40. Conversely, if the previous level was 50, ' +
722
+ 'and the MinimumOnLevel was 40, then the light would turn on and move to level 50.'),
680
723
  exposes.binary('capabilities_forward_phase_control', ea.ALL, true, false)
681
724
  .withDescription('The dimmer supports AC forward phase control.'),
682
725
  exposes.binary('capabilities_reverse_phase_control', ea.ALL, true, false)
@@ -705,13 +748,11 @@ module.exports = [
705
748
  await reporting.readMeteringMultiplierDivisor(endpoint);
706
749
  await reporting.instantaneousDemand(endpoint);
707
750
  },
751
+ meta: {multiEndpoint: true, multiEndpointSkip: ['state', 'brightness']},
752
+ endpoint: (device) => {
753
+ return {'default': 1, 's1': 2, 's2': 3, 'meter': 4};
754
+ },
708
755
  onEvent: async (type, data, device) => {
709
- if (data.type === 'attributeReport' && data.cluster === 'seMetering') {
710
- const endpoint = device.getEndpoint(4);
711
- try {
712
- await endpoint.read('seMetering', ['currentSummDelivered']);
713
- } catch (error) {/* Do nothing*/}
714
- }
715
756
  /*
716
757
  * As per technical doc page 23 section 7.3.4, 7.3.5
717
758
  * https://www.ubisys.de/wp-content/uploads/ubisys-d1-technical-reference.pdf
@@ -723,6 +764,8 @@ module.exports = [
723
764
  const ep2 = device.getEndpoint(2);
724
765
  ep2.addBinding('genOnOff', ep1);
725
766
  ep2.addBinding('genLevelCtrl', ep1);
767
+ } else {
768
+ await ubisysOnEventReadCurrentSummDelivered(type, data, device);
726
769
  }
727
770
  },
728
771
  ota: ota.ubisys,
@@ -736,7 +779,7 @@ module.exports = [
736
779
  toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.metering_power,
737
780
  ubisys.tz.configure_j1, ubisys.tz.configure_device_setup],
738
781
  exposes: [e.cover_position_tilt(),
739
- e.power().withAccess(ea.STATE_GET).withEndpoint('meter').withProperty('power')],
782
+ e.power().withAccess(ea.STATE_GET).withEndpoint('meter').withProperty('power'), e.energy()],
740
783
  configure: async (device, coordinatorEndpoint, logger) => {
741
784
  const endpoint1 = device.getEndpoint(1);
742
785
  const endpoint3 = device.getEndpoint(3);
@@ -760,6 +803,8 @@ module.exports = [
760
803
  const ep1 = device.getEndpoint(1);
761
804
  const ep2 = device.getEndpoint(2);
762
805
  ep2.addBinding('closuresWindowCovering', ep1);
806
+ } else {
807
+ await ubisysOnEventReadCurrentSummDelivered(type, data, device);
763
808
  }
764
809
  },
765
810
  ota: ota.ubisys,
package/devices/woox.js CHANGED
@@ -155,7 +155,8 @@ module.exports = [
155
155
  onEvent: tuya.onEventsetTime,
156
156
  },
157
157
  {
158
- fingerprint: [{modelID: 'TS0219', manufacturerName: '_TYZB01_ynsiasng'}, {modelID: 'TS0219', manufacturerName: '_TYZB01_bwsijaty'}],
158
+ fingerprint: [{modelID: 'TS0219', manufacturerName: '_TYZB01_ynsiasng'}, {modelID: 'TS0219', manufacturerName: '_TYZB01_bwsijaty'},
159
+ {modelID: 'TS0219', manufacturerName: '_TYZB01_rs7ff6o7'}],
159
160
  model: 'R7051',
160
161
  vendor: 'Woox',
161
162
  description: 'Smart siren',
package/devices/xiaomi.js CHANGED
@@ -58,6 +58,22 @@ const daysLookup = {
58
58
 
59
59
 
60
60
  const fzLocal = {
61
+ aqara_s1_co2: {
62
+ cluster: 'msCO2',
63
+ type: ['attributeReport', 'readResponse'],
64
+ convert: (model, msg, publish, options, meta) => {
65
+ return {co2: Math.floor(msg.data.measuredValue)};
66
+ },
67
+ },
68
+ aqara_s1_pm25: {
69
+ cluster: 'heimanSpecificPM25Measurement',
70
+ type: ['attributeReport', 'readResponse'],
71
+ convert: (model, msg, publish, options, meta) => {
72
+ if (msg.data['measuredValue']) {
73
+ return {pm25: msg.data['measuredValue'] / 1000};
74
+ }
75
+ },
76
+ },
61
77
  aqara_trv: {
62
78
  cluster: 'aqaraOpple',
63
79
  type: ['attributeReport', 'readResponse'],
@@ -417,6 +433,16 @@ module.exports = [
417
433
  },
418
434
  ota: ota.zigbeeOTA,
419
435
  },
436
+ {
437
+ zigbeeModel: ['lumi.airm.fhac01'],
438
+ model: 'KQJCMB11LM',
439
+ vendor: 'Xiaomi',
440
+ description: 'Aqara air monitoring panel S1',
441
+ fromZigbee: [fz.temperature, fz.humidity, fzLocal.aqara_s1_pm25, fzLocal.aqara_s1_co2],
442
+ toZigbee: [],
443
+ exposes: [e.temperature(), e.humidity(), e.pm25(), e.co2()],
444
+ ota: ota.zigbeeOTA,
445
+ },
420
446
  {
421
447
  zigbeeModel: ['lumi.magnet.acn001'],
422
448
  model: 'MCCGQ14LM',
@@ -668,7 +694,8 @@ module.exports = [
668
694
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled']).withDescription('Decoupled mode'),
669
695
  exposes.enum('mode_switch', ea.ALL, ['anti_flicker_mode', 'quick_mode'])
670
696
  .withDescription('Anti flicker mode can be used to solve blinking issues of some lights.' +
671
- 'Quick mode makes the device respond faster.')],
697
+ 'Quick mode makes the device respond faster.'),
698
+ e.power_outage_count(), e.device_temperature().withAccess(ea.STATE)],
672
699
  onEvent: preventReset,
673
700
  configure: async (device, coordinatorEndpoint, logger) => {
674
701
  const endpoint1 = device.getEndpoint(1);
@@ -682,19 +709,35 @@ module.exports = [
682
709
  model: 'WS-USC02',
683
710
  vendor: 'Xiaomi',
684
711
  description: 'Aqara smart wall switch (no neutral, double rocker)',
685
- extend: extend.switch(),
686
- exposes: [e.switch().withEndpoint('top'), e.switch().withEndpoint('bottom')],
712
+ fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.aqara_opple],
713
+ toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_flip_indicator_light, tz.aqara_switch_mode_switch],
714
+ exposes: [
715
+ e.switch().withEndpoint('top'),
716
+ e.switch().withEndpoint('bottom'),
717
+ exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
718
+ .withDescription('Decoupled mode for top button')
719
+ .withEndpoint('top'),
720
+ exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
721
+ .withDescription('Decoupled mode for bottom button')
722
+ .withEndpoint('bottom'),
723
+ exposes.enum('mode_switch', ea.ALL, ['anti_flicker_mode', 'quick_mode'])
724
+ .withDescription(
725
+ 'Anti flicker mode can be used to solve blinking issues of some lights.' +
726
+ 'Quick mode makes the device respond faster.',
727
+ ),
728
+ e.power_outage_count(),
729
+ e.device_temperature().withAccess(ea.STATE),
730
+ e.flip_indicator_light(),
731
+ e.action(['single_top', 'single_bottom', 'single_both', 'double_top', 'double_bottom', 'double_both'])],
687
732
  meta: {multiEndpoint: true},
688
733
  endpoint: (device) => {
689
734
  return {'top': 1, 'bottom': 2};
690
735
  },
736
+ onEvent: preventReset,
691
737
  configure: async (device, coordinatorEndpoint, logger) => {
692
- const endpoint1 = device.getEndpoint(1);
693
- await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
694
- await reporting.onOff(endpoint1);
695
- const endpoint2 = device.getEndpoint(2);
696
- await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
697
- await reporting.onOff(endpoint2);
738
+ await device.getEndpoint(1).write(
739
+ 'aqaraOpple', {mode: 1}, {manufacturerCode: 0x115f, disableResponse: true},
740
+ );
698
741
  },
699
742
  ota: ota.zigbeeOTA,
700
743
  },
@@ -1837,6 +1880,27 @@ module.exports = [
1837
1880
  .withDescription('The current state of the motor.'), e.power_outage_count()],
1838
1881
  ota: ota.zigbeeOTA,
1839
1882
  },
1883
+ {
1884
+ zigbeeModel: ['lumi.curtain.hagl07'],
1885
+ model: 'ZNCLDJ14LM',
1886
+ vendor: 'Xiaomi',
1887
+ description: 'Aqara C2 curtain motor',
1888
+ fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt, fz.xiaomi_curtain_hagl07_status],
1889
+ toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
1890
+ onEvent: async (type, data, device) => {
1891
+ // The position (genAnalogOutput.presentValue) reported via an attribute contains an invaid value
1892
+ // however when reading it will provide the correct value.
1893
+ if (data.type === 'attributeReport' && data.cluster === 'genAnalogOutput') {
1894
+ await device.endpoints[0].read('genAnalogOutput', ['presentValue']);
1895
+ }
1896
+ },
1897
+ exposes: [e.cover_position().setAccess('state', ea.ALL),
1898
+ exposes.binary('running', ea.STATE, true, false)
1899
+ .withDescription('Whether the motor is moving or not'),
1900
+ exposes.enum('motor_state', ea.STATE, ['closing', 'opening', 'stop'])
1901
+ .withDescription('The current state of the motor.'), e.power_outage_count()],
1902
+ ota: ota.zigbeeOTA,
1903
+ },
1840
1904
  {
1841
1905
  zigbeeModel: ['lumi.curtain.acn002'],
1842
1906
  model: 'ZNJLBL01LM',
@@ -1919,6 +1983,10 @@ module.exports = [
1919
1983
  .withDescription('Enabling prevents both relais being on at the same time'),
1920
1984
  ],
1921
1985
  ota: ota.zigbeeOTA,
1986
+ configure: async (device, coordinatorEndpoint, logger) => {
1987
+ device.powerSource = 'Mains (single phase)';
1988
+ device.save();
1989
+ },
1922
1990
  },
1923
1991
  {
1924
1992
  zigbeeModel: ['lumi.lock.acn02'],
@@ -2140,6 +2208,8 @@ module.exports = [
2140
2208
  e.voltage().withAccess(ea.STATE), e.power_outage_memory(), e.led_disabled_night(), e.switch_type()],
2141
2209
  configure: async (device, coordinatorEndpoint, logger) => {
2142
2210
  await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
2211
+ device.powerSource = 'Mains (single phase)';
2212
+ device.save();
2143
2213
  },
2144
2214
  ota: ota.zigbeeOTA,
2145
2215
  },
@@ -2416,6 +2486,7 @@ module.exports = [
2416
2486
  const endpoint1 = device.getEndpoint(1);
2417
2487
  await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
2418
2488
  },
2489
+ ota: ota.zigbeeOTA,
2419
2490
  },
2420
2491
  {
2421
2492
  zigbeeModel: ['lumi.sen_ill.agl01'],
package/devices/yookee.js CHANGED
@@ -10,9 +10,8 @@ module.exports = [
10
10
  model: 'D10110',
11
11
  vendor: 'Yookee',
12
12
  description: 'Smart blind controller',
13
- fromZigbee: [fz.D10110_cover_position_tilt, fz.battery],
13
+ fromZigbee: [fz.cover_position_tilt, fz.battery],
14
14
  toZigbee: [tz.cover_state, tz.cover_position_tilt],
15
- meta: {coverInverted: true},
16
15
  configure: async (device, coordinatorEndpoint, logger) => {
17
16
  const endpoint = device.getEndpoint(1);
18
17
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
package/lib/philips.js CHANGED
@@ -127,7 +127,7 @@ function decodeGradientColors(input, opts) {
127
127
  const y = yHigh | yLow;
128
128
 
129
129
  return {
130
- color_mode: 'color_xy',
130
+ color_mode: 'xy',
131
131
  x: Math.round(x / 65535 * 10000) / 10000,
132
132
  y: Math.round(y / 65535 * 10000) / 10000,
133
133
  brightness,
package/lib/utils.js CHANGED
@@ -124,7 +124,8 @@ function postfixWithEndpointName(value, msg, definition, meta) {
124
124
  meta.logger.warn(`No meta passed to postfixWithEndpointName, update your external converter!`);
125
125
  meta = {device: null};
126
126
  }
127
- if (definition.meta && definition.meta.multiEndpoint) {
127
+ if (definition.meta && definition.meta.multiEndpoint &&
128
+ (!definition.meta.multiEndpointSkip || !definition.meta.multiEndpointSkip.includes(value))) {
128
129
  const endpointName = definition.hasOwnProperty('endpoint') ?
129
130
  getKey(definition.endpoint(meta.device), msg.endpoint.ID) : msg.endpoint.ID;
130
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.690",
3
+ "version": "14.0.692",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [