zigbee-herdsman-converters 14.0.606 → 14.0.607
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/toZigbee.js +16 -15
- package/devices/garza.js +11 -0
- package/devices/moes.js +2 -1
- package/devices/rtx.js +9 -0
- package/devices/saswell.js +0 -1
- package/devices/tuya.js +7 -9
- package/devices/yale.js +1 -1
- package/package.json +1 -1
package/converters/toZigbee.js
CHANGED
|
@@ -176,7 +176,7 @@ const converters = {
|
|
|
176
176
|
if (!utils.isInRange(0, meta.mapped.meta.pinCodeCount - 1, user)) throw new Error('user must be in range for device');
|
|
177
177
|
|
|
178
178
|
if (pinCode == null) {
|
|
179
|
-
await entity.command('closuresDoorLock', 'clearPinCode', {'userid': user}, utils.getOptions(meta.mapped));
|
|
179
|
+
await entity.command('closuresDoorLock', 'clearPinCode', {'userid': user}, utils.getOptions(meta.mapped, entity));
|
|
180
180
|
} else {
|
|
181
181
|
if (isNaN(pinCode)) throw new Error('pinCode must be a number');
|
|
182
182
|
const typeLookup = {'unrestricted': 0, 'year_day_schedule': 1, 'week_day_schedule': 2, 'master': 3, 'non_access': 4};
|
|
@@ -187,7 +187,7 @@ const converters = {
|
|
|
187
187
|
'usertype': typeLookup[userType],
|
|
188
188
|
'pincodevalue': pinCode.toString(),
|
|
189
189
|
};
|
|
190
|
-
await entity.command('closuresDoorLock', 'setPinCode', payload, utils.getOptions(meta.mapped));
|
|
190
|
+
await entity.command('closuresDoorLock', 'setPinCode', payload, utils.getOptions(meta.mapped, entity));
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
193
|
convertGet: async (entity, key, meta) => {
|
|
@@ -235,7 +235,7 @@ const converters = {
|
|
|
235
235
|
'userid': user,
|
|
236
236
|
'userstatus': status,
|
|
237
237
|
},
|
|
238
|
-
utils.getOptions(meta.mapped),
|
|
238
|
+
utils.getOptions(meta.mapped, entity),
|
|
239
239
|
);
|
|
240
240
|
},
|
|
241
241
|
convertGet: async (entity, key, meta) => {
|
|
@@ -3070,24 +3070,24 @@ const converters = {
|
|
|
3070
3070
|
|
|
3071
3071
|
const oldPosition = meta.state.position;
|
|
3072
3072
|
if (value == 100) {
|
|
3073
|
-
await entity.command('closuresWindowCovering', 'upOpen', {}, utils.getOptions(meta.mapped));
|
|
3073
|
+
await entity.command('closuresWindowCovering', 'upOpen', {}, utils.getOptions(meta.mapped, entity));
|
|
3074
3074
|
} else if (value == 0) {
|
|
3075
|
-
await entity.command('closuresWindowCovering', 'downClose', {}, utils.getOptions(meta.mapped));
|
|
3075
|
+
await entity.command('closuresWindowCovering', 'downClose', {}, utils.getOptions(meta.mapped, entity));
|
|
3076
3076
|
} else {
|
|
3077
3077
|
if (oldPosition > value) {
|
|
3078
3078
|
const delta = oldPosition - value;
|
|
3079
3079
|
const mutiplicateur = meta.options.time_open / 100;
|
|
3080
3080
|
const timeBeforeStop = delta * mutiplicateur;
|
|
3081
|
-
await entity.command('closuresWindowCovering', 'downClose', {}, utils.getOptions(meta.mapped));
|
|
3081
|
+
await entity.command('closuresWindowCovering', 'downClose', {}, utils.getOptions(meta.mapped, entity));
|
|
3082
3082
|
await sleepSeconds(timeBeforeStop);
|
|
3083
|
-
await entity.command('closuresWindowCovering', 'stop', {}, utils.getOptions(meta.mapped));
|
|
3083
|
+
await entity.command('closuresWindowCovering', 'stop', {}, utils.getOptions(meta.mapped, entity));
|
|
3084
3084
|
} else if (oldPosition < value) {
|
|
3085
3085
|
const delta = value - oldPosition;
|
|
3086
3086
|
const mutiplicateur = meta.options.time_close / 100;
|
|
3087
3087
|
const timeBeforeStop = delta * mutiplicateur;
|
|
3088
|
-
await entity.command('closuresWindowCovering', 'upOpen', {}, utils.getOptions(meta.mapped));
|
|
3088
|
+
await entity.command('closuresWindowCovering', 'upOpen', {}, utils.getOptions(meta.mapped, entity));
|
|
3089
3089
|
await sleepSeconds(timeBeforeStop);
|
|
3090
|
-
await entity.command('closuresWindowCovering', 'stop', {}, utils.getOptions(meta.mapped));
|
|
3090
|
+
await entity.command('closuresWindowCovering', 'stop', {}, utils.getOptions(meta.mapped, entity));
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
3093
|
|
|
@@ -5545,7 +5545,7 @@ const converters = {
|
|
|
5545
5545
|
scenename = value.name;
|
|
5546
5546
|
}
|
|
5547
5547
|
|
|
5548
|
-
const response = await entity.command('genScenes', 'store', {groupid, sceneid}, utils.getOptions(meta.mapped));
|
|
5548
|
+
const response = await entity.command('genScenes', 'store', {groupid, sceneid}, utils.getOptions(meta.mapped, entity));
|
|
5549
5549
|
|
|
5550
5550
|
if (isGroup) {
|
|
5551
5551
|
if (meta.membersState) {
|
|
@@ -5567,7 +5567,7 @@ const converters = {
|
|
|
5567
5567
|
convertSet: async (entity, key, value, meta) => {
|
|
5568
5568
|
const groupid = entity.constructor.name === 'Group' ? entity.groupID : 0;
|
|
5569
5569
|
const sceneid = value;
|
|
5570
|
-
await entity.command('genScenes', 'recall', {groupid, sceneid}, utils.getOptions(meta.mapped));
|
|
5570
|
+
await entity.command('genScenes', 'recall', {groupid, sceneid}, utils.getOptions(meta.mapped, entity));
|
|
5571
5571
|
|
|
5572
5572
|
const addColorMode = (newState) => {
|
|
5573
5573
|
if (newState.hasOwnProperty('color_temp')) {
|
|
@@ -5736,12 +5736,13 @@ const converters = {
|
|
|
5736
5736
|
* We accept a SUCESS or NOT_FOUND as a result of the remove call.
|
|
5737
5737
|
*/
|
|
5738
5738
|
const removeresp = await entity.command(
|
|
5739
|
-
'genScenes', 'remove', {groupid, sceneid}, utils.getOptions(meta.mapped),
|
|
5739
|
+
'genScenes', 'remove', {groupid, sceneid}, utils.getOptions(meta.mapped, entity),
|
|
5740
5740
|
);
|
|
5741
5741
|
|
|
5742
5742
|
if (isGroup || (removeresp.status === 0 || removeresp.status == 133 || removeresp.status == 139)) {
|
|
5743
5743
|
const response = await entity.command(
|
|
5744
|
-
'genScenes', 'add', {groupid, sceneid, scenename: '', transtime, extensionfieldsets},
|
|
5744
|
+
'genScenes', 'add', {groupid, sceneid, scenename: '', transtime, extensionfieldsets},
|
|
5745
|
+
utils.getOptions(meta.mapped, entity),
|
|
5745
5746
|
);
|
|
5746
5747
|
|
|
5747
5748
|
if (isGroup) {
|
|
@@ -5768,7 +5769,7 @@ const converters = {
|
|
|
5768
5769
|
const groupid = entity.constructor.name === 'Group' ? entity.groupID : 0;
|
|
5769
5770
|
const sceneid = value;
|
|
5770
5771
|
const response = await entity.command(
|
|
5771
|
-
'genScenes', 'remove', {groupid, sceneid}, utils.getOptions(meta.mapped),
|
|
5772
|
+
'genScenes', 'remove', {groupid, sceneid}, utils.getOptions(meta.mapped, entity),
|
|
5772
5773
|
);
|
|
5773
5774
|
const isGroup = entity.constructor.name === 'Group';
|
|
5774
5775
|
if (isGroup) {
|
|
@@ -5790,7 +5791,7 @@ const converters = {
|
|
|
5790
5791
|
convertSet: async (entity, key, value, meta) => {
|
|
5791
5792
|
const groupid = entity.constructor.name === 'Group' ? entity.groupID : 0;
|
|
5792
5793
|
const response = await entity.command(
|
|
5793
|
-
'genScenes', 'removeAll', {groupid}, utils.getOptions(meta.mapped),
|
|
5794
|
+
'genScenes', 'removeAll', {groupid}, utils.getOptions(meta.mapped, entity),
|
|
5794
5795
|
);
|
|
5795
5796
|
const isGroup = entity.constructor.name === 'Group';
|
|
5796
5797
|
if (isGroup) {
|
package/devices/garza.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const extend = require('../lib/extend');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3210_sln7ah6r'}],
|
|
6
|
+
model: 'Garza-Standard-A60',
|
|
7
|
+
vendor: 'Garza Smart',
|
|
8
|
+
description: 'Standard A60 bulb',
|
|
9
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
10
|
+
},
|
|
11
|
+
];
|
package/devices/moes.js
CHANGED
|
@@ -285,7 +285,8 @@ module.exports = [
|
|
|
285
285
|
exposes: [e.light_brightness().setAccess('state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET)],
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_e3oitdyu'}
|
|
288
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_e3oitdyu'},
|
|
289
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_fjjbhx9d'}],
|
|
289
290
|
model: 'MS-105B',
|
|
290
291
|
vendor: 'Moes',
|
|
291
292
|
description: 'Smart dimmer module (2 gang)',
|
package/devices/rtx.js
CHANGED
|
@@ -76,4 +76,13 @@ module.exports = [
|
|
|
76
76
|
'MoTu..= active weekdays ' +
|
|
77
77
|
'1 = deactivate timer with 0)')],
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3000_mwd3c2at'}],
|
|
81
|
+
model: 'ZMS4',
|
|
82
|
+
vendor: 'RTX',
|
|
83
|
+
description: 'Zigbee PIR sensor',
|
|
84
|
+
fromZigbee: [fz.ias_occupancy_alarm_1],
|
|
85
|
+
toZigbee: [],
|
|
86
|
+
exposes: [e.battery_low(), e.occupancy()],
|
|
87
|
+
},
|
|
79
88
|
];
|
package/devices/saswell.js
CHANGED
|
@@ -16,7 +16,6 @@ module.exports = [
|
|
|
16
16
|
{modelID: 'TS0601', manufacturerName: '_TZE200_c88teujp'},
|
|
17
17
|
{modelID: 'TS0601', manufacturerName: '_TZE200_yw7cahqs'},
|
|
18
18
|
{modelID: 'TS0601', manufacturerName: '_TZE200_azqp6ssj'},
|
|
19
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_bvu2wnxz'},
|
|
20
19
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zuhszj9s'},
|
|
21
20
|
{modelID: 'TS0601', manufacturerName: '_TZE200_9gvruqf5'},
|
|
22
21
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zr9c0day'},
|
package/devices/tuya.js
CHANGED
|
@@ -26,13 +26,9 @@ const tzLocal = {
|
|
|
26
26
|
hpsz: {
|
|
27
27
|
key: ['led_state'],
|
|
28
28
|
convertSet: async (entity, key, value, meta) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
await tuya.sendDataPointBool(entity, tuya.dataPoints.HPSZLEDState, ledState);
|
|
33
|
-
return {led_state: value};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
29
|
+
const ledState = value.toUpperCase() === 'ON' ? true : false;
|
|
30
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.HPSZLEDState, ledState);
|
|
31
|
+
return {led_state: value};
|
|
36
32
|
},
|
|
37
33
|
},
|
|
38
34
|
TS0504B_color: {
|
|
@@ -302,7 +298,7 @@ const fzLocal = {
|
|
|
302
298
|
result = {duration_of_absence: value};
|
|
303
299
|
break;
|
|
304
300
|
case tuya.dataPoints.HPSZLEDState:
|
|
305
|
-
result = {
|
|
301
|
+
result = {led_state: value};
|
|
306
302
|
break;
|
|
307
303
|
default:
|
|
308
304
|
meta.logger.warn(`zigbee-herdsman-converters:hpsz: NOT RECOGNIZED DP #${
|
|
@@ -631,7 +627,7 @@ module.exports = [
|
|
|
631
627
|
fromZigbee: [fz.ias_contact_alarm_1, fz.battery, fz.ignore_basic_report, fz.ias_contact_alarm_1_report],
|
|
632
628
|
toZigbee: [],
|
|
633
629
|
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
|
|
634
|
-
whiteLabel: [{vendor: 'CR Smart Home', model: 'TS0203'}],
|
|
630
|
+
whiteLabel: [{vendor: 'CR Smart Home', model: 'TS0203'}, {vendor: 'TuYa', model: 'iH-F001'}],
|
|
635
631
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
636
632
|
try {
|
|
637
633
|
const endpoint = device.getEndpoint(1);
|
|
@@ -914,6 +910,7 @@ module.exports = [
|
|
|
914
910
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_ef5xlc9q'},
|
|
915
911
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_vwqnz1sn'},
|
|
916
912
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_2b8f6cio'},
|
|
913
|
+
{modelID: 'TS0202', manufacturerName: '_TYZB01_71kfvvma'},
|
|
917
914
|
{modelID: 'TS0202', manufacturerName: '_TZE200_bq5c8xfe'},
|
|
918
915
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_dl7cejts'},
|
|
919
916
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_qjqgmqxr'},
|
|
@@ -1691,6 +1688,7 @@ module.exports = [
|
|
|
1691
1688
|
{modelID: 'TS0601', manufacturerName: '_TZE200_tvrvdj6o'},
|
|
1692
1689
|
{modelID: 'zo2pocs\u0000', manufacturerName: '_TYST11_fzo2pocs'},
|
|
1693
1690
|
{modelID: 'TS0601', manufacturerName: '_TZE200_cf1sl3tj'},
|
|
1691
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_b2u1drdv'},
|
|
1694
1692
|
// Roller blinds:
|
|
1695
1693
|
{modelID: 'TS0601', manufacturerName: '_TZE200_fctwhugx'},
|
|
1696
1694
|
{modelID: 'TS0601', manufacturerName: '_TZE200_zah67ekd'},
|
package/devices/yale.js
CHANGED
|
@@ -55,7 +55,7 @@ module.exports = [
|
|
|
55
55
|
vendor: 'Yale',
|
|
56
56
|
description: 'Real living lock / Intelligent biometric digital lock',
|
|
57
57
|
// Increased timeout needed: https://github.com/Koenkk/zigbee2mqtt/issues/3290 for YDM4109+
|
|
58
|
-
extend: lockExtend({timeout: 20000}),
|
|
58
|
+
extend: lockExtend({battery: {dontDividePercentage: true}}, {timeout: 20000}),
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
zigbeeModel: ['YRD210 PB DB'],
|