zigbee-herdsman-converters 15.0.96 → 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.
- package/converters/fromZigbee.js +8 -0
- package/devices/shinasystem.js +87 -0
- package/devices/tuya.js +48 -2
- package/lib/tuya.js +9 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -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/shinasystem.js
CHANGED
|
@@ -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/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
|