zigbee-herdsman-converters 15.0.110 → 15.0.112

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.
@@ -3,6 +3,60 @@ const extend = require('../lib/extend');
3
3
  const e = exposes.presets;
4
4
 
5
5
  module.exports = [
6
+ {
7
+ fingerprint: [
8
+ {modelID: 'HOMA1001', endpoints: [
9
+ {ID: 10, profileID: 49246, deviceID: 256, inputClusters: [0, 3, 4, 5, 6, 8], outputClusters: []},
10
+ {ID: 11, profileID: 49246, deviceID: 528, inputClusters: [0, 3, 4, 5, 6, 8, 768], outputClusters: []},
11
+ {ID: 13, profileID: 49246, deviceID: 57694, inputClusters: [4096], outputClusters: [4096]},
12
+ ]},
13
+ ],
14
+ model: 'HOMA1001_RGBW',
15
+ vendor: 'Shenzhen Homa',
16
+ description: 'Smart LED driver RGBW',
17
+ extend: extend.light_onoff_brightness_color(),
18
+ exposes: [e.light_brightness().withEndpoint('white'), e.light_brightness_colorxy().withEndpoint('rgb')],
19
+ meta: {multiEndpoint: true},
20
+ endpoint: (device) => {
21
+ return {white: 10, rgb: 11};
22
+ },
23
+ },
24
+ {
25
+ fingerprint: [
26
+ {modelID: 'HOMA1001', endpoints: [
27
+ {ID: 11, profileID: 49246, deviceID: 528, inputClusters: [0, 3, 4, 5, 6, 8, 768], outputClusters: []},
28
+ {ID: 13, profileID: 49246, deviceID: 57694, inputClusters: [4096], outputClusters: [4096]},
29
+ ]},
30
+ ],
31
+ model: 'HOMA1001_RGB',
32
+ vendor: 'Shenzhen Homa',
33
+ description: 'Smart LED driver RGB',
34
+ extend: extend.light_onoff_brightness_color(),
35
+ },
36
+ {
37
+ fingerprint: [
38
+ {modelID: 'HOMA1001', endpoints: [
39
+ {ID: 11, profileID: 49246, deviceID: 544, inputClusters: [0, 3, 4, 5, 6, 8, 768], outputClusters: []},
40
+ {ID: 13, profileID: 49246, deviceID: 57694, inputClusters: [4096], outputClusters: [4096]},
41
+ ]},
42
+ ],
43
+ model: 'HOMA1001_CT',
44
+ vendor: 'Shenzhen Homa',
45
+ description: 'Smart LED driver CT',
46
+ extend: extend.light_onoff_brightness(),
47
+ },
48
+ {
49
+ fingerprint: [
50
+ {modelID: 'HOMA1001', endpoints: [
51
+ {ID: 11, profileID: 49246, deviceID: 256, inputClusters: [0, 3, 4, 5, 6, 8], outputClusters: []},
52
+ {ID: 13, profileID: 49246, deviceID: 57694, inputClusters: [4096], outputClusters: [4096]},
53
+ ]},
54
+ ],
55
+ model: 'HOMA1001_SC',
56
+ vendor: 'Shenzhen Homa',
57
+ description: 'Smart LED driver SC',
58
+ extend: extend.light_onoff_brightness(),
59
+ },
6
60
  {
7
61
  zigbeeModel: ['HOMA1008', '00A'],
8
62
  model: 'HLD812-Z-SC',
@@ -18,7 +72,7 @@ module.exports = [
18
72
  extend: extend.light_onoff_brightness_colortemp(),
19
73
  },
20
74
  {
21
- zigbeeModel: ['HOMA1002', 'HOMA0019', 'HOMA0006', 'HOMA000F', '019', 'HOMA1004'],
75
+ zigbeeModel: ['HOMA1002', 'HOMA1004', 'HOMA0019', 'HOMA0006', 'HOMA000F', '019'],
22
76
  model: 'HLC610-Z',
23
77
  vendor: 'Shenzhen Homa',
24
78
  description: 'Wireless dimmable controller',
@@ -192,4 +192,19 @@ module.exports = [
192
192
  device.save();
193
193
  },
194
194
  },
195
+ {
196
+ zigbeeModel: ['3RVS01031Z'],
197
+ model: '3RVS01031Z',
198
+ vendor: 'Third Reality',
199
+ description: 'Zigbee vibration sensor',
200
+ fromZigbee: [fz.ias_vibration_alarm_1, fz.battery],
201
+ toZigbee: [],
202
+ exposes: [e.vibration(), e.battery_low(), e.battery(), e.battery_voltage()],
203
+ configure: async (device, coordinatorEndpoint, logger) => {
204
+ const endpoint = device.getEndpoint(1);
205
+ await endpoint.read('genPowerCfg', ['batteryPercentageRemaining']);
206
+ device.powerSource = 'Battery';
207
+ device.save();
208
+ },
209
+ },
195
210
  ];
package/devices/tuya.js CHANGED
@@ -1379,7 +1379,6 @@ module.exports = [
1379
1379
  await reporting.batteryPercentageRemaining(endpoint);
1380
1380
  await reporting.batteryVoltage(endpoint);
1381
1381
  },
1382
- whiteLabel: [{vendor: 'Linkoze', model: 'LKMSZ001'}],
1383
1382
  exposes: [e.battery(), e.battery_voltage(), e.occupancy(), e.action(['single', 'double', 'hold']),
1384
1383
  exposes.enum('light', ea.STATE, ['dark', 'bright'])],
1385
1384
  meta: {
@@ -1388,6 +1387,9 @@ module.exports = [
1388
1387
  [101, 'action', tuya.valueConverterBasic.lookup({'single': 0, 'double': 1, 'hold': 2})],
1389
1388
  ],
1390
1389
  },
1390
+ whiteLabel: [
1391
+ {vendor: 'Linkoze', model: 'LKMSZ001'},
1392
+ ],
1391
1393
  },
1392
1394
  {
1393
1395
  fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_jytabjkb'},
@@ -1407,6 +1409,9 @@ module.exports = [
1407
1409
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
1408
1410
  await reporting.batteryPercentageRemaining(endpoint);
1409
1411
  },
1412
+ whiteLabel: [
1413
+ tuya.whitelabel('TuYa', '809WZT', 'Motion sensor', ['_TZ3040_bb6xaihh']),
1414
+ ],
1410
1415
  },
1411
1416
  {
1412
1417
  fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_dr6sduka'},
@@ -1772,6 +1777,7 @@ module.exports = [
1772
1777
  whiteLabel: [
1773
1778
  {vendor: 'LoraTap', model: 'SC400'},
1774
1779
  tuya.whitelabel('Zemismart', 'ZN-LC1E', 'Smart curtain/shutter switch', ['_TZ3000_74hsp7qy']),
1780
+ tuya.whitelabel('Nous', 'L12Z', 'Smart ZigBee Curtain Module L12Z', ['_TZ3000_jwv3cwak']),
1775
1781
  ],
1776
1782
  exposes: [e.cover_position(), exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
1777
1783
  exposes.binary('calibration', ea.ALL, 'ON', 'OFF'), exposes.binary('motor_reversal', ea.ALL, 'ON', 'OFF'),
@@ -2275,7 +2281,7 @@ module.exports = [
2275
2281
  },
2276
2282
  {
2277
2283
  fingerprint: tuya.fingerprint('TS0001', ['_TZ3000_xkap8wtb', '_TZ3000_qnejhcsu', '_TZ3000_x3ewpzyr',
2278
- '_TZ3000_mkhkxx1p', '_TZ3000_tgddllx4']),
2284
+ '_TZ3000_mkhkxx1p', '_TZ3000_tgddllx4', '_TZ3000_kqvb5akv']),
2279
2285
  model: 'TS0001_power',
2280
2286
  description: 'Switch with power monitoring',
2281
2287
  vendor: 'TuYa',
@@ -2320,6 +2326,9 @@ module.exports = [
2320
2326
  device.save();
2321
2327
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
2322
2328
  },
2329
+ whiteLabel: [
2330
+ tuya.whitelabel('TuYa', 'XSH01B', '2 gang switch module with power monitoring', ['_TZ3000_irrmjcgi']),
2331
+ ],
2323
2332
  },
2324
2333
  {
2325
2334
  fingerprint: tuya.fingerprint('TS000F', ['_TZ3000_xkap8wtb']),
@@ -2509,6 +2518,7 @@ module.exports = [
2509
2518
  {modelID: 'TS0601', manufacturerName: '_TZE200_cf1sl3tj'},
2510
2519
  {modelID: 'TS0601', manufacturerName: '_TZE200_b2u1drdv'},
2511
2520
  {modelID: 'TS0601', manufacturerName: '_TZE200_ol5jlkkr'},
2521
+ {modelID: 'TS0601', manufacturerName: '_TZE204_guvc7pdy'},
2512
2522
  // Roller blinds:
2513
2523
  {modelID: 'TS0601', manufacturerName: '_TZE200_fctwhugx'},
2514
2524
  {modelID: 'TS0601', manufacturerName: '_TZE200_hsgrhjpf'},
@@ -2545,6 +2555,7 @@ module.exports = [
2545
2555
  {vendor: 'Zemismart', model: 'BCM500DS-TYZ', description: 'Curtain motor'},
2546
2556
  {vendor: 'A-OK', model: 'AM25', description: 'Tubular motor'},
2547
2557
  {vendor: 'Alutech', model: 'AM/R-Sm', description: 'Tubular motor'},
2558
+ tuya.whitelabel('Shenzhen Golden Security Technology', 'GM46', 'Curtain motor', ['_TZE204_guvc7pdy']),
2548
2559
  tuya.whitelabel('Zemismart', 'ZM85EL-2Z', 'Roman Rod I type U curtains track', ['_TZE200_cf1sl3tj']),
2549
2560
  ],
2550
2561
  fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
@@ -2572,6 +2583,41 @@ module.exports = [
2572
2583
  toZigbee: [tz.tuya_cover_control],
2573
2584
  exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
2574
2585
  },
2586
+ {
2587
+ fingerprint: [
2588
+ {modelID: 'TS0601', manufacturerName: '_TZE200_cpbo62rn'},
2589
+ ],
2590
+ model: 'TS0601_cover_6',
2591
+ vendor: 'TuYa',
2592
+ description: 'Cover motor',
2593
+ fromZigbee: [tuya.fz.datapoints],
2594
+ toZigbee: [tuya.tz.datapoints],
2595
+ exposes: [
2596
+ exposes.text('work_state', ea.STATE),
2597
+ e.cover_position().setAccess('position', ea.STATE_SET),
2598
+ e.battery(),
2599
+ exposes.enum('opening_mode', ea.STATE_SET, ['tilt', 'lift']).withDescription('Opening mode'),
2600
+ exposes.enum('motor_direction', ea.STATE_SET, ['left', 'right']).withDescription('Motor side'),
2601
+ exposes.enum('set_upper_limit', ea.STATE_SET, ['start', 'stop']).withDescription('Learning'),
2602
+ exposes.enum('factory_reset', ea.STATE_SET, ['SET']).withDescription('Remove limits'),
2603
+ ],
2604
+ whiteLabel: [
2605
+ tuya.whitelabel('TuYa', 'LY-108', 'Cover', ['_TZE200_cpbo62rn']),
2606
+ ],
2607
+ meta: {
2608
+ tuyaDatapoints: [
2609
+ [1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
2610
+ [2, 'position', tuya.valueConverter.coverPosition],
2611
+ [3, 'position', tuya.valueConverter.raw],
2612
+ [4, 'opening_mode', tuya.valueConverterBasic.lookup({'tilt': tuya.enum(0), 'lift': tuya.enum(1)})],
2613
+ [7, 'work_state', tuya.valueConverterBasic.lookup({'standby': tuya.enum(0), 'success': tuya.enum(1), 'learning': tuya.enum(2)})],
2614
+ [13, 'battery', tuya.valueConverter.raw],
2615
+ [101, 'motor_direction', tuya.valueConverterBasic.lookup({'left': tuya.enum(0), 'right': tuya.enum(1)})],
2616
+ [102, 'set_upper_limit', tuya.valueConverterBasic.lookup({'start': tuya.enum(1), 'stop': tuya.enum(0)})],
2617
+ [107, 'factory_reset', tuya.valueConverter.setLimit],
2618
+ ],
2619
+ },
2620
+ },
2575
2621
  {
2576
2622
  zigbeeModel: ['kud7u2l'],
2577
2623
  fingerprint: [
package/devices/xiaomi.js CHANGED
@@ -10,7 +10,7 @@ const ea = exposes.access;
10
10
  const globalStore = require('../lib/store');
11
11
  const xiaomi = require('../lib/xiaomi');
12
12
  const utils = require('../lib/utils');
13
- const {printNumberAsHex, printNumbersAsHexSequence} = utils;
13
+ const {printNumbersAsHexSequence} = utils;
14
14
  const {fp1, manufacturerCode, trv} = xiaomi;
15
15
 
16
16
  const xiaomiExtend = {
@@ -35,12 +35,11 @@ const preventReset = async (type, data, device) => {
35
35
  ) {
36
36
  return;
37
37
  }
38
- const options = {manufacturerCode: 0x115f};
39
38
  const payload = {[0xfff0]: {
40
39
  value: [0xaa, 0x10, 0x05, 0x41, 0x47, 0x01, 0x01, 0x10, 0x01],
41
40
  type: 0x41,
42
41
  }};
43
- await device.getEndpoint(1).write('genBasic', payload, options);
42
+ await device.getEndpoint(1).write('genBasic', payload, {manufacturerCode});
44
43
  };
45
44
 
46
45
  const daysLookup = {
@@ -253,7 +252,6 @@ const fzLocal = {
253
252
 
254
253
  Object.entries(msg.data).forEach(([key, value]) => {
255
254
  const eventKey = parseInt(key);
256
- const eventKeyHex = printNumberAsHex(eventKey, 4);
257
255
 
258
256
  switch (eventKey) {
259
257
  case fp1.constants.region_event_key: {
@@ -287,21 +285,6 @@ const fzLocal = {
287
285
  payload.action = `region_${regionId}_${eventTypeName}`;
288
286
  break;
289
287
  }
290
- case 0xf7: {
291
- const valueHexSequence = printNumbersAsHexSequence(value, 2);
292
- log('debug', `Unhandled key ${eventKeyHex} = ${valueHexSequence}`);
293
- break;
294
- }
295
- case 0x0142:
296
- case 0x0143:
297
- case 0x0144:
298
- case 0x0146: {
299
- log('debug', `Unhandled key ${eventKeyHex} = ${value}`);
300
- break;
301
- }
302
- default: {
303
- log('warn', `Unknown key ${eventKeyHex} = ${value}`);
304
- }
305
288
  }
306
289
  });
307
290
 
@@ -354,6 +337,18 @@ const fzLocal = {
354
337
  };
355
338
 
356
339
  const tzLocal = {
340
+ aqara_detection_distance: {
341
+ key: ['detection_distance'],
342
+ convertSet: async (entity, key, value, meta) => {
343
+ value = value.toLowerCase();
344
+ const lookup = {'10mm': 1, '20mm': 2, '30mm': 3};
345
+ await entity.write('aqaraOpple', {0x010C: {value: lookup[value], type: 0x20}}, {manufacturerCode});
346
+ return {state: {detection_distance: value}};
347
+ },
348
+ convertGet: async (entity, key, meta) => {
349
+ await entity.read('aqaraOpple', [0x010C], {manufacturerCode});
350
+ },
351
+ },
357
352
  aqara_trv: {
358
353
  key: ['system_mode', 'preset', 'window_detection', 'valve_detection', 'child_lock', 'away_preset_temperature',
359
354
  'calibrate', 'sensor', 'sensor_temp', 'identify', 'schedule', 'schedule_settings'],
@@ -743,10 +738,12 @@ module.exports = [
743
738
  vendor: 'Xiaomi',
744
739
  description: 'Aqara P1 door & window contact sensor',
745
740
  fromZigbee: [fz.xiaomi_contact, fz.ias_contact_alarm_1, fz.aqara_opple],
746
- toZigbee: [],
741
+ toZigbee: [tzLocal.aqara_detection_distance],
747
742
  meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
748
743
  exposes: [e.contact(), e.battery(), e.battery_voltage(),
749
744
  exposes.binary('battery_cover', ea.STATE, 'OPEN', 'CLOSE'),
745
+ exposes.enum('detection_distance', ea.ALL, ['10mm', '20mm', '30mm'])
746
+ .withDescription('The sensor will be considered "off" within the set distance. Please press the device button before setting'),
750
747
  ],
751
748
  },
752
749
  {
package/lib/xiaomi.js CHANGED
@@ -374,6 +374,8 @@ const numericAttributes2Payload = async (msg, meta, model, options, dataObject)
374
374
  case '159':
375
375
  if (['JT-BZ-01AQ/A'].includes(model.model)) {
376
376
  payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[value];
377
+ } else if (['MCCGQ13LM'].includes(model.model)) {
378
+ payload.detection_distance = {1: '10mm', 2: '20mm', 3: '30mm'}[value];
377
379
  }
378
380
  break;
379
381
  case '160':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "15.0.110",
3
+ "version": "15.0.112",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [