zigbee-herdsman-converters 14.0.514 → 14.0.515

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.
@@ -4359,7 +4359,8 @@ const converters = {
4359
4359
  // DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
4360
4360
  case tuya.dataPoints.tuyaSabCO2:
4361
4361
  if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
4362
- if (value === 0xaaab) return; // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
4362
+ // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
4363
+ if (value === 0xaaac || value === 0xaaab) return;
4363
4364
  return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
4364
4365
  } else if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
4365
4366
  return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd') / 100};
@@ -5927,6 +5928,29 @@ const converters = {
5927
5928
  return result;
5928
5929
  },
5929
5930
  },
5931
+ xiaomi_curtain_hagl04_status: {
5932
+ cluster: 'genMultistateOutput',
5933
+ type: ['attributeReport'],
5934
+ convert: (model, msg, publish, options, meta) => {
5935
+ let running = false;
5936
+ const data = msg.data;
5937
+ const lookup = {
5938
+ 0: 'closing',
5939
+ 1: 'opening',
5940
+ 2: 'stop',
5941
+ };
5942
+ if (data && data.hasOwnProperty('presentValue')) {
5943
+ const value = data['presentValue'];
5944
+ if (value < 2) {
5945
+ running = true;
5946
+ }
5947
+ return {
5948
+ motor_state: lookup[value],
5949
+ running: running,
5950
+ };
5951
+ }
5952
+ },
5953
+ },
5930
5954
  xiaomi_curtain_acn002_status: {
5931
5955
  cluster: 'genMultistateOutput',
5932
5956
  type: ['attributeReport'],
package/devices/tuya.js CHANGED
@@ -13,7 +13,7 @@ const utils = require('../lib/utils');
13
13
  const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
14
14
  '_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
15
15
  '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
16
- '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw'];
16
+ '_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit'];
17
17
 
18
18
  const tzLocal = {
19
19
  TS0504B_color: {
@@ -592,7 +592,8 @@ module.exports = [
592
592
  },
593
593
  },
594
594
  {
595
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aqnazj70'}, {modelID: 'TS0601', manufacturerName: 'TZE200_k6jhsr0q'}],
595
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aqnazj70'}, {modelID: 'TS0601', manufacturerName: '_TZE200_k6jhsr0q'},
596
+ {modelID: 'TS0601', manufacturerName: '_TZE200_di3tfv5b'}],
596
597
  model: 'TS0601_switch_4_gang',
597
598
  vendor: 'TuYa',
598
599
  description: '4 gang switch',
@@ -1382,6 +1383,7 @@ module.exports = [
1382
1383
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.ts011f_plug_indicator_mode, tz.ts011f_plug_child_mode],
1383
1384
  configure: async (device, coordinatorEndpoint, logger) => {
1384
1385
  const endpoint = device.getEndpoint(1);
1386
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
1385
1387
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
1386
1388
  await reporting.rmsVoltage(endpoint, {change: 5});
1387
1389
  await reporting.rmsCurrent(endpoint, {change: 50});
@@ -1418,15 +1420,11 @@ module.exports = [
1418
1420
  .withDescription('Plug LED indicator mode'), e.child_lock()],
1419
1421
  },
1420
1422
  {
1421
- fingerprint: [
1422
- {modelID: 'TS011F', manufacturerName: '_TZ3000_gjnozsaz', applicationVersion: 74},
1423
- {modelID: 'TS011F', manufacturerName: '_TZ3000_cehuw1lw', applicationVersion: 74},
1424
- ]
1425
- .concat(...TS011Fplugs.map((manufacturerName) => {
1426
- return [69, 68, 65, 64].map((applicationVersion) => {
1427
- return {modelID: 'TS011F', manufacturerName, applicationVersion};
1428
- });
1429
- })),
1423
+ fingerprint: [].concat(...TS011Fplugs.map((manufacturerName) => {
1424
+ return [69, 68, 65, 64].map((applicationVersion) => {
1425
+ return {modelID: 'TS011F', manufacturerName, applicationVersion};
1426
+ });
1427
+ })),
1430
1428
  model: 'TS011F_plug_3',
1431
1429
  description: 'Smart plug (with power monitoring by polling)',
1432
1430
  vendor: 'TuYa',
@@ -32,6 +32,8 @@ module.exports = [
32
32
  extend: extend.switch(),
33
33
  meta: {multiEndpoint: true},
34
34
  configure: async (device, coordinatorEndpoint, logger) => {
35
+ await device.getEndpoint(1).read('genBasic',
36
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
35
37
  for (const ID of [1, 2, 3, 4, 5]) {
36
38
  await reporting.bind(device.getEndpoint(ID), coordinatorEndpoint, ['genOnOff']);
37
39
  }
package/devices/xiaomi.js CHANGED
@@ -55,15 +55,10 @@ module.exports = [
55
55
  model: 'MCCGQ13LM',
56
56
  vendor: 'Xiaomi',
57
57
  description: 'Aqara P1 door & window contact sensor',
58
- fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple, fz.battery],
58
+ fromZigbee: [fz. xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
59
59
  toZigbee: [],
60
60
  meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
61
61
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
62
- configure: async (device, coordinatorEndpoint, logger) => {
63
- const endpoint = device.getEndpoint(1);
64
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
65
- await reporting.batteryVoltage(endpoint);
66
- },
67
62
  },
68
63
  {
69
64
  zigbeeModel: ['lumi.dimmer.rcbac1'],
@@ -1329,7 +1324,7 @@ module.exports = [
1329
1324
  model: 'ZNCLDJ12LM',
1330
1325
  vendor: 'Xiaomi',
1331
1326
  description: 'Aqara B1 curtain motor',
1332
- fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.battery, fz.xiaomi_curtain_position_tilt],
1327
+ fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt, fz.xiaomi_curtain_hagl04_status],
1333
1328
  toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
1334
1329
  onEvent: async (type, data, device) => {
1335
1330
  // The position (genAnalogOutput.presentValue) reported via an attribute contains an invaid value
@@ -1340,12 +1335,9 @@ module.exports = [
1340
1335
  },
1341
1336
  exposes: [e.cover_position().setAccess('state', ea.ALL), e.battery(),
1342
1337
  exposes.binary('running', ea.STATE, true, false)
1343
- .withDescription('Whether the motor is moving or not')],
1344
- configure: async (device, coordinatorEndpoint, logger) => {
1345
- const endpoint = device.endpoints[0];
1346
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
1347
- await reporting.batteryPercentageRemaining(endpoint);
1348
- },
1338
+ .withDescription('Whether the motor is moving or not'),
1339
+ exposes.enum('motor_state', ea.STATE, ['closing', 'opening', 'stop'])
1340
+ .withDescription('The current state of the motor.')],
1349
1341
  ota: ota.zigbeeOTA,
1350
1342
  },
1351
1343
  {
@@ -1909,15 +1901,10 @@ module.exports = [
1909
1901
  model: 'MCCGQ12LM',
1910
1902
  vendor: 'Xiaomi',
1911
1903
  description: 'Aqara T1 door & window contact sensor',
1912
- fromZigbee: [fz.xiaomi_contact, fz.battery],
1904
+ fromZigbee: [fz.xiaomi_contact, fz.aqara_opple],
1913
1905
  toZigbee: [],
1914
1906
  meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
1915
1907
  exposes: [e.contact(), e.battery(), e.battery_voltage()],
1916
- configure: async (device, coordinatorEndpoint, logger) => {
1917
- const endpoint = device.getEndpoint(1);
1918
- await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
1919
- await reporting.batteryVoltage(endpoint);
1920
- },
1921
1908
  },
1922
1909
  {
1923
1910
  zigbeeModel: ['lumi.plug.sacn02'],
package/lib/xiaomi.js CHANGED
@@ -251,7 +251,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
251
251
  if (humidity >= 0 && humidity <= 100) {
252
252
  payload.humidity = calibrateAndPrecisionRoundOptions(humidity, options, 'humidity');
253
253
  }
254
- } else if (['ZNJLBL01LM'].includes(model.model)) {
254
+ } else if (['ZNJLBL01LM', 'ZNCLDJ12LM'].includes(model.model)) {
255
255
  payload.battery = value;
256
256
  } else if (['RTCZCGQ11LM'].includes(model.model)) {
257
257
  payload.presence = {0: false, 1: true, 255: null}[value];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.514",
3
+ "version": "14.0.515",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [