zigbee-herdsman-converters 15.0.101 → 15.0.103
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/devices/bosch.js +1 -1
- package/devices/ledvance.js +1 -1
- package/devices/samotech.js +31 -0
- package/devices/tuya.js +238 -19
- package/lib/tuya.js +2 -2
- package/package.json +1 -1
package/devices/bosch.js
CHANGED
|
@@ -860,7 +860,7 @@ const definition = [
|
|
|
860
860
|
zigbeeModel: ['RBSH-MMS-ZB-EU'],
|
|
861
861
|
model: 'BMCT-SLZ',
|
|
862
862
|
vendor: 'Bosch',
|
|
863
|
-
description: '
|
|
863
|
+
description: 'Light/shutter control unit II',
|
|
864
864
|
fromZigbee: [fzLocal.bmct, fz.cover_position_tilt, fz.on_off, fz.power_on_behavior],
|
|
865
865
|
toZigbee: [tzLocal.bmct, tz.cover_position_tilt, tz.on_off, tz.power_on_behavior],
|
|
866
866
|
meta: {multiEndpoint: true},
|
package/devices/ledvance.js
CHANGED
|
@@ -31,7 +31,7 @@ module.exports = [
|
|
|
31
31
|
zigbeeModel: ['Panel TW Z3'],
|
|
32
32
|
model: '4058075181472',
|
|
33
33
|
vendor: 'LEDVANCE',
|
|
34
|
-
description: 'SMART+ panel
|
|
34
|
+
description: 'SMART+ panel 60x60cm/120x30cm tunable white',
|
|
35
35
|
extend: extend.ledvance.light_onoff_brightness_colortemp(),
|
|
36
36
|
ota: ota.ledvance,
|
|
37
37
|
},
|
package/devices/samotech.js
CHANGED
|
@@ -27,6 +27,37 @@ module.exports = [
|
|
|
27
27
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
zigbeeModel: ['SM308-2CH'],
|
|
32
|
+
model: 'SM308-2CH',
|
|
33
|
+
vendor: 'Samotech',
|
|
34
|
+
description: 'Zigbee 2 channel in wall switch',
|
|
35
|
+
extend: extend.switch({fromZigbee: [fz.electrical_measurement, fz.metering]}),
|
|
36
|
+
exposes: [
|
|
37
|
+
e.switch().withEndpoint('l1'),
|
|
38
|
+
e.switch().withEndpoint('l2'),
|
|
39
|
+
e.power_on_behavior().withEndpoint('l1'),
|
|
40
|
+
e.power_on_behavior().withEndpoint('l2'),
|
|
41
|
+
e.power(), e.current(), e.voltage(), e.energy()],
|
|
42
|
+
endpoint: (device) => {
|
|
43
|
+
return {'l1': 1, 'l2': 2};
|
|
44
|
+
},
|
|
45
|
+
meta: {multiEndpoint: true},
|
|
46
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
47
|
+
const endpoint1 = device.getEndpoint(1);
|
|
48
|
+
const endpoint2 = device.getEndpoint(2);
|
|
49
|
+
const endpoint11 = device.getEndpoint(11);
|
|
50
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
|
|
51
|
+
await reporting.bind(endpoint2, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
|
|
52
|
+
await reporting.bind(endpoint11, coordinatorEndpoint, ['genOta', 'haElectricalMeasurement', 'seMetering']);
|
|
53
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint11);
|
|
54
|
+
await reporting.readMeteringMultiplierDivisor(endpoint11);
|
|
55
|
+
await reporting.rmsVoltage(endpoint11, {min: 10, change: 20});
|
|
56
|
+
await reporting.rmsCurrent(endpoint11, {min: 10, change: 10});
|
|
57
|
+
await reporting.activePower(endpoint11, {min: 10, change: 15});
|
|
58
|
+
await reporting.currentSummDelivered(endpoint11, {min: 300});
|
|
59
|
+
},
|
|
60
|
+
},
|
|
30
61
|
{
|
|
31
62
|
zigbeeModel: ['SM309-S'],
|
|
32
63
|
model: 'SM309-S',
|
package/devices/tuya.js
CHANGED
|
@@ -1201,7 +1201,9 @@ module.exports = [
|
|
|
1201
1201
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_rk2yzt0u'},
|
|
1202
1202
|
{modelID: 'TS0001', manufacturerName: '_TZ3000_o4cjetlm'}, {manufacturerName: '_TZ3000_o4cjetlm'},
|
|
1203
1203
|
{modelID: 'TS0001', manufacturerName: '_TZ3000_iedbgyxt'}, {modelID: 'TS0001', manufacturerName: '_TZ3000_h3noz0a5'},
|
|
1204
|
-
{modelID: 'TS0001', manufacturerName: '_TYZB01_4tlksk8a'}, {modelID: 'TS0011', manufacturerName: '_TYZB01_rifa0wlb'}
|
|
1204
|
+
{modelID: 'TS0001', manufacturerName: '_TYZB01_4tlksk8a'}, {modelID: 'TS0011', manufacturerName: '_TYZB01_rifa0wlb'},
|
|
1205
|
+
{modelID: 'TS0001', manufacturerName: '_TZ3000_5ucujjts'},
|
|
1206
|
+
],
|
|
1205
1207
|
model: 'ZN231392',
|
|
1206
1208
|
vendor: 'TuYa',
|
|
1207
1209
|
description: 'Smart water/gas valve',
|
|
@@ -1284,6 +1286,7 @@ module.exports = [
|
|
|
1284
1286
|
tuya.whitelabel('Lidl', 'HG08010', 'Livarno Home outdoor spotlight', ['_TZ3210_umi6vbsz']),
|
|
1285
1287
|
tuya.whitelabel('Lidl', 'HG08008', 'Livarno Home LED ceiling light', ['_TZ3210_p9ao60da']),
|
|
1286
1288
|
tuya.whitelabel('Lidl', 'HG08007', 'Livarno Home outdoor LED band', ['_TZ3210_zbabx9wh']),
|
|
1289
|
+
tuya.whitelabel('Lidl', '399629_2110', 'Livarno Lux Ceiling Panel RGB+CCT', ['_TZ3210_c0s1xloa']),
|
|
1287
1290
|
],
|
|
1288
1291
|
extend: tuya.extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500], noConfigure: true}),
|
|
1289
1292
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -1291,13 +1294,12 @@ module.exports = [
|
|
|
1291
1294
|
},
|
|
1292
1295
|
},
|
|
1293
1296
|
{
|
|
1294
|
-
fingerprint: tuya.fingerprint('TS0505B', ['
|
|
1297
|
+
fingerprint: tuya.fingerprint('TS0505B', ['_TZ3210_iystcadi']),
|
|
1295
1298
|
model: 'TS0505B_2',
|
|
1296
1299
|
vendor: 'TuYa',
|
|
1297
1300
|
description: 'Zigbee RGB+CCT light',
|
|
1298
1301
|
whiteLabel: [
|
|
1299
1302
|
tuya.whitelabel('Lidl', '14149505L/14149506L_2', 'Livarno Lux light bar RGB+CCT (black/white)', ['_TZ3210_iystcadi']),
|
|
1300
|
-
tuya.whitelabel('Lidl', '399629_2110', 'Livarno Lux Ceiling Panel RGB+CCT', ['_TZ3210_c0s1xloa']),
|
|
1301
1303
|
],
|
|
1302
1304
|
toZigbee: [tz.on_off, tzLocal.led_control],
|
|
1303
1305
|
fromZigbee: [fz.on_off, fz.tuya_led_controller, fz.brightness, fz.ignore_basic_report],
|
|
@@ -1818,7 +1820,7 @@ module.exports = [
|
|
|
1818
1820
|
},
|
|
1819
1821
|
},
|
|
1820
1822
|
{
|
|
1821
|
-
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_aqnazj70', '_TZE200_k6jhsr0q', '_TZE200_di3tfv5b', '_TZE200_mexisfik']),
|
|
1823
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_aqnazj70', '_TZE200_k6jhsr0q', '_TZE200_di3tfv5b', '_TZE200_mexisfik', '_TZE204_6wi2mope']),
|
|
1822
1824
|
model: 'TS0601_switch_4_gang',
|
|
1823
1825
|
vendor: 'TuYa',
|
|
1824
1826
|
description: '4 gang switch',
|
|
@@ -2205,7 +2207,8 @@ module.exports = [
|
|
|
2205
2207
|
vendor: 'TuYa',
|
|
2206
2208
|
description: 'Wireless switch with 4 buttons',
|
|
2207
2209
|
whiteLabel: [{vendor: 'Lonsonho', model: 'TS0044'}, {vendor: 'Haozee', model: 'ESW-OZAA-EU'},
|
|
2208
|
-
{vendor: 'LoraTap', model: 'SS6400ZB'}, {vendor: 'Moes', model: 'ZT-SY-EU-G-4S-WH-MS'}
|
|
2210
|
+
{vendor: 'LoraTap', model: 'SS6400ZB'}, {vendor: 'Moes', model: 'ZT-SY-EU-G-4S-WH-MS'},
|
|
2211
|
+
tuya.whitelabel('Moes', 'ZT-SR-EU4', 'Star Ring 4 Gang Scene Switch', ['_TZ3000_a4xycprs'])],
|
|
2209
2212
|
fromZigbee: [fz.tuya_on_off_action, fz.battery],
|
|
2210
2213
|
exposes: [e.battery(), e.action(['1_single', '1_double', '1_hold', '2_single', '2_double', '2_hold',
|
|
2211
2214
|
'3_single', '3_double', '3_hold', '4_single', '4_double', '4_hold'])],
|
|
@@ -2347,7 +2350,8 @@ module.exports = [
|
|
|
2347
2350
|
description: '1 gang switch',
|
|
2348
2351
|
extend: tuya.extend.switch(),
|
|
2349
2352
|
whiteLabel: [{vendor: 'CR Smart Home', model: 'TS0001', description: 'Valve control'}, {vendor: 'Lonsonho', model: 'X701'},
|
|
2350
|
-
{vendor: 'Bandi', model: 'BDS03G1'}
|
|
2353
|
+
{vendor: 'Bandi', model: 'BDS03G1'},
|
|
2354
|
+
],
|
|
2351
2355
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2352
2356
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
2353
2357
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
@@ -2391,8 +2395,9 @@ module.exports = [
|
|
|
2391
2395
|
vendor: 'TuYa',
|
|
2392
2396
|
description: '2 gang switch module',
|
|
2393
2397
|
whiteLabel: [
|
|
2394
|
-
{vendor: 'OXT', model: 'SWTZ22'},
|
|
2398
|
+
{vendor: 'OXT', model: 'SWTZ22'},
|
|
2395
2399
|
tuya.whitelabel('pcblab.io', 'RR620ZB', '2 gang Zigbee switch module', ['_TZ3000_4xfqlgqo']),
|
|
2400
|
+
tuya.whitelabel('Nous', 'L13Z', '2 gang switch', ['_TZ3000_ruxexjfz']),
|
|
2396
2401
|
],
|
|
2397
2402
|
extend: tuya.extend.switch({switchType: true, endpoints: ['l1', 'l2']}),
|
|
2398
2403
|
endpoint: (device) => {
|
|
@@ -2518,6 +2523,7 @@ module.exports = [
|
|
|
2518
2523
|
{modelID: 'TS0601', manufacturerName: '_TZE200_3ylew7b4'},
|
|
2519
2524
|
{modelID: 'TS0601', manufacturerName: '_TZE200_llm0epxg'},
|
|
2520
2525
|
{modelID: 'TS0601', manufacturerName: '_TZE200_n1aauwb4'},
|
|
2526
|
+
{modelID: 'TS0601', manufacturerName: '_TZE204_sxm7l9xa'},
|
|
2521
2527
|
{modelID: 'TS0601', manufacturerName: '_TZE200_xu4a5rhj'},
|
|
2522
2528
|
{modelID: 'TS0601', manufacturerName: '_TZE204_r0jdjrvi'},
|
|
2523
2529
|
],
|
|
@@ -3113,7 +3119,9 @@ module.exports = [
|
|
|
3113
3119
|
description: 'Smart plug (with power monitoring by polling)',
|
|
3114
3120
|
vendor: 'TuYa',
|
|
3115
3121
|
whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
|
|
3116
|
-
{vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}, {vendor: 'Neo', model: 'PLUG-001SPB2'}
|
|
3122
|
+
{vendor: 'Avatto', model: 'MIUCOT10Z'}, {vendor: 'Neo', model: 'NAS-WR01B'}, {vendor: 'Neo', model: 'PLUG-001SPB2'},
|
|
3123
|
+
tuya.whitelabel('TuYa', 'BSD29', 'Smart plug (with power monitoring by polling)', ['_TZ3000_okaz9tjs']),
|
|
3124
|
+
],
|
|
3117
3125
|
ota: ota.zigbeeOTA,
|
|
3118
3126
|
extend: tuya.extend.switch({electricalMeasurements: true, powerOutageMemory: true, indicatorMode: true, childLock: true}),
|
|
3119
3127
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -4218,7 +4226,8 @@ module.exports = [
|
|
|
4218
4226
|
},
|
|
4219
4227
|
{
|
|
4220
4228
|
fingerprint: [{modelID: 'TS004F', manufacturerName: '_TZ3000_4fjiwweb'}, {modelID: 'TS004F', manufacturerName: '_TZ3000_uri7ongn'},
|
|
4221
|
-
{modelID: 'TS004F', manufacturerName: '_TZ3000_ixla93vd'}, {modelID: 'TS004F', manufacturerName: '_TZ3000_qja6nq5z'}
|
|
4229
|
+
{modelID: 'TS004F', manufacturerName: '_TZ3000_ixla93vd'}, {modelID: 'TS004F', manufacturerName: '_TZ3000_qja6nq5z'},
|
|
4230
|
+
{modelID: 'TS004F', manufacturerName: '_TZ3000_abrsvsou'}],
|
|
4222
4231
|
model: 'ERS-10TZBVK-AA',
|
|
4223
4232
|
vendor: 'TuYa',
|
|
4224
4233
|
description: 'Smart knob',
|
|
@@ -4542,7 +4551,7 @@ module.exports = [
|
|
|
4542
4551
|
},
|
|
4543
4552
|
},
|
|
4544
4553
|
{
|
|
4545
|
-
fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_zxbtub8r', '_TZ3210_k1msuvg6'
|
|
4554
|
+
fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_zxbtub8r', '_TZ3210_k1msuvg6']),
|
|
4546
4555
|
model: 'TS110E_1gang_1',
|
|
4547
4556
|
vendor: 'TuYa',
|
|
4548
4557
|
description: '1 channel dimmer',
|
|
@@ -4554,14 +4563,7 @@ module.exports = [
|
|
|
4554
4563
|
[tz.light_onoff_brightness],
|
|
4555
4564
|
[tzLocal.TS110E_light_onoff_brightness],
|
|
4556
4565
|
),
|
|
4557
|
-
exposes: (
|
|
4558
|
-
const exps = [e.light_brightness().withMinBrightness().withMaxBrightness(), e.linkquality()];
|
|
4559
|
-
if (!device || !device.manufacturerName === '_TZ3210_weaqkhab') {
|
|
4560
|
-
// _TZ3210_weaqkhab doesn't support power_on_behavior and switch_type
|
|
4561
|
-
exps.push(e.power_on_behavior(), tuya.exposes.switchType());
|
|
4562
|
-
}
|
|
4563
|
-
return exps;
|
|
4564
|
-
},
|
|
4566
|
+
exposes: [e.light_brightness().withMinBrightness().withMaxBrightness()],
|
|
4565
4567
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
4566
4568
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
4567
4569
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
@@ -4569,7 +4571,7 @@ module.exports = [
|
|
|
4569
4571
|
},
|
|
4570
4572
|
},
|
|
4571
4573
|
{
|
|
4572
|
-
fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_ngqk6jia']),
|
|
4574
|
+
fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_ngqk6jia', '_TZ3210_weaqkhab']),
|
|
4573
4575
|
model: 'TS110E_1gang_2',
|
|
4574
4576
|
vendor: 'TuYa',
|
|
4575
4577
|
description: '1 channel dimmer',
|
|
@@ -4831,4 +4833,221 @@ module.exports = [
|
|
|
4831
4833
|
tuya.whitelabel('TONGOU', 'TO-Q-SY2-163JZT', 'Smart circuit breaker', ['_TZ3000_cayepv1a']),
|
|
4832
4834
|
],
|
|
4833
4835
|
},
|
|
4836
|
+
{
|
|
4837
|
+
fingerprint: tuya.fingerprint('TS000F', ['_TZ3000_m8f3z8ju']),
|
|
4838
|
+
model: 'QS-Zigbee-SEC02-U',
|
|
4839
|
+
vendor: 'TuYa',
|
|
4840
|
+
description: 'Zigbee 3.0 smart light switch module 2 gang',
|
|
4841
|
+
toZigbee: [tz.on_off],
|
|
4842
|
+
extend: extend.switch(),
|
|
4843
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
|
|
4844
|
+
endpoint: (device) => {
|
|
4845
|
+
return {'l1': 1, 'l2': 2};
|
|
4846
|
+
},
|
|
4847
|
+
meta: {multiEndpoint: true},
|
|
4848
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
4849
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
4850
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
4851
|
+
},
|
|
4852
|
+
},
|
|
4853
|
+
{
|
|
4854
|
+
fingerprint: [
|
|
4855
|
+
{modelID: 'TS0001', manufacturerName: '_TZ3000_bmqxalil'},
|
|
4856
|
+
],
|
|
4857
|
+
model: 'TS0001_switch_1_gang',
|
|
4858
|
+
vendor: 'TuYa',
|
|
4859
|
+
description: '1-Gang switch with backlight',
|
|
4860
|
+
extend: tuya.extend.switch({powerOnBehavior2: true, backlightModeOffOn: true}),
|
|
4861
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
4862
|
+
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
4863
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
4864
|
+
},
|
|
4865
|
+
whiteLabel: [
|
|
4866
|
+
tuya.whitelabel('Homeetec', '37022454', '1 Gang switch with backlight', ['_TZ3000_bmqxalil']),
|
|
4867
|
+
],
|
|
4868
|
+
},
|
|
4869
|
+
{
|
|
4870
|
+
fingerprint: [
|
|
4871
|
+
{modelID: 'TS0002', manufacturerName: '_TZ3000_in5qxhtt'},
|
|
4872
|
+
],
|
|
4873
|
+
model: 'TS0002_switch_2_gang',
|
|
4874
|
+
vendor: 'TuYa',
|
|
4875
|
+
description: '2-Gang switch with backlight',
|
|
4876
|
+
extend: tuya.extend.switch({powerOnBehavior2: true, backlightModeOffOn: true, endpoints: ['l1', 'l2']}),
|
|
4877
|
+
endpoint: (device) => {
|
|
4878
|
+
return {'l1': 1, 'l2': 2};
|
|
4879
|
+
},
|
|
4880
|
+
meta: {multiEndpoint: true},
|
|
4881
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
4882
|
+
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
4883
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
4884
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
4885
|
+
},
|
|
4886
|
+
whiteLabel: [
|
|
4887
|
+
tuya.whitelabel('Homeetec', '37022463', '2 Gang switch with backlight', ['_TZ3000_in5qxhtt']),
|
|
4888
|
+
],
|
|
4889
|
+
},
|
|
4890
|
+
{
|
|
4891
|
+
fingerprint: [
|
|
4892
|
+
{modelID: 'TS0003', manufacturerName: '_TZ3000_pv4puuxi'},
|
|
4893
|
+
],
|
|
4894
|
+
model: 'TS0003_switch_3_gang',
|
|
4895
|
+
vendor: 'TuYa',
|
|
4896
|
+
description: '3-Gang switch with backlight',
|
|
4897
|
+
extend: tuya.extend.switch({powerOnBehavior2: true, backlightModeOffOn: true, endpoints: ['left', 'center', 'right']}),
|
|
4898
|
+
endpoint: (device) => {
|
|
4899
|
+
return {'left': 1, 'center': 2, 'right': 3};
|
|
4900
|
+
},
|
|
4901
|
+
meta: {multiEndpoint: true},
|
|
4902
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
4903
|
+
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
4904
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
4905
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
4906
|
+
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
|
|
4907
|
+
},
|
|
4908
|
+
whiteLabel: [
|
|
4909
|
+
tuya.whitelabel('Homeetec', '37022474', '3 Gang switch with backlight', ['_TZ3000_pv4puuxi']),
|
|
4910
|
+
],
|
|
4911
|
+
},
|
|
4912
|
+
{
|
|
4913
|
+
fingerprint: [
|
|
4914
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_hewlydpz'},
|
|
4915
|
+
],
|
|
4916
|
+
model: 'TS0601_switch_4_gang_2',
|
|
4917
|
+
vendor: 'TuYa',
|
|
4918
|
+
description: '4-Gang switch with backlight',
|
|
4919
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
4920
|
+
toZigbee: [tuya.tz.datapoints],
|
|
4921
|
+
configure: tuya.configureMagicPacket,
|
|
4922
|
+
exposes: [
|
|
4923
|
+
tuya.exposes.switch().withEndpoint('l1'),
|
|
4924
|
+
tuya.exposes.switch().withEndpoint('l2'),
|
|
4925
|
+
tuya.exposes.switch().withEndpoint('l3'),
|
|
4926
|
+
tuya.exposes.switch().withEndpoint('l4'),
|
|
4927
|
+
tuya.exposes.backlightModeOffOn(),
|
|
4928
|
+
],
|
|
4929
|
+
endpoint: (device) => {
|
|
4930
|
+
return {'l1': 1, 'l2': 1, 'l3': 1, 'l4': 1};
|
|
4931
|
+
},
|
|
4932
|
+
meta: {
|
|
4933
|
+
multiEndpoint: true,
|
|
4934
|
+
tuyaDatapoints: [
|
|
4935
|
+
[1, 'state_l1', tuya.valueConverter.onOff],
|
|
4936
|
+
[2, 'state_l2', tuya.valueConverter.onOff],
|
|
4937
|
+
[3, 'state_l3', tuya.valueConverter.onOff],
|
|
4938
|
+
[4, 'state_l4', tuya.valueConverter.onOff],
|
|
4939
|
+
[7, 'backlight_mode', tuya.valueConverter.onOff],
|
|
4940
|
+
],
|
|
4941
|
+
},
|
|
4942
|
+
whiteLabel: [
|
|
4943
|
+
tuya.whitelabel('Homeetec', '37022714', '4 Gang switch with backlight', ['_TZE200_hewlydpz']),
|
|
4944
|
+
],
|
|
4945
|
+
},
|
|
4946
|
+
{
|
|
4947
|
+
fingerprint: [
|
|
4948
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_p6vz3wzt'},
|
|
4949
|
+
],
|
|
4950
|
+
model: 'TS0601_cover_5',
|
|
4951
|
+
vendor: 'TuYa',
|
|
4952
|
+
description: 'Curtain/blind switch',
|
|
4953
|
+
options: [exposes.options.invert_cover()],
|
|
4954
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
4955
|
+
toZigbee: [tuya.tz.datapoints],
|
|
4956
|
+
exposes: [
|
|
4957
|
+
e.cover_position(),
|
|
4958
|
+
exposes.enum('calibration', ea.STATE_SET, ['START', 'END']).withDescription('Calibration'),
|
|
4959
|
+
exposes.binary('backlight_mode', ea.STATE_SET, 'ON', 'OFF').withDescription('Backlight'),
|
|
4960
|
+
exposes.enum('motor_steering', ea.STATE_SET, ['FORWARD', 'BACKWARD']).withDescription('Motor Steering'),
|
|
4961
|
+
exposes.binary('child_lock', ea.STATE_SET, 'ON', 'OFF').withDescription('Child Lock'),
|
|
4962
|
+
],
|
|
4963
|
+
meta: {
|
|
4964
|
+
tuyaDatapoints: [
|
|
4965
|
+
[1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
|
|
4966
|
+
[2, 'position', tuya.valueConverter.coverPosition],
|
|
4967
|
+
[3, 'calibration', tuya.valueConverterBasic.lookup({'START': tuya.enum(0), 'END': tuya.enum(1)})],
|
|
4968
|
+
[7, 'backlight_mode', tuya.valueConverter.onOff],
|
|
4969
|
+
[8, 'motor_steering', tuya.valueConverterBasic.lookup({'FORWARD': tuya.enum(0), 'BACKWARD': tuya.enum(1)})],
|
|
4970
|
+
[103, 'child_lock', tuya.valueConverter.onOff],
|
|
4971
|
+
],
|
|
4972
|
+
},
|
|
4973
|
+
whiteLabel: [
|
|
4974
|
+
tuya.whitelabel('Homeetec', '37022483', 'Curtain/blind switch', ['_TZE200_p6vz3wzt']),
|
|
4975
|
+
],
|
|
4976
|
+
},
|
|
4977
|
+
{
|
|
4978
|
+
fingerprint: [
|
|
4979
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_jhkttplm'},
|
|
4980
|
+
],
|
|
4981
|
+
model: 'TS0601_cover_with_1_switch',
|
|
4982
|
+
vendor: 'TuYa',
|
|
4983
|
+
description: 'Curtain/blind switch with 1 Gang switch',
|
|
4984
|
+
options: [exposes.options.invert_cover()],
|
|
4985
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
4986
|
+
toZigbee: [tuya.tz.datapoints],
|
|
4987
|
+
exposes: [
|
|
4988
|
+
e.cover_position(),
|
|
4989
|
+
tuya.exposes.switch().withEndpoint('l1'),
|
|
4990
|
+
exposes.enum('calibration', ea.STATE_SET, ['START', 'END']).withDescription('Calibration'),
|
|
4991
|
+
exposes.binary('backlight_mode', ea.STATE_SET, 'ON', 'OFF').withDescription('Backlight'),
|
|
4992
|
+
exposes.enum('motor_steering', ea.STATE_SET, ['FORWARD', 'BACKWARD']).withDescription('Motor Steering'),
|
|
4993
|
+
exposes.binary('child_lock', ea.STATE_SET, 'ON', 'OFF').withDescription('Child Lock'),
|
|
4994
|
+
],
|
|
4995
|
+
endpoint: (device) => {
|
|
4996
|
+
return {'l1': 1};
|
|
4997
|
+
},
|
|
4998
|
+
meta: {
|
|
4999
|
+
multiEndpoint: true,
|
|
5000
|
+
tuyaDatapoints: [
|
|
5001
|
+
[1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
|
|
5002
|
+
[2, 'position', tuya.valueConverter.coverPosition],
|
|
5003
|
+
[3, 'calibration', tuya.valueConverterBasic.lookup({'START': tuya.enum(0), 'END': tuya.enum(1)})],
|
|
5004
|
+
[7, 'backlight_mode', tuya.valueConverter.onOff],
|
|
5005
|
+
[8, 'motor_steering', tuya.valueConverterBasic.lookup({'FORWARD': tuya.enum(0), 'BACKWARD': tuya.enum(1)})],
|
|
5006
|
+
[101, 'state_l1', tuya.valueConverter.onOff],
|
|
5007
|
+
[103, 'child_lock', tuya.valueConverter.onOff],
|
|
5008
|
+
],
|
|
5009
|
+
},
|
|
5010
|
+
whiteLabel: [
|
|
5011
|
+
tuya.whitelabel('Homeetec', '37022493', 'Curtain/blind switch with 1 Gang switch', ['_TZE200_jhkttplm']),
|
|
5012
|
+
],
|
|
5013
|
+
},
|
|
5014
|
+
{
|
|
5015
|
+
fingerprint: [
|
|
5016
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_5nldle7w'},
|
|
5017
|
+
],
|
|
5018
|
+
model: 'TS0601_cover_with_2_switch',
|
|
5019
|
+
vendor: 'TuYa',
|
|
5020
|
+
description: 'Curtain/blind switch with 2 Gang switch',
|
|
5021
|
+
options: [exposes.options.invert_cover()],
|
|
5022
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
5023
|
+
toZigbee: [tuya.tz.datapoints],
|
|
5024
|
+
exposes: [
|
|
5025
|
+
e.cover_position(),
|
|
5026
|
+
tuya.exposes.switch().withEndpoint('l1'),
|
|
5027
|
+
tuya.exposes.switch().withEndpoint('l2'),
|
|
5028
|
+
exposes.enum('calibration', ea.STATE_SET, ['START', 'END']).withDescription('Calibration'),
|
|
5029
|
+
exposes.binary('backlight_mode', ea.STATE_SET, 'ON', 'OFF').withDescription('Backlight'),
|
|
5030
|
+
exposes.enum('motor_steering', ea.STATE_SET, ['FORWARD', 'BACKWARD']).withDescription('Motor Steering'),
|
|
5031
|
+
exposes.binary('child_lock', ea.STATE_SET, 'ON', 'OFF').withDescription('Child Lock'),
|
|
5032
|
+
],
|
|
5033
|
+
endpoint: (device) => {
|
|
5034
|
+
return {'l1': 1, 'l2': 1};
|
|
5035
|
+
},
|
|
5036
|
+
meta: {
|
|
5037
|
+
multiEndpoint: true,
|
|
5038
|
+
tuyaDatapoints: [
|
|
5039
|
+
[1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
|
|
5040
|
+
[2, 'position', tuya.valueConverter.coverPosition],
|
|
5041
|
+
[3, 'calibration', tuya.valueConverterBasic.lookup({'START': tuya.enum(0), 'END': tuya.enum(1)})],
|
|
5042
|
+
[7, 'backlight_mode', tuya.valueConverter.onOff],
|
|
5043
|
+
[8, 'motor_steering', tuya.valueConverterBasic.lookup({'FORWARD': tuya.enum(0), 'BACKWARD': tuya.enum(1)})],
|
|
5044
|
+
[101, 'state_l2', tuya.valueConverter.onOff],
|
|
5045
|
+
[102, 'state_l1', tuya.valueConverter.onOff],
|
|
5046
|
+
[103, 'child_lock', tuya.valueConverter.onOff],
|
|
5047
|
+
],
|
|
5048
|
+
},
|
|
5049
|
+
whiteLabel: [
|
|
5050
|
+
tuya.whitelabel('Homeetec', '37022173', 'Curtain/blind switch with 2 Gang switch', ['_TZE200_5nldle7w']),
|
|
5051
|
+
],
|
|
5052
|
+
},
|
|
4834
5053
|
];
|
package/lib/tuya.js
CHANGED
|
@@ -1656,7 +1656,7 @@ const tuyaTz = {
|
|
|
1656
1656
|
'scale_protection', 'error', 'radar_scene', 'radar_sensitivity', 'tumble_alarm_time', 'tumble_switch', 'fall_sensitivity',
|
|
1657
1657
|
'min_temperature', 'max_temperature', 'window_detection', 'boost_heating', 'alarm_ringtone', 'alarm_time', 'fan_speed',
|
|
1658
1658
|
'reverse_direction', 'border', 'click_control', 'motor_direction', 'opening_mode', 'factory_reset', 'set_upper_limit', 'set_bottom_limit',
|
|
1659
|
-
'motor_speed',
|
|
1659
|
+
'motor_speed', 'backlight_mode', 'calibration', 'motor_steering',
|
|
1660
1660
|
],
|
|
1661
1661
|
convertSet: async (entity, key, value, meta) => {
|
|
1662
1662
|
// A set converter is only called once; therefore we need to loop
|
|
@@ -1664,7 +1664,7 @@ const tuyaTz = {
|
|
|
1664
1664
|
const datapoints = utils.getMetaValue(entity, meta.mapped, 'tuyaDatapoints', undefined, undefined);
|
|
1665
1665
|
if (!datapoints) throw new Error('No datapoints map defined');
|
|
1666
1666
|
for (const [key, value] of Object.entries(meta.message)) {
|
|
1667
|
-
const convertedKey = meta.mapped.meta.multiEndpoint ? `${key}_${meta.endpoint_name}` : key;
|
|
1667
|
+
const convertedKey = meta.mapped.meta.multiEndpoint && meta.endpoint_name ? `${key}_${meta.endpoint_name}` : key;
|
|
1668
1668
|
const dpEntry = datapoints.find((d) => d[1] === convertedKey);
|
|
1669
1669
|
if (!dpEntry || !dpEntry[1]) {
|
|
1670
1670
|
throw new Error(`No datapoint defined for '${key}'`);
|