zigbee-herdsman-converters 15.0.95 → 15.0.97

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.
@@ -7758,6 +7758,14 @@ const converters = {
7758
7758
  buttonMapping = {1: '1', 2: '2'};
7759
7759
  } else if (model.model === 'SBM300ZB3') {
7760
7760
  buttonMapping = {1: '1', 2: '2', 3: '3'};
7761
+ } else if (model.model === 'SBM300ZB4') {
7762
+ buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
7763
+ } else if (model.model === 'SBM300ZC2') {
7764
+ buttonMapping = {1: '1', 2: '2'};
7765
+ } else if (model.model === 'SBM300ZC3') {
7766
+ buttonMapping = {1: '1', 2: '2', 3: '3'};
7767
+ } else if (model.model === 'SBM300ZC4') {
7768
+ buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
7761
7769
  } else if (model.model === 'MSM-300ZB') {
7762
7770
  buttonMapping = {1: '1', 2: '2', 3: '3', 4: '4'};
7763
7771
  }
package/devices/climax.js CHANGED
@@ -112,7 +112,7 @@ module.exports = [
112
112
  exposes: [e.carbon_monoxide(), e.battery_low(), e.tamper(), e.battery()],
113
113
  },
114
114
  {
115
- zigbeeModel: ['KP-ACE_00.00.03.12TC'],
115
+ zigbeeModel: ['KP-ACE_00.00.03.12TC', 'KP-ACE_00.00.03.11TC'],
116
116
  model: 'KP-23EL-ZBS-ACE',
117
117
  vendor: 'Climax',
118
118
  description: 'Remote Keypad',
package/devices/lixee.js CHANGED
@@ -319,12 +319,51 @@ const tarifsDef = {
319
319
  'EJPHPM',
320
320
  'PEJP',
321
321
  ]},
322
+ stand_SEM_WE_LUNDI: {
323
+ fname: 'Standard - Sem WE Lundi',
324
+ currentTarf: 'SEM WE LUNDI', excluded: [
325
+ 'EASF07',
326
+ 'EASF08',
327
+ 'EASF09',
328
+ 'EASF10',
329
+ 'EASD02',
330
+ 'EASD03',
331
+ 'EASD04',
332
+ 'DPM1',
333
+ 'DPM2',
334
+ 'DPM3',
335
+ 'FPM1',
336
+ 'FPM2',
337
+ 'FPM3',
338
+ 'NJOURF',
339
+ 'NJOURF+1',
340
+ 'PJOURF+1',
341
+ 'PPOINTE1',
342
+ ]},
322
343
  stand_SEM_WE_MERCR: {
323
344
  fname: 'Standard - Sem WE Mercredi',
324
345
  currentTarf: 'SEM WE MERCREDI', excluded: [
325
- 'EASF04',
326
- 'EASF05',
327
- 'EASF06',
346
+ 'EASF07',
347
+ 'EASF08',
348
+ 'EASF09',
349
+ 'EASF10',
350
+ 'EASD02',
351
+ 'EASD03',
352
+ 'EASD04',
353
+ 'DPM1',
354
+ 'DPM2',
355
+ 'DPM3',
356
+ 'FPM1',
357
+ 'FPM2',
358
+ 'FPM3',
359
+ 'NJOURF',
360
+ 'NJOURF+1',
361
+ 'PJOURF+1',
362
+ 'PPOINTE1',
363
+ ]},
364
+ stand_SEM_WE_VENDR: {
365
+ fname: 'Standard - Sem WE Vendredi',
366
+ currentTarf: 'SEM WE VENDREDI', excluded: [
328
367
  'EASF07',
329
368
  'EASF08',
330
369
  'EASF09',
@@ -598,9 +637,15 @@ function getCurrentConfig(device, options, logger=console) {
598
637
  case linkyMode == linkyModeDef.legacy && currentTarf && currentTarf.startsWith(tarifsDef.histo_BBR.currentTarf):
599
638
  myExpose = myExpose.filter((a) => !tarifsDef.histo_BBR.excluded.includes(a.exposes.name));
600
639
  break;
640
+ case linkyMode == linkyModeDef.standard && tarifsDef.stand_SEM_WE_LUNDI.currentTarf:
641
+ myExpose = myExpose.filter((a) => !tarifsDef.stand_SEM_WE_LUNDI.excluded.includes(a.exposes.name));
642
+ break;
601
643
  case linkyMode == linkyModeDef.standard && tarifsDef.stand_SEM_WE_MERCR.currentTarf:
602
644
  myExpose = myExpose.filter((a) => !tarifsDef.stand_SEM_WE_MERCR.excluded.includes(a.exposes.name));
603
645
  break;
646
+ case linkyMode == linkyModeDef.standard && tarifsDef.stand_SEM_WE_VENDR.currentTarf:
647
+ myExpose = myExpose.filter((a) => !tarifsDef.stand_SEM_WE_VENDR.excluded.includes(a.exposes.name));
648
+ break;
604
649
  case linkyMode == linkyModeDef.standard && tarifsDef.stand_HPHC.currentTarf:
605
650
  myExpose = myExpose.filter((a) => !tarifsDef.stand_HPHC.excluded.includes(a.exposes.name));
606
651
  break;
@@ -518,6 +518,93 @@ module.exports = [
518
518
  await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
519
519
  },
520
520
  },
521
+ {
522
+ zigbeeModel: ['SBM300ZB4'],
523
+ model: 'SBM300ZB4',
524
+ vendor: 'ShinaSystem',
525
+ description: 'SiHAS remote control 4 button',
526
+ fromZigbee: [fz.sihas_action, fz.battery],
527
+ toZigbee: [],
528
+ exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
529
+ '3_single', '3_double', '3_long', '4_single', '4_double', '4_long']), e.battery(), e.battery_voltage()],
530
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
531
+ configure: async (device, coordinatorEndpoint, logger) => {
532
+ const endpoint = device.getEndpoint(1);
533
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
534
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
535
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
536
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
537
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
538
+ },
539
+ },
540
+ {
541
+ zigbeeModel: ['SBM300ZC1'],
542
+ model: 'SBM300ZC1',
543
+ vendor: 'ShinaSystem',
544
+ description: 'SiHAS remote control',
545
+ meta: {battery: {voltageToPercentage: '3V_2100'}},
546
+ fromZigbee: [fz.battery, fz.sihas_action],
547
+ toZigbee: [],
548
+ configure: async (device, coordinatorEndpoint, logger) => {
549
+ const endpoint = device.getEndpoint(1);
550
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
551
+ await reporting.batteryVoltage(endpoint);
552
+ },
553
+ exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'long'])],
554
+ },
555
+ {
556
+ zigbeeModel: ['SBM300ZC2'],
557
+ model: 'SBM300ZC2',
558
+ vendor: 'ShinaSystem',
559
+ description: 'SiHAS remote control 2 button',
560
+ fromZigbee: [fz.sihas_action, fz.battery],
561
+ toZigbee: [],
562
+ exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long']), e.battery(), e.battery_voltage()],
563
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
564
+ configure: async (device, coordinatorEndpoint, logger) => {
565
+ const endpoint = device.getEndpoint(1);
566
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
567
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
568
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
569
+ },
570
+ },
571
+ {
572
+ zigbeeModel: ['SBM300ZC3'],
573
+ model: 'SBM300ZC3',
574
+ vendor: 'ShinaSystem',
575
+ description: 'SiHAS remote control 3 button',
576
+ fromZigbee: [fz.sihas_action, fz.battery],
577
+ toZigbee: [],
578
+ exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
579
+ '3_single', '3_double', '3_long']), e.battery(), e.battery_voltage()],
580
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
581
+ configure: async (device, coordinatorEndpoint, logger) => {
582
+ const endpoint = device.getEndpoint(1);
583
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
584
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
585
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
586
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
587
+ },
588
+ },
589
+ {
590
+ zigbeeModel: ['SBM300ZC4'],
591
+ model: 'SBM300ZC4',
592
+ vendor: 'ShinaSystem',
593
+ description: 'SiHAS remote control 4 button',
594
+ fromZigbee: [fz.sihas_action, fz.battery],
595
+ toZigbee: [],
596
+ exposes: [e.action(['1_single', '1_double', '1_long', '2_single', '2_double', '2_long',
597
+ '3_single', '3_double', '3_long', '4_single', '4_double', '4_long']), e.battery(), e.battery_voltage()],
598
+ meta: {battery: {voltageToPercentage: '3V_2100'}, multiEndpoint: true},
599
+ configure: async (device, coordinatorEndpoint, logger) => {
600
+ const endpoint = device.getEndpoint(1);
601
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']);
602
+ await reporting.batteryVoltage(endpoint, {min: 30, max: 21600, change: 1});
603
+ await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
604
+ await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
605
+ await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
606
+ },
607
+ },
521
608
  {
522
609
  zigbeeModel: ['PMM-300Z1'],
523
610
  model: 'PMM-300Z1',
package/devices/tuya.js CHANGED
@@ -1000,6 +1000,20 @@ module.exports = [
1000
1000
  description: 'Zigbee LED bulb',
1001
1001
  extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [142, 500]}),
1002
1002
  },
1003
+ {
1004
+ zigbeeModel: ['SM0001'],
1005
+ model: 'SM0001',
1006
+ vendor: 'TuYa',
1007
+ description: 'Switch',
1008
+ extend: tuya.extend.switch(),
1009
+ configure: async (device, coordinatorEndpoint, logger) => {
1010
+ await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
1011
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
1012
+ },
1013
+ whiteLabel: [
1014
+ tuya.whitelabel('ZemiSmart', 'ZM-H7', 'Hand wave wall smart switch', ['_TZ3000_jcqs2mrv']),
1015
+ ],
1016
+ },
1003
1017
  {
1004
1018
  zigbeeModel: ['TS0505B'],
1005
1019
  model: 'TS0505B',
@@ -2231,7 +2245,6 @@ module.exports = [
2231
2245
  {modelID: 'TS0601', manufacturerName: '_TZE200_ol5jlkkr'},
2232
2246
  // Roller blinds:
2233
2247
  {modelID: 'TS0601', manufacturerName: '_TZE200_fctwhugx'},
2234
- {modelID: 'TS0601', manufacturerName: '_TZE200_zah67ekd'},
2235
2248
  {modelID: 'TS0601', manufacturerName: '_TZE200_hsgrhjpf'},
2236
2249
  {modelID: 'TS0601', manufacturerName: '_TZE200_pw7mji0l'},
2237
2250
  // Window pushers:
@@ -2258,7 +2271,6 @@ module.exports = [
2258
2271
  {vendor: 'TuYa', model: 'M515EGZT'},
2259
2272
  {vendor: 'TuYa', model: 'DT82LEMA-1.2N'},
2260
2273
  {vendor: 'TuYa', model: 'ZD82TN', description: 'Curtain motor'},
2261
- {vendor: 'Moes', model: 'AM43-0.45/40-ES-EB'},
2262
2274
  {vendor: 'Larkkey', model: 'ZSTY-SM-1SRZG-EU'},
2263
2275
  {vendor: 'Zemismart', model: 'ZM85EL-2Z', description: 'Roman Rod I type curtains track'},
2264
2276
  {vendor: 'Zemismart', model: 'AM43', description: 'Roller blind motor'},
@@ -2387,6 +2399,40 @@ module.exports = [
2387
2399
  ],
2388
2400
  },
2389
2401
  },
2402
+ {
2403
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_zah67ekd']),
2404
+ model: 'TS0601_cover_4',
2405
+ vendor: 'TuYa',
2406
+ description: 'Cover',
2407
+ fromZigbee: [tuya.fz.datapoints],
2408
+ toZigbee: [tuya.tz.datapoints],
2409
+ exposes: [
2410
+ e.cover_position().setAccess('position', ea.STATE_SET),
2411
+ exposes.enum('motor_direction', ea.STATE_SET, ['normal', 'reversed']).withDescription('Set the motor direction'),
2412
+ exposes.numeric('motor_speed', ea.STATE_SET).withValueMin(0).withValueMax(255).withDescription('Motor speed').withUnit('rpm'),
2413
+ exposes.enum('opening_mode', ea.STATE_SET, ['tilt', 'lift']).withDescription('Opening mode'),
2414
+ exposes.enum('set_upper_limit', ea.SET, ['SET']).withDescription('Set the upper limit, to reset limits use factory_reset'),
2415
+ exposes.enum('set_bottom_limit', ea.SET, ['SET']).withDescription('Set the bottom limit, to reset limits use factory_reset'),
2416
+ exposes.binary('factory_reset', ea.STATE_SET, true, false).withDescription('Factory reset the device'),
2417
+ ],
2418
+ whiteLabel: [
2419
+ tuya.whitelabel('Moes', 'AM43-0.45/40-ES-EB', 'Roller blind/shades drive motor', ['_TZE200_zah67ekd']),
2420
+ ],
2421
+ meta: {
2422
+ tuyaDatapoints: [
2423
+ [1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
2424
+ [2, 'position', tuya.valueConverter.coverPosition],
2425
+ [3, 'position', tuya.valueConverter.raw],
2426
+ [5, 'motor_direction', tuya.valueConverterBasic.lookup({'normal': tuya.enum(0), 'reversed': tuya.enum(1)})],
2427
+ [7, null, null], // work_state, not usefull, ignore
2428
+ [101, 'opening_mode', tuya.valueConverterBasic.lookup({'tilt': tuya.enum(0), 'lift': tuya.enum(1)})],
2429
+ [102, 'factory_reset', tuya.valueConverter.raw],
2430
+ [103, 'set_upper_limit', tuya.valueConverter.setLimit],
2431
+ [104, 'set_bottom_limit', tuya.valueConverter.setLimit],
2432
+ [105, 'motor_speed', tuya.valueConverter.raw],
2433
+ ],
2434
+ },
2435
+ },
2390
2436
  {
2391
2437
  fingerprint: tuya.fingerprint('TS0601', [
2392
2438
  '_TZE200_sur6q7ko', /* model: '3012732', vendor: 'LSC Smart Connect' */
package/lib/exposes.js CHANGED
@@ -344,13 +344,13 @@ class Cover extends Base {
344
344
 
345
345
  withPosition() {
346
346
  assert(!this.endpoint, 'Cannot add feature after adding endpoint');
347
- this.features.push(new Numeric('position', access.ALL).withValueMin(0).withValueMax(100).withDescription('Position of this cover'));
347
+ this.features.push(new Numeric('position', access.ALL).withValueMin(0).withValueMax(100).withDescription('Position of this cover').withUnit('%'));
348
348
  return this;
349
349
  }
350
350
 
351
351
  withTilt() {
352
352
  assert(!this.endpoint, 'Cannot add feature after adding endpoint');
353
- this.features.push(new Numeric('tilt', access.ALL).withValueMin(0).withValueMax(100).withDescription('Tilt of this cover'));
353
+ this.features.push(new Numeric('tilt', access.ALL).withValueMin(0).withValueMax(100).withDescription('Tilt of this cover').withUnit('%'));
354
354
  return this;
355
355
  }
356
356
  }
package/lib/tuya.js CHANGED
@@ -1252,6 +1252,13 @@ const valueConverter = {
1252
1252
  divideBy10: valueConverterBasic.divideBy(10),
1253
1253
  divideBy1000: valueConverterBasic.divideBy(1000),
1254
1254
  raw: valueConverterBasic.raw(),
1255
+ setLimit: {
1256
+ to: (v) => {
1257
+ if (!v) throw new Error('Limit cannot be unset, use factory_reset');
1258
+ return v;
1259
+ },
1260
+ from: (v) => v,
1261
+ },
1255
1262
  coverPosition: {
1256
1263
  to: async (v, meta) => {
1257
1264
  return meta.options.invert_cover ? 100 - v : v;
@@ -1644,7 +1651,8 @@ const tuyaTz = {
1644
1651
  'schedule_wednesday', 'schedule_thursday', 'schedule_friday', 'schedule_saturday', 'schedule_sunday', 'clear_fault',
1645
1652
  'scale_protection', 'error', 'radar_scene', 'radar_sensitivity', 'tumble_alarm_time', 'tumble_switch', 'fall_sensitivity',
1646
1653
  'min_temperature', 'max_temperature', 'window_detection', 'boost_heating', 'alarm_ringtone', 'alarm_time', 'fan_speed',
1647
- 'reverse_direction', 'border', 'click_control',
1654
+ 'reverse_direction', 'border', 'click_control', 'motor_direction', 'opening_mode', 'factory_reset', 'set_upper_limit', 'set_bottom_limit',
1655
+ 'motor_speed',
1648
1656
  ],
1649
1657
  convertSet: async (entity, key, value, meta) => {
1650
1658
  // 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.95",
3
+ "version": "15.0.97",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [