zigbee-herdsman-converters 14.0.404 → 14.0.405

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.
@@ -5029,6 +5029,9 @@ const converters = {
5029
5029
  // dimmer
5030
5030
  else if (option0 === 0x0101) payload.device_mode = 'dimmer_on';
5031
5031
  else if (option0 === 0x0100) payload.device_mode = 'dimmer_off';
5032
+ // pilot wire
5033
+ else if (option0 === 0x0002) payload.device_mode = 'pilot_on';
5034
+ else if (option0 === 0x0001) payload.device_mode = 'pilot_off';
5032
5035
  // unknown case
5033
5036
  else {
5034
5037
  meta.logger.warn(`device_mode ${option0} not recognized, please fix me`);
@@ -5037,6 +5040,26 @@ const converters = {
5037
5040
  return payload;
5038
5041
  },
5039
5042
  },
5043
+ legrand_cable_outlet_mode: {
5044
+ cluster: '64576',
5045
+ type: ['readResponse'],
5046
+ convert: (model, msg, publish, options, meta) => {
5047
+ const payload = {};
5048
+ const mode = msg.data['0'];
5049
+
5050
+ if (mode === 0x00) payload.cable_outlet_mode = 'comfort';
5051
+ else if (mode === 0x01) payload.cable_outlet_mode = 'comfort-1';
5052
+ else if (mode === 0x02) payload.cable_outlet_mode = 'comfort-2';
5053
+ else if (mode === 0x03) payload.cable_outlet_mode = 'eco';
5054
+ else if (mode === 0x04) payload.cable_outlet_mode = 'frost_protection';
5055
+ else if (mode === 0x05) payload.cable_outlet_mode = 'off';
5056
+ else {
5057
+ meta.logger.warn(`Bad mode : ${mode}`);
5058
+ payload.cable_outlet_mode = 'unknown';
5059
+ }
5060
+ return payload;
5061
+ },
5062
+ },
5040
5063
  legrand_power_alarm: {
5041
5064
  cluster: 'haElectricalMeasurement',
5042
5065
  type: ['attributeReport', 'readResponse'],
@@ -5257,13 +5280,16 @@ const converters = {
5257
5280
  payload.battery = batteryVoltageToPercentage(value, '3V_2100');
5258
5281
  } else if (index === 3) payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
5259
5282
  else if (index === 5) {
5260
- if (['JT-BZ-01AQ/A'].includes(model.model)) payload.power_outage_count = value;
5283
+ if (['JT-BZ-01AQ/A', 'RTCZCGQ11LM'].includes(model.model)) payload.power_outage_count = value;
5261
5284
  } else if (index === 100) {
5262
5285
  if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
5263
5286
  const mapping = model.model === 'QBCZ15LM' ? 'relay' : 'left';
5264
5287
  payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
5265
5288
  } else if (['WXKG14LM', 'WXKG16LM', 'WXKG17LM'].includes(model.model)) {
5266
5289
  payload.click_mode = {1: 'fast', 2: 'multi'}[value];
5290
+ } else if (['WXCJKG11LM ', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
5291
+ // We don't know what the value means for these devices.
5292
+ // https://github.com/Koenkk/zigbee2mqtt/issues/11126
5267
5293
  } else {
5268
5294
  payload.state = value === 1 ? 'ON' : 'OFF';
5269
5295
  }
@@ -5281,9 +5307,18 @@ const converters = {
5281
5307
  } else if (index ===102 ) {
5282
5308
  if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
5283
5309
  payload.state_right = value === 1 ? 'ON' : 'OFF';
5310
+ } else if (['RTCZCGQ11LM'].includes(model.model)) {
5311
+ payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
5312
+ 5: 'left_leave', 6: 'approach', 7: 'away', 255: null}[value];
5313
+ }
5314
+ } else if (index ===103) payload.monitoring_mode = value === 1 ? 'left_right' : 'undirected'; // RTCZCGQ11LM
5315
+ else if (index === 105) {
5316
+ if (['RTCGQ13LM'].includes(model.model)) {
5317
+ payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[value];
5318
+ } else if (['RTCZCGQ11LM'].includes(model.model)) {
5319
+ payload.approach_distance = {0: 'far', 1: 'medium', 2: 'near'}[value];
5284
5320
  }
5285
- } else if (index === 105) payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[value]; // RTCGQ13LM
5286
- else if (index === 149) {
5321
+ } else if (index === 149) {
5287
5322
  payload.energy = precisionRound(value, 2); // 0x95
5288
5323
  // Consumption is deprecated
5289
5324
  payload.consumption = payload.energy;
@@ -5322,6 +5357,15 @@ const converters = {
5322
5357
  if (msg.data.hasOwnProperty('313')) payload.state = msg.data['313'] === 1 ? 'preparation' : 'work'; // JT-BZ-01AQ/A
5323
5358
  if (msg.data.hasOwnProperty('314')) payload.gas = msg.data['314'] === 1; // JT-BZ-01AQ/A
5324
5359
  if (msg.data.hasOwnProperty('315')) payload.gas_density = msg.data['315']; // JT-BZ-01AQ/A
5360
+ if (msg.data.hasOwnProperty('322')) payload.presence = msg.data['322'] === 1; // RTCZCGQ11LM
5361
+ if (msg.data.hasOwnProperty('323')) {
5362
+ payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
5363
+ 5: 'left_leave', 6: 'approach', 7: 'away'}[msg.data['323']]; // RTCZCGQ11LM
5364
+ }
5365
+ // RTCZCGQ11LM
5366
+ if (msg.data.hasOwnProperty('324')) payload.monitoring_mode = msg.data['324'] === 1 ? 'left_right' : 'undirected';
5367
+ // RTCZCGQ11LM
5368
+ if (msg.data.hasOwnProperty('326')) payload.approach_distance = {0: 'far', 1: 'medium', 2: 'near'}[msg.data['326']];
5325
5369
  if (msg.data.hasOwnProperty('331')) payload.linkage_alarm = msg.data['331'] === 1; // JT-BZ-01AQ/A
5326
5370
  if (msg.data.hasOwnProperty('512')) {
5327
5371
  if (['ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM'].includes(model.model)) {
@@ -54,6 +54,14 @@ const converters = {
54
54
  meta.logger.info(`Wrote '${JSON.stringify(value.payload)}' to '${value.cluster}'`);
55
55
  },
56
56
  },
57
+ command: {
58
+ key: ['command'],
59
+ convertSet: async (entity, key, value, meta) => {
60
+ const options = utils.getOptions(meta.mapped, entity);
61
+ await entity.command(value.cluster, value.command, (value.hasOwnProperty('payload') ? value.payload : {}), options);
62
+ meta.logger.info(`Invoked '${value.cluster}.${value.command}' with payload '${JSON.stringify(value.payload)}'`);
63
+ },
64
+ },
57
65
  factory_reset: {
58
66
  key: ['reset'],
59
67
  convertSet: async (entity, key, value, meta) => {
@@ -2006,6 +2014,36 @@ const converters = {
2006
2014
  await entity.read('aqaraOpple', [0x010c], manufacturerOptions.xiaomi);
2007
2015
  },
2008
2016
  },
2017
+ RTCZCGQ11LM_presence: {
2018
+ key: ['presence'],
2019
+ convertGet: async (entity, key, meta) => {
2020
+ await entity.read('aqaraOpple', [0x0142], manufacturerOptions.xiaomi);
2021
+ },
2022
+ },
2023
+ RTCZCGQ11LM_monitoring_mode: {
2024
+ key: ['monitoring_mode'],
2025
+ convertSet: async (entity, key, value, meta) => {
2026
+ value = value.toLowerCase();
2027
+ const lookup = {'undirected': 0, 'left_right': 1};
2028
+ await entity.write('aqaraOpple', {0x0144: {value: lookup[value], type: 0x20}}, manufacturerOptions.xiaomi);
2029
+ return {state: {monitoring_mode: value}};
2030
+ },
2031
+ convertGet: async (entity, key, meta) => {
2032
+ await entity.read('aqaraOpple', [0x0144], manufacturerOptions.xiaomi);
2033
+ },
2034
+ },
2035
+ RTCZCGQ11LM_approach_distance: {
2036
+ key: ['approach_distance'],
2037
+ convertSet: async (entity, key, value, meta) => {
2038
+ value = value.toLowerCase();
2039
+ const lookup = {'far': 0, 'medium': 1, 'near': 2};
2040
+ await entity.write('aqaraOpple', {0x0146: {value: lookup[value], type: 0x20}}, manufacturerOptions.xiaomi);
2041
+ return {state: {approach_distance: value}};
2042
+ },
2043
+ convertGet: async (entity, key, meta) => {
2044
+ await entity.read('aqaraOpple', [0x0146], manufacturerOptions.xiaomi);
2045
+ },
2046
+ },
2009
2047
  ZigUP_lock: {
2010
2048
  key: ['led'],
2011
2049
  convertSet: async (entity, key, value, meta) => {
@@ -2040,7 +2078,7 @@ const converters = {
2040
2078
  convertSet: async (entity, key, value, meta) => {
2041
2079
  if (['ZNCZ04LM', 'ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM', 'SSM-U01', 'SSM-U02', 'DLKZMK11LM', 'DLKZMK12LM',
2042
2080
  'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
2043
- 'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM'].includes(meta.mapped.model)) {
2081
+ 'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM'].includes(meta.mapped.model)) {
2044
2082
  await entity.write('aqaraOpple', {0x0201: {value: value ? 1 : 0, type: 0x10}}, manufacturerOptions.xiaomi);
2045
2083
  } else if (['ZNCZ02LM', 'QBCZ11LM'].includes(meta.mapped.model)) {
2046
2084
  const payload = value ?
@@ -2063,7 +2101,7 @@ const converters = {
2063
2101
  convertGet: async (entity, key, meta) => {
2064
2102
  if (['ZNCZ04LM', 'ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM', 'SSM-U01', 'SSM-U02', 'DLKZMK11LM', 'DLKZMK12LM',
2065
2103
  'WS-EUK01', 'WS-EUK02', 'WS-EUK03', 'WS-EUK04', 'QBKG19LM', 'QBKG20LM', 'QBKG25LM', 'QBKG26LM',
2066
- 'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM'].includes(meta.mapped.model)) {
2104
+ 'QBKG31LM', 'QBKG34LM', 'QBKG38LM', 'QBKG39LM', 'QBKG40LM', 'QBKG41LM', 'ZNDDMK11LM'].includes(meta.mapped.model)) {
2067
2105
  await entity.read('aqaraOpple', [0x0201]);
2068
2106
  } else if (['ZNCZ02LM', 'QBCZ11LM', 'ZNCZ11LM'].includes(meta.mapped.model)) {
2069
2107
  await entity.read('aqaraOpple', [0xFFF0]);
@@ -4490,6 +4528,9 @@ const converters = {
4490
4528
  // contactor
4491
4529
  'switch': 0x0003,
4492
4530
  'auto': 0x0004,
4531
+ // pilot wire
4532
+ 'pilot_on': 0x0002,
4533
+ 'pilot_off': 0x0001,
4493
4534
  };
4494
4535
 
4495
4536
  value = value.toLowerCase();
@@ -4502,6 +4543,15 @@ const converters = {
4502
4543
  await entity.read('manuSpecificLegrandDevices', [0x0000, 0x0001, 0x0002], manufacturerOptions.legrand);
4503
4544
  },
4504
4545
  },
4546
+ legrand_cableOutletMode: {
4547
+ key: ['cable_outlet_mode'],
4548
+ convertSet: async (entity, key, value, meta) => {
4549
+ meta.logger.warn('Feature under development !');
4550
+ },
4551
+ convertGet: async (entity, key, meta) => {
4552
+ await entity.read(64576, [0x0000], manufacturerOptions.legrand);
4553
+ },
4554
+ },
4505
4555
  legrand_powerAlarm: {
4506
4556
  key: ['power_alarm'],
4507
4557
  convertSet: async (entity, key, value, meta) => {
@@ -231,6 +231,14 @@ module.exports = [
231
231
  extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
232
232
  meta: {disableDefaultResponse: true},
233
233
  },
234
+ {
235
+ zigbeeModel: ['GL-C-003P'],
236
+ model: 'GL-C-003P',
237
+ vendor: 'Gledopto',
238
+ ota: ota.zigbeeOTA,
239
+ description: 'Zigbee LED Controller RGB (pro)',
240
+ extend: gledoptoExtend.light_onoff_brightness_color(),
241
+ },
234
242
  {
235
243
  zigbeeModel: ['GL-C-008P'],
236
244
  model: 'GL-C-008P',
@@ -297,4 +297,24 @@ module.exports = [
297
297
  toZigbee: [],
298
298
  exposes: [e.action(['press_once', 'press_twice'])],
299
299
  },
300
+ {
301
+ zigbeeModel: [' Cable outlet\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000' +
302
+ '\u0000\u0000'],
303
+ model: '064882',
304
+ vendor: 'Legrand',
305
+ description: 'Cable outlet with pilot wire and consumption measurement',
306
+ fromZigbee: [fz.legrand_device_mode, fz.legrand_cable_outlet_mode, fz.on_off, fz.electrical_measurement],
307
+ toZigbee: [tz.legrand_deviceMode, tz.legrand_cableOutletMode, tz.on_off, tz.electrical_measurement_power],
308
+ exposes: [exposes.enum('device_mode', ea.ALL, ['pilot_off', 'pilot_on']),
309
+ exposes.enum('cable_outlet_mode', ea.ALL, ['comfort', 'comfort-1', 'comfort-2', 'eco', 'frost_protection', 'off']),
310
+ exposes.switch().withState('state', true, 'Works only when the pilot wire is deactivated'),
311
+ e.power().withAccess(ea.STATE_GET)],
312
+ configure: async (device, coordinatorEndpoint, logger) => {
313
+ const endpoint = device.getEndpoint(1);
314
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 64576]);
315
+ await reporting.onOff(endpoint);
316
+ await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
317
+ await reporting.activePower(endpoint);
318
+ },
319
+ },
300
320
  ];
package/devices/orvibo.js CHANGED
@@ -74,6 +74,26 @@ module.exports = [
74
74
  await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
75
75
  },
76
76
  },
77
+ {
78
+ zigbeeModel: ['396483ce8b3f4e0d8e9d79079a35a420'],
79
+ model: 'CM10ZW',
80
+ vendor: 'ORVIBO',
81
+ description: 'Multi-functional 3 gang relay',
82
+ extend: extend.switch(),
83
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3')],
84
+ endpoint: (device) => {
85
+ return {l1: 1, l2: 2, l3: 3};
86
+ },
87
+ meta: {multiEndpoint: true},
88
+ configure: async (device, coordinatorEndpoint, logger) => {
89
+ const endpoint1 = device.getEndpoint(1);
90
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
91
+ const endpoint2 = device.getEndpoint(2);
92
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
93
+ const endpoint3 = device.getEndpoint(3);
94
+ await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
95
+ },
96
+ },
77
97
  {
78
98
  zigbeeModel: ['b467083cfc864f5e826459e5d8ea6079'],
79
99
  model: 'ST20',
package/devices/sinope.js CHANGED
@@ -304,17 +304,31 @@ module.exports = [
304
304
  model: 'WL4200',
305
305
  vendor: 'Sinopé',
306
306
  description: 'Zigbee smart water leak detector',
307
- fromZigbee: [fz.ias_water_leak_alarm_1],
307
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.temperature, fz.battery],
308
308
  toZigbee: [],
309
- exposes: [e.water_leak(), e.battery_low(), e.tamper()],
309
+ configure: async (device, coordinatorEndpoint) => {
310
+ const endpoint = device.getEndpoint(1);
311
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement']);
312
+ await reporting.temperature(endpoint, {min: 600, max: constants.repInterval.MAX, change: 100});
313
+ await reporting.batteryPercentageRemaining(endpoint);
314
+ await reporting.batteryAlarmState(endpoint);
315
+ },
316
+ exposes: [e.water_leak(), e.battery_low(), e.temperature(), e.battery()],
310
317
  },
311
318
  {
312
319
  zigbeeModel: ['WL4200S'],
313
320
  model: 'WL4200S',
314
321
  vendor: 'Sinopé',
315
- description: 'Zigbee smart water leak detector',
316
- fromZigbee: [fz.ias_water_leak_alarm_1],
322
+ description: 'Zigbee smart water leak detector with external sensor',
323
+ fromZigbee: [fz.ias_water_leak_alarm_1, fz.temperature, fz.battery],
317
324
  toZigbee: [],
318
- exposes: [e.water_leak(), e.battery_low(), e.tamper()],
325
+ configure: async (device, coordinatorEndpoint) => {
326
+ const endpoint = device.getEndpoint(1);
327
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement']);
328
+ await reporting.temperature(endpoint, {min: 600, max: constants.repInterval.MAX, change: 100});
329
+ await reporting.batteryPercentageRemaining(endpoint);
330
+ await reporting.batteryAlarmState(endpoint);
331
+ },
332
+ exposes: [e.water_leak(), e.battery_low(), e.temperature(), e.battery()],
319
333
  },
320
334
  ];
package/devices/xiaomi.js CHANGED
@@ -340,8 +340,8 @@ module.exports = [
340
340
  vendor: 'Xiaomi',
341
341
  description: 'Aqara smart wall switch H1 EU (no neutral, single rocker)',
342
342
  fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.aqara_opple],
343
- toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory],
344
- exposes: [e.switch(), e.action(['single', 'double']), e.power_outage_memory(),
343
+ toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_flip_indicator_light],
344
+ exposes: [e.switch(), e.action(['single', 'double']), e.power_outage_memory(), e.flip_indicator_light(),
345
345
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled']).withDescription('Decoupled mode')],
346
346
  onEvent: preventReset,
347
347
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -357,12 +357,12 @@ module.exports = [
357
357
  vendor: 'Xiaomi',
358
358
  description: 'Aqara smart wall switch H1 EU (no neutral, double rocker)',
359
359
  fromZigbee: [fz.on_off, fz.xiaomi_multistate_action, fz.aqara_opple],
360
- toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory],
360
+ toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory, tz.xiaomi_flip_indicator_light],
361
361
  meta: {multiEndpoint: true},
362
362
  endpoint: (_device) => {
363
363
  return {'left': 1, 'right': 2};
364
364
  },
365
- exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'), e.power_outage_memory(),
365
+ exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'), e.power_outage_memory(), e.flip_indicator_light(),
366
366
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
367
367
  .withDescription('Decoupled mode for left button')
368
368
  .withEndpoint('left'),
@@ -382,8 +382,9 @@ module.exports = [
382
382
  vendor: 'Xiaomi',
383
383
  description: 'Aqara smart wall switch H1 EU (with neutral, single rocker)',
384
384
  fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_multistate_action, fz.aqara_opple],
385
- toZigbee: [tz.on_off, tz.xiaomi_power, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory],
386
- exposes: [e.switch(), e.action(['single', 'double']), e.power().withAccess(ea.STATE_GET), e.energy(),
385
+ toZigbee: [tz.on_off, tz.xiaomi_power, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory,
386
+ tz.xiaomi_flip_indicator_light],
387
+ exposes: [e.switch(), e.action(['single', 'double']), e.power().withAccess(ea.STATE_GET), e.energy(), e.flip_indicator_light(),
387
388
  e.power_outage_memory(), e.temperature().withAccess(ea.STATE),
388
389
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled']).withDescription('Decoupled mode')],
389
390
  onEvent: preventReset,
@@ -400,7 +401,8 @@ module.exports = [
400
401
  vendor: 'Xiaomi',
401
402
  description: 'Aqara smart wall switch H1 EU (with neutral, double rocker)',
402
403
  fromZigbee: [fz.on_off, fz.xiaomi_power, fz.xiaomi_multistate_action, fz.aqara_opple],
403
- toZigbee: [tz.on_off, tz.xiaomi_power, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory],
404
+ toZigbee: [tz.on_off, tz.xiaomi_power, tz.xiaomi_switch_operation_mode_opple, tz.xiaomi_switch_power_outage_memory,
405
+ tz.xiaomi_flip_indicator_light],
404
406
  meta: {multiEndpoint: true},
405
407
  endpoint: (device) => {
406
408
  return {'left': 1, 'right': 2};
@@ -411,7 +413,7 @@ module.exports = [
411
413
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled']).withDescription('Decoupled mode for right button')
412
414
  .withEndpoint('right'),
413
415
  e.action(['single_left', 'double_left', 'single_right', 'double_right', 'single_both', 'double_both']),
414
- e.temperature().withAccess(ea.STATE), e.power_outage_memory()],
416
+ e.temperature().withAccess(ea.STATE), e.power_outage_memory(), e.flip_indicator_light()],
415
417
  onEvent: preventReset,
416
418
  configure: async (device, coordinatorEndpoint, logger) => {
417
419
  const endpoint1 = device.getEndpoint(1);
@@ -901,6 +903,30 @@ module.exports = [
901
903
  },
902
904
  ota: ota.zigbeeOTA,
903
905
  },
906
+ {
907
+ zigbeeModel: ['lumi.motion.ac01'],
908
+ model: 'RTCZCGQ11LM',
909
+ vendor: 'Xiaomi',
910
+ description: 'Aqara Presence Detector FP1 (regions not supported for now)',
911
+ fromZigbee: [fz.aqara_opple],
912
+ toZigbee: [tz.RTCZCGQ11LM_presence, tz.RTCZCGQ11LM_monitoring_mode, tz.RTCZCGQ11LM_approach_distance],
913
+ exposes: [e.presence().withAccess(ea.STATE_GET),
914
+ exposes.enum('presence_event', ea.STATE, ['enter', 'leave', 'left_enter', 'right_leave', 'right_enter', 'left_leave',
915
+ 'approach', 'away']).withDescription('Presence events: "enter", "leave", "left_enter", "right_leave", ' +
916
+ '"right_enter", "left_leave", "approach", "away"'),
917
+ exposes.enum('monitoring_mode', ea.ALL, ['undirected', 'left_right']).withDescription('Monitoring mode with or ' +
918
+ 'without considering right and left sides'),
919
+ exposes.enum('approach_distance', ea.ALL, ['far', 'medium', 'near']).withDescription('The distance at which the ' +
920
+ 'sensor detects approaching'),
921
+ exposes.numeric('power_outage_count', ea.STATE).withDescription('Number of power outages (since last pairing)')],
922
+ configure: async (device, coordinatorEndpoint, logger) => {
923
+ const endpoint = device.getEndpoint(1);
924
+ await endpoint.read('aqaraOpple', [0x0142], {manufacturerCode: 0x115f});
925
+ await endpoint.read('aqaraOpple', [0x0144], {manufacturerCode: 0x115f});
926
+ await endpoint.read('aqaraOpple', [0x0146], {manufacturerCode: 0x115f});
927
+ },
928
+ ota: ota.zigbeeOTA,
929
+ },
904
930
  {
905
931
  zigbeeModel: ['lumi.sensor_magnet'],
906
932
  model: 'MCCGQ01LM',
package/index.js CHANGED
@@ -75,7 +75,8 @@ function addDefinition(definition) {
75
75
  };
76
76
  }
77
77
 
78
- definition.toZigbee.push(tz.scene_store, tz.scene_recall, tz.scene_add, tz.scene_remove, tz.scene_remove_all, tz.read, tz.write);
78
+ definition.toZigbee.push(tz.scene_store, tz.scene_recall, tz.scene_add, tz.scene_remove, tz.scene_remove_all, tz.read, tz.write,
79
+ tz.command);
79
80
 
80
81
  if (definition.exposes && Array.isArray(definition.exposes) && !definition.exposes.find((e) => e.name === 'linkquality')) {
81
82
  definition.exposes = definition.exposes.concat([exposes.presets.linkquality()]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.404",
3
+ "version": "14.0.405",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.404",
3
+ "version": "14.0.405",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [