iobroker.zigbee 1.9.5 → 1.9.7
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/LICENSE +1 -1
- package/README.md +8 -1
- package/admin/tab_m.html +1 -1
- package/io-package.json +27 -27
- package/lib/statescontroller.js +55 -48
- package/lib/zbDeviceConfigure.js +10 -8
- package/lib/zbDeviceEvent.js +1 -1
- package/main.js +5 -2
- package/package.json +6 -6
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2018-
|
|
3
|
+
Copyright (c) 2018-2024 Kirov Ilya <kirovilya@gmail.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -134,6 +134,13 @@ You can thank the authors by these links:
|
|
|
134
134
|
-----------------------------------------------------------------------------------------------------
|
|
135
135
|
|
|
136
136
|
## Changelog
|
|
137
|
+
### 1.9.7 (2024-01-05)
|
|
138
|
+
* (arteck) corr configure for some devices
|
|
139
|
+
|
|
140
|
+
### 1.9.6 (2024-01-01)
|
|
141
|
+
* (arteck) corr ikea bug
|
|
142
|
+
* (crckmc) trv child lock works
|
|
143
|
+
|
|
137
144
|
### 1.9.5 (2023-12-29)
|
|
138
145
|
* (arteck) update dependency
|
|
139
146
|
* (arteck) min node 18.x.
|
|
@@ -540,7 +547,7 @@ new Zigbee-herdsman features:
|
|
|
540
547
|
## License
|
|
541
548
|
The MIT License (MIT)
|
|
542
549
|
|
|
543
|
-
Copyright (c) 2018-
|
|
550
|
+
Copyright (c) 2018-2024 Kirov Ilya <kirovilya@gmail.com>
|
|
544
551
|
|
|
545
552
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
546
553
|
of this software and associated documentation files (the "Software"), to deal
|
package/admin/tab_m.html
CHANGED
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
<li>
|
|
475
475
|
<div class="col main-toolbar-table-types-tools main-toolbar-table-filter input-field" style="line-height: 24px;">
|
|
476
476
|
<i class="material-icons prefix" style="line-height: 24px;">search</i>
|
|
477
|
-
<input id="device-search" class="filter-input translateP" placeholder="Искать"
|
|
477
|
+
<input id="device-search" class="filter-input translateP" placeholder="Искать" readonly="readonly" onfocus="if (this.hasAttribute('readonly')) {this.removeAttribute('readonly'); this.blur(); this.focus();}" data-lang-placeholder="Filter">
|
|
478
478
|
<a class="filter-clear btn-floating btn-very-small translateT red lighten-3" title="Очистить" data-lang-title="clear" style="display: none;"><i class="material-icons">clear</i></a>
|
|
479
479
|
</div>
|
|
480
480
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.7",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.9.7": {
|
|
7
|
+
"en": "corr configure for some devices",
|
|
8
|
+
"de": "corr konfigurieren für einige geräte",
|
|
9
|
+
"ru": "для некоторых устройств",
|
|
10
|
+
"pt": "corr configurar para alguns dispositivos",
|
|
11
|
+
"nl": "corr instellen voor sommige apparaten",
|
|
12
|
+
"fr": "corr configure pour certains appareils",
|
|
13
|
+
"it": "corr configurare per alcuni dispositivi",
|
|
14
|
+
"es": "configuración de corr para algunos dispositivos",
|
|
15
|
+
"pl": "configure corr dla niektórych urządzeń",
|
|
16
|
+
"uk": "налаштовувати корр для деяких пристроїв",
|
|
17
|
+
"zh-cn": "一些设备的corr配置"
|
|
18
|
+
},
|
|
19
|
+
"1.9.6": {
|
|
20
|
+
"en": "corr ikea bug \ntrv child lock works",
|
|
21
|
+
"de": "corr ikea bug\nkinderschlösser funktioniert",
|
|
22
|
+
"ru": "корр ikea баг\ntrv детские замки работает",
|
|
23
|
+
"pt": "corr ikea bug\ntrabalhos de bloqueio de crianças",
|
|
24
|
+
"nl": "_\nhet kinderslot werkt",
|
|
25
|
+
"fr": "corr ikea bug\nverrouillage enfant trv fonctionne",
|
|
26
|
+
"it": "corr ikea bug\ntrv bambino serratura lavori",
|
|
27
|
+
"es": "corr ikea bug\ntrv niño cerradura funciona",
|
|
28
|
+
"pl": "kor ikea bug\npracuje w trv childlock",
|
|
29
|
+
"uk": "ikea помилка\ntrv дитячих замків",
|
|
30
|
+
"zh-cn": "绑架\n童 工"
|
|
31
|
+
},
|
|
6
32
|
"1.9.5": {
|
|
7
33
|
"en": "update dependency\nmin node 18.x.",
|
|
8
34
|
"de": "aktualisierung abhängigkeit\nmin node 18.x.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "kor Type Error: Cannot przeczytał właściwości nieokreślone (czytać stan)",
|
|
68
94
|
"uk": "тип кореня Помилка: Не можна прочитати властивості невизнаного (прочитаного стану)",
|
|
69
95
|
"zh-cn": "类型 Error: Cannot宣读了未界定的(国名)财产"
|
|
70
|
-
},
|
|
71
|
-
"1.9.0": {
|
|
72
|
-
"en": "up to new zhc\nupdate dependency",
|
|
73
|
-
"de": "bis zum neuen zhc\naktualisierung abhängigkeit",
|
|
74
|
-
"ru": "до нового жк\nобновление зависимости",
|
|
75
|
-
"pt": "até novo zhc\ndependência de atualização",
|
|
76
|
-
"nl": "♪\nvertaling:",
|
|
77
|
-
"fr": "jusqu'au nouveau zhc\nmettre à jour la dépendance",
|
|
78
|
-
"it": "fino a nuovo zhc\ndipendenza da aggiornamento",
|
|
79
|
-
"es": "hasta nuevo zhc\nactualización de la dependencia",
|
|
80
|
-
"pl": "do nowego żc\nzależności",
|
|
81
|
-
"uk": "до нового жк\nоновлення залежності",
|
|
82
|
-
"zh-cn": "新的忠诚\n更新"
|
|
83
|
-
},
|
|
84
|
-
"1.8.27": {
|
|
85
|
-
"en": "update dependency",
|
|
86
|
-
"de": "aktualisierung abhängigkeit",
|
|
87
|
-
"ru": "обновление зависимости",
|
|
88
|
-
"pt": "dependência de atualização",
|
|
89
|
-
"nl": "vertaling:",
|
|
90
|
-
"fr": "mettre à jour la dépendance",
|
|
91
|
-
"it": "dipendenza da aggiornamento",
|
|
92
|
-
"es": "actualización de la dependencia",
|
|
93
|
-
"pl": "zależności",
|
|
94
|
-
"uk": "оновлення залежності",
|
|
95
|
-
"zh-cn": "更新"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/statescontroller.js
CHANGED
|
@@ -624,61 +624,68 @@ class StatesController extends EventEmitter {
|
|
|
624
624
|
}
|
|
625
625
|
// find states for payload
|
|
626
626
|
if (devStates.states !== undefined) {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
value
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
627
|
+
try {
|
|
628
|
+
const states = statesMapping.commonStates.concat(
|
|
629
|
+
devStates.states.filter(statedesc => payload.hasOwnProperty(statedesc.prop || statedesc.id))
|
|
630
|
+
);
|
|
631
|
+
|
|
632
|
+
for (const stateInd in states) {
|
|
633
|
+
const statedesc = states[stateInd];
|
|
634
|
+
let value;
|
|
635
|
+
if (statedesc.getter) {
|
|
636
|
+
value = statedesc.getter(payload);
|
|
637
|
+
} else {
|
|
638
|
+
value = payload[statedesc.prop || statedesc.id];
|
|
639
|
+
}
|
|
640
|
+
// checking value
|
|
641
|
+
if (value === undefined || value === null) {
|
|
642
|
+
continue;
|
|
643
|
+
}
|
|
643
644
|
|
|
644
|
-
|
|
645
|
-
this.warn(`ELEVATED publishToState: value generated '${JSON.stringify(value)}' from device ${devId} for '${statedesc.name}'`);
|
|
646
|
-
}
|
|
645
|
+
let stateID = statedesc.id;
|
|
647
646
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
type: statedesc.type,
|
|
651
|
-
unit: statedesc.unit,
|
|
652
|
-
read: statedesc.read,
|
|
653
|
-
write: statedesc.write,
|
|
654
|
-
icon: statedesc.icon,
|
|
655
|
-
role: statedesc.role,
|
|
656
|
-
min: statedesc.min,
|
|
657
|
-
max: statedesc.max,
|
|
658
|
-
};
|
|
659
|
-
|
|
660
|
-
if (typeof value === 'object' && value.hasOwnProperty('stateid')) {
|
|
661
|
-
stateID = `${stateID}.${value.stateid}`;
|
|
662
|
-
if (value.hasOwnProperty('unit')) {
|
|
663
|
-
common.unit = value.unit;
|
|
647
|
+
if (has_debug && statedesc.id !== 'msg_from_zigbee') {
|
|
648
|
+
this.warn(`ELEVATED publishToState: value generated '${JSON.stringify(value)}' from device ${devId} for '${statedesc.name}'`);
|
|
664
649
|
}
|
|
665
|
-
common.name = value.name ? value.name : value.stateid;
|
|
666
|
-
common.role = value.role ? `value.${value.role}` : 'number';
|
|
667
|
-
value = value.value;
|
|
668
|
-
}
|
|
669
650
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
651
|
+
const common = {
|
|
652
|
+
name: statedesc.name,
|
|
653
|
+
type: statedesc.type,
|
|
654
|
+
unit: statedesc.unit,
|
|
655
|
+
read: statedesc.read,
|
|
656
|
+
write: statedesc.write,
|
|
657
|
+
icon: statedesc.icon,
|
|
658
|
+
role: statedesc.role,
|
|
659
|
+
min: statedesc.min,
|
|
660
|
+
max: statedesc.max,
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
if (typeof value === 'object' && value.hasOwnProperty('stateid')) {
|
|
664
|
+
stateID = `${stateID}.${value.stateid}`;
|
|
665
|
+
if (value.hasOwnProperty('unit')) {
|
|
666
|
+
common.unit = value.unit;
|
|
667
|
+
}
|
|
668
|
+
common.name = value.name ? value.name : value.stateid;
|
|
669
|
+
common.role = value.role ? `value.${value.role}` : 'number';
|
|
670
|
+
value = value.value;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// if needs to return value to back after timeout
|
|
674
|
+
if (statedesc.isEvent) {
|
|
675
|
+
this.updateStateWithTimeout(devId, statedesc.id, value, common, 300, !value);
|
|
678
676
|
} else {
|
|
679
|
-
|
|
677
|
+
if (statedesc.prepublish) {
|
|
678
|
+
this.collectOptions(devId, model, options =>
|
|
679
|
+
statedesc.prepublish(devId, value, newvalue =>
|
|
680
|
+
this.updateState(devId, stateID, newvalue, common), options)
|
|
681
|
+
);
|
|
682
|
+
} else {
|
|
683
|
+
this.updateState(devId, stateID, value, common);
|
|
684
|
+
}
|
|
680
685
|
}
|
|
681
686
|
}
|
|
687
|
+
} catch (e) {
|
|
688
|
+
this.debug(`No states in device ${devId} : payload ${JSON.stringify(payload)}`);
|
|
682
689
|
}
|
|
683
690
|
}
|
|
684
691
|
}
|
package/lib/zbDeviceConfigure.js
CHANGED
|
@@ -112,13 +112,10 @@ class DeviceConfigure extends BaseExtension {
|
|
|
112
112
|
|
|
113
113
|
try {
|
|
114
114
|
await this.doConfigure(device, mappedDevice);
|
|
115
|
-
this.configuring.delete(device.ieeeAddr);
|
|
115
|
+
// this.configuring.delete(device.ieeeAddr);
|
|
116
116
|
} catch (error) {
|
|
117
117
|
this.sendError(error);
|
|
118
|
-
this.warn(
|
|
119
|
-
`DeviceConfigure failed ${device.ieeeAddr} ${device.modelID}, ` +
|
|
120
|
-
`attempt ${this.attempts[device.ieeeAddr] + 1} (${error.stack})`,
|
|
121
|
-
);
|
|
118
|
+
this.warn(`DeviceConfigure failed ${device.ieeeAddr} ${device.modelID} attempt ${this.attempts[device.ieeeAddr] + 1} (${error.stack})`);
|
|
122
119
|
this.attempts[device.ieeeAddr]++;
|
|
123
120
|
}
|
|
124
121
|
}
|
|
@@ -132,15 +129,20 @@ class DeviceConfigure extends BaseExtension {
|
|
|
132
129
|
const coordinatorEndpoint = await this.zigbee.getDevicesByType('Coordinator')[0].endpoints[0];
|
|
133
130
|
try {
|
|
134
131
|
if (mappedDevice) {
|
|
135
|
-
this.info(
|
|
132
|
+
this.info(`-> Configuring ${device.ieeeAddr} ${device.modelID}`);
|
|
136
133
|
await mappedDevice.configure(device, coordinatorEndpoint, this);
|
|
137
134
|
device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice);
|
|
138
135
|
device.save();
|
|
139
136
|
this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`);
|
|
140
137
|
}
|
|
141
138
|
} catch (error) {
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/14857
|
|
140
|
+
if (error.stack.includes('UNSUPPORTED_ATTRIBUTE')) {
|
|
141
|
+
// do nothing
|
|
142
|
+
} else {
|
|
143
|
+
this.sendError(error);
|
|
144
|
+
this.error(`Failed to DeviceConfigure.configure ${device.ieeeAddr} ${device.modelID} (${error.stack})`);
|
|
145
|
+
}
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
}
|
package/lib/zbDeviceEvent.js
CHANGED
package/main.js
CHANGED
|
@@ -555,7 +555,10 @@ class Zigbee extends utils.Adapter {
|
|
|
555
555
|
|
|
556
556
|
this.processConverters(converters, devId, model, mappedModel, message, meta)
|
|
557
557
|
.catch((error) => {
|
|
558
|
-
|
|
558
|
+
// 'Error: Expected one of: 0, 1, got: 'undefined''
|
|
559
|
+
if (cluster !== '64529') {
|
|
560
|
+
this.log.error(`Error while processing converters DEVICE_ID: '${devId}' cluster '${cluster}' type '${type}'`);
|
|
561
|
+
}
|
|
559
562
|
});
|
|
560
563
|
}
|
|
561
564
|
|
|
@@ -732,7 +735,7 @@ class Zigbee extends utils.Adapter {
|
|
|
732
735
|
};
|
|
733
736
|
|
|
734
737
|
// new toZigbee
|
|
735
|
-
if (preparedValue !== undefined) {
|
|
738
|
+
if (preparedValue !== undefined && Object.keys(meta.message).filter(p => p.startsWith('state')).length > 0) {
|
|
736
739
|
if (typeof preparedValue === 'number') {
|
|
737
740
|
meta.message.state = preparedValue > 0 ? 'ON' : 'OFF';
|
|
738
741
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Kirov Ilya",
|
|
6
6
|
"email": "kirovilya@gmail.com"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@iobroker/adapter-core": "^3.0.4",
|
|
25
|
-
"@iobroker/dm-utils": "^0.1.
|
|
25
|
+
"@iobroker/dm-utils": "^0.1.9",
|
|
26
26
|
"humanize-duration": "^3.31.0",
|
|
27
27
|
"tar": "^6.2.0",
|
|
28
28
|
"typescript": "^5.3.3",
|
|
29
|
-
"zigbee-herdsman": "0.
|
|
29
|
+
"zigbee-herdsman": "0.30.0",
|
|
30
30
|
"zigbee-herdsman-converters": "16.18.0"
|
|
31
31
|
},
|
|
32
32
|
"description": "Zigbee devices",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
37
37
|
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
38
38
|
"@iobroker/testing": "^4.1.0",
|
|
39
|
-
"axios": "^1.6.
|
|
40
|
-
"chai": "^4.3.
|
|
39
|
+
"axios": "^1.6.3",
|
|
40
|
+
"chai": "^4.3.5",
|
|
41
41
|
"chai-as-promised": "^7.1.1",
|
|
42
42
|
"eslint": "^8.52.0",
|
|
43
|
-
"eslint-config-prettier": "^9.
|
|
43
|
+
"eslint-config-prettier": "^9.1.0",
|
|
44
44
|
"eslint-plugin-prettier": "^5.0.0",
|
|
45
45
|
"gulp": "^4.0.2",
|
|
46
46
|
"gulp-jsdoc3": "^3.0.0",
|