zigbee-herdsman-converters 15.0.96 → 15.0.98

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
  }
@@ -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',
@@ -2114,11 +2128,14 @@ module.exports = [
2114
2128
  },
2115
2129
  {
2116
2130
  fingerprint: tuya.fingerprint('TS0002', ['_TZ3000_01gpyda5', '_TZ3000_bvrlqyj7', '_TZ3000_7ed9cqgi',
2117
- '_TZ3000_zmy4lslw', '_TZ3000_ruxexjfz']),
2131
+ '_TZ3000_zmy4lslw', '_TZ3000_ruxexjfz', '_TZ3000_4xfqlgqo']),
2118
2132
  model: 'TS0002_switch_module',
2119
2133
  vendor: 'TuYa',
2120
2134
  description: '2 gang switch module',
2121
- whiteLabel: [{vendor: 'OXT', model: 'SWTZ22'}, {vendor: 'Nous', model: 'L13Z'}],
2135
+ whiteLabel: [
2136
+ {vendor: 'OXT', model: 'SWTZ22'}, {vendor: 'Nous', model: 'L13Z'},
2137
+ tuya.whitelabel('pcblab.io', 'RR620ZB', '2 gang Zigbee switch module', ['_TZ3000_4xfqlgqo']),
2138
+ ],
2122
2139
  extend: tuya.extend.switch({switchType: true, endpoints: ['l1', 'l2']}),
2123
2140
  endpoint: (device) => {
2124
2141
  return {'l1': 1, 'l2': 2};
@@ -2231,7 +2248,6 @@ module.exports = [
2231
2248
  {modelID: 'TS0601', manufacturerName: '_TZE200_ol5jlkkr'},
2232
2249
  // Roller blinds:
2233
2250
  {modelID: 'TS0601', manufacturerName: '_TZE200_fctwhugx'},
2234
- {modelID: 'TS0601', manufacturerName: '_TZE200_zah67ekd'},
2235
2251
  {modelID: 'TS0601', manufacturerName: '_TZE200_hsgrhjpf'},
2236
2252
  {modelID: 'TS0601', manufacturerName: '_TZE200_pw7mji0l'},
2237
2253
  // Window pushers:
@@ -2258,7 +2274,6 @@ module.exports = [
2258
2274
  {vendor: 'TuYa', model: 'M515EGZT'},
2259
2275
  {vendor: 'TuYa', model: 'DT82LEMA-1.2N'},
2260
2276
  {vendor: 'TuYa', model: 'ZD82TN', description: 'Curtain motor'},
2261
- {vendor: 'Moes', model: 'AM43-0.45/40-ES-EB'},
2262
2277
  {vendor: 'Larkkey', model: 'ZSTY-SM-1SRZG-EU'},
2263
2278
  {vendor: 'Zemismart', model: 'ZM85EL-2Z', description: 'Roman Rod I type curtains track'},
2264
2279
  {vendor: 'Zemismart', model: 'AM43', description: 'Roller blind motor'},
@@ -2387,6 +2402,40 @@ module.exports = [
2387
2402
  ],
2388
2403
  },
2389
2404
  },
2405
+ {
2406
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_zah67ekd']),
2407
+ model: 'TS0601_cover_4',
2408
+ vendor: 'TuYa',
2409
+ description: 'Cover',
2410
+ fromZigbee: [tuya.fz.datapoints],
2411
+ toZigbee: [tuya.tz.datapoints],
2412
+ exposes: [
2413
+ e.cover_position().setAccess('position', ea.STATE_SET),
2414
+ exposes.enum('motor_direction', ea.STATE_SET, ['normal', 'reversed']).withDescription('Set the motor direction'),
2415
+ exposes.numeric('motor_speed', ea.STATE_SET).withValueMin(0).withValueMax(255).withDescription('Motor speed').withUnit('rpm'),
2416
+ exposes.enum('opening_mode', ea.STATE_SET, ['tilt', 'lift']).withDescription('Opening mode'),
2417
+ exposes.enum('set_upper_limit', ea.SET, ['SET']).withDescription('Set the upper limit, to reset limits use factory_reset'),
2418
+ exposes.enum('set_bottom_limit', ea.SET, ['SET']).withDescription('Set the bottom limit, to reset limits use factory_reset'),
2419
+ exposes.binary('factory_reset', ea.STATE_SET, true, false).withDescription('Factory reset the device'),
2420
+ ],
2421
+ whiteLabel: [
2422
+ tuya.whitelabel('Moes', 'AM43-0.45/40-ES-EB', 'Roller blind/shades drive motor', ['_TZE200_zah67ekd']),
2423
+ ],
2424
+ meta: {
2425
+ tuyaDatapoints: [
2426
+ [1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
2427
+ [2, 'position', tuya.valueConverter.coverPosition],
2428
+ [3, 'position', tuya.valueConverter.raw],
2429
+ [5, 'motor_direction', tuya.valueConverterBasic.lookup({'normal': tuya.enum(0), 'reversed': tuya.enum(1)})],
2430
+ [7, null, null], // work_state, not usefull, ignore
2431
+ [101, 'opening_mode', tuya.valueConverterBasic.lookup({'tilt': tuya.enum(0), 'lift': tuya.enum(1)})],
2432
+ [102, 'factory_reset', tuya.valueConverter.raw],
2433
+ [103, 'set_upper_limit', tuya.valueConverter.setLimit],
2434
+ [104, 'set_bottom_limit', tuya.valueConverter.setLimit],
2435
+ [105, 'motor_speed', tuya.valueConverter.raw],
2436
+ ],
2437
+ },
2438
+ },
2390
2439
  {
2391
2440
  fingerprint: tuya.fingerprint('TS0601', [
2392
2441
  '_TZE200_sur6q7ko', /* model: '3012732', vendor: 'LSC Smart Connect' */
@@ -3029,14 +3078,13 @@ module.exports = [
3029
3078
  whiteLabel: [{vendor: 'Hiking', model: 'DDS238-2'}, {vendor: 'TuYa', model: 'RC-MCB'}],
3030
3079
  },
3031
3080
  {
3032
- fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lsanae15']),
3081
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lsanae15', '_TZE204_lsanae15']),
3033
3082
  model: 'TS0601_din_2',
3034
3083
  vendor: 'TuYa',
3035
3084
  description: 'Zigbee DIN energy meter',
3036
3085
  fromZigbee: [tuya.fz.datapoints],
3037
3086
  toZigbee: [tuya.tz.datapoints],
3038
3087
  configure: tuya.configureMagicPacket,
3039
- whiteLabel: [{vendor: 'XOCA', model: 'DAC2161C'}],
3040
3088
  exposes: [tuya.exposes.switch(), e.energy(), e.power(), e.voltage(), e.current(),
3041
3089
  exposes.enum('fault', ea.STATE, ['clear', 'over_current_threshold', 'over_power_threshold',
3042
3090
  'over_voltage threshold', 'wrong_frequency_threshold']).withDescription('Fault status of the device (clear = nothing)'),
@@ -3075,6 +3123,9 @@ module.exports = [
3075
3123
  [24, null, null], // Forward Energy T4 - don't know what this
3076
3124
  ],
3077
3125
  },
3126
+ whiteLabel: [
3127
+ tuya.whitelabel('MatSee Plus', 'DAC2161C', 'Smart Zigbee energy meter 80A din rail', ['_TZE200_lsanae15', '_TZE204_lsanae15']),
3128
+ ],
3078
3129
  },
3079
3130
  {
3080
3131
  fingerprint: tuya.fingerprint('TS0601', ['_TZE200_rhblgy0z']),
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.96",
3
+ "version": "15.0.98",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [