iobroker.zigbee 1.9.6 → 1.10.0
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/README.md +7 -0
- package/admin/tab_m.html +1 -1
- package/io-package.json +27 -27
- package/lib/devices.js +2 -1
- package/lib/exposes.js +1 -3
- package/lib/zbDelayedAction.js +0 -9
- package/lib/zbDeviceConfigure.js +14 -9
- package/lib/zbDeviceEvent.js +5 -5
- package/lib/zigbeecontroller.js +12 -4
- package/main.js +7 -4
- package/package.json +5 -5
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.10.0 (2024-01-13)
|
|
138
|
+
* (arteck) new zigbee-herdsman-converters 18.x
|
|
139
|
+
* (arteck) configure message is now a warning
|
|
140
|
+
|
|
141
|
+
### 1.9.7 (2024-01-05)
|
|
142
|
+
* (arteck) corr configure for some devices
|
|
143
|
+
|
|
137
144
|
### 1.9.6 (2024-01-01)
|
|
138
145
|
* (arteck) corr ikea bug
|
|
139
146
|
* (crckmc) trv child lock works
|
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.
|
|
4
|
+
"version": "1.10.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.10.0": {
|
|
7
|
+
"en": "new zigbee-herdsman-converters 18.x\nconfigure message is now a warning",
|
|
8
|
+
"de": "neue zickbee-herdsman-konverter 18.x\nkonfigurieren von meldungen",
|
|
9
|
+
"ru": "новые зигби-гердсман-конвертеры 18.x\nнастройка сообщения - это предупреждение",
|
|
10
|
+
"pt": "novos conversores de zigbee-herdsman 18.x\nconfigurar a mensagem é agora um aviso",
|
|
11
|
+
"nl": "nieuwe zigbee-herdsman-converters 18.x\nconfigureren bericht is nu een waarschuwing",
|
|
12
|
+
"fr": "nouveaux convertisseurs zigbee-herdsman 18.x\nconfigure message est maintenant un avertissement",
|
|
13
|
+
"it": "nuovo zigbee-herdsman-converter 18.x\nconfigurare il messaggio è ora un avviso",
|
|
14
|
+
"es": "nuevos zigbee-herdsman-converters 18.x\nmensaje de configuración es ahora una advertencia",
|
|
15
|
+
"pl": "nowe konwertery zigbee- herdsman- 18 x\nkonfiguracja wiadomości jest teraz ostrzeżeniem",
|
|
16
|
+
"uk": "новий zigbee-herdsman-converters 18.х\nналаштування повідомлення тепер попередження",
|
|
17
|
+
"zh-cn": "新的 zigbee- herdsman- 转换器 18.x 电话\n配置信件现在是警告"
|
|
18
|
+
},
|
|
19
|
+
"1.9.7": {
|
|
20
|
+
"en": "corr configure for some devices",
|
|
21
|
+
"de": "corr konfigurieren für einige geräte",
|
|
22
|
+
"ru": "для некоторых устройств",
|
|
23
|
+
"pt": "corr configurar para alguns dispositivos",
|
|
24
|
+
"nl": "corr instellen voor sommige apparaten",
|
|
25
|
+
"fr": "corr configure pour certains appareils",
|
|
26
|
+
"it": "corr configurare per alcuni dispositivi",
|
|
27
|
+
"es": "configuración de corr para algunos dispositivos",
|
|
28
|
+
"pl": "configure corr dla niektórych urządzeń",
|
|
29
|
+
"uk": "налаштовувати корр для деяких пристроїв",
|
|
30
|
+
"zh-cn": "一些设备的corr配置"
|
|
31
|
+
},
|
|
6
32
|
"1.9.6": {
|
|
7
33
|
"en": "corr ikea bug \ntrv child lock works",
|
|
8
34
|
"de": "corr ikea bug\nkinderschlösser funktioniert",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "państwa genowe zjawiają się jako funkcje\nodbudowa nazw. json z przyciskiem czystego przycisku",
|
|
68
94
|
"uk": "генні стани від вибухів як функції\nrebuild dev_names. json з державною кнопкою очищення",
|
|
69
95
|
"zh-cn": "根塔里斯·奥古尔(签名)\n页:1 j. 有国家清洁,但顿"
|
|
70
|
-
},
|
|
71
|
-
"1.9.1": {
|
|
72
|
-
"en": "corr TypeError: Cannot read properties of undefined (reading 'state')",
|
|
73
|
-
"de": "korpustyp Fehler: Kann Eigenschaften von undefinierten (Lesezustand) nicht lesen",
|
|
74
|
-
"ru": "тип корр Ошибка: Не смогите прочитать свойства неопределенного (читая состояние)",
|
|
75
|
-
"pt": "tipo de corante Erro: Não pode ler propriedades de indefinido (estado de leitura)",
|
|
76
|
-
"nl": "_ Kan geen eigendommen lezen van onbepaalde staat",
|
|
77
|
-
"fr": "type Erreur: Impossible de lire les propriétés indéfinies (état de lecture)",
|
|
78
|
-
"it": "tipo Errore: non può leggere le proprietà di non definito (stato di lettura)",
|
|
79
|
-
"es": "tipo de corrido Error: No se pueden leer propiedades de estado indefinido (estado de lectura)",
|
|
80
|
-
"pl": "kor Type Error: Cannot przeczytał właściwości nieokreślone (czytać stan)",
|
|
81
|
-
"uk": "тип кореня Помилка: Не можна прочитати властивості невизнаного (прочитаного стану)",
|
|
82
|
-
"zh-cn": "类型 Error: Cannot宣读了未界定的(国名)财产"
|
|
83
|
-
},
|
|
84
|
-
"1.9.0": {
|
|
85
|
-
"en": "up to new zhc\nupdate dependency",
|
|
86
|
-
"de": "bis zum neuen zhc\naktualisierung abhängigkeit",
|
|
87
|
-
"ru": "до нового жк\nобновление зависимости",
|
|
88
|
-
"pt": "até novo zhc\ndependência de atualização",
|
|
89
|
-
"nl": "♪\nvertaling:",
|
|
90
|
-
"fr": "jusqu'au nouveau zhc\nmettre à jour la dépendance",
|
|
91
|
-
"it": "fino a nuovo zhc\ndipendenza da aggiornamento",
|
|
92
|
-
"es": "hasta nuevo zhc\nactualización de la dependencia",
|
|
93
|
-
"pl": "do nowego żc\nzależności",
|
|
94
|
-
"uk": "до нового жк\nоновлення залежності",
|
|
95
|
-
"zh-cn": "新的忠诚\n更新"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/devices.js
CHANGED
|
@@ -587,7 +587,7 @@ function states_with_epname(entity, states) {
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
const devices = [
|
|
590
|
-
{
|
|
590
|
+
/* {
|
|
591
591
|
models: ['WXKG01LM'],
|
|
592
592
|
icon: 'img/xiaomi_wireless_switch.png',
|
|
593
593
|
states: [
|
|
@@ -596,6 +596,7 @@ const devices = [
|
|
|
596
596
|
states.long_press,
|
|
597
597
|
],
|
|
598
598
|
},
|
|
599
|
+
*/
|
|
599
600
|
{
|
|
600
601
|
models: ['WXKG11LM'],
|
|
601
602
|
icon: 'img/aqara_switch.png',
|
package/lib/exposes.js
CHANGED
|
@@ -915,8 +915,6 @@ function applyExposes(mappedDevices, byModel, allExcludesObj) {
|
|
|
915
915
|
|
|
916
916
|
function applyDeviceDef(mappedDevices, byModel, allExcludesStr, deviceDef) {
|
|
917
917
|
const stripModel = utils.getModelRegEx(deviceDef.model);
|
|
918
|
-
// check if device is mapped
|
|
919
|
-
|
|
920
918
|
const existsMap = byModel.get(stripModel);
|
|
921
919
|
|
|
922
920
|
if ((deviceDef.hasOwnProperty('exposes') && (!existsMap || !existsMap.hasOwnProperty('states'))) || allExcludesStr.indexOf(stripModel) > 0) {
|
|
@@ -930,7 +928,7 @@ function applyDeviceDef(mappedDevices, byModel, allExcludesStr, deviceDef) {
|
|
|
930
928
|
existsMap.exposed = true;
|
|
931
929
|
}
|
|
932
930
|
} catch (e) {
|
|
933
|
-
console.log(`Wrong expose
|
|
931
|
+
console.log(`Wrong expose device definition ${deviceDef.vendor} ${stripModel}`);
|
|
934
932
|
}
|
|
935
933
|
}
|
|
936
934
|
}
|
package/lib/zbDelayedAction.js
CHANGED
|
@@ -35,15 +35,6 @@ class DelayedAction extends BaseExtension {
|
|
|
35
35
|
async onZigbeeStarted() {
|
|
36
36
|
try {
|
|
37
37
|
this.coordinatorEndpoint = await this.zigbee.getDevicesByType('Coordinator')[0].endpoints[0];
|
|
38
|
-
|
|
39
|
-
// for (const device of await this.zigbee.getClients()) {
|
|
40
|
-
// const mappedDevice = zigbeeHerdsmanConverters.findByDevice(device);
|
|
41
|
-
// this.debug(`shouldAction? ${device.ieeeAddr} ${device.modelID}`);
|
|
42
|
-
// if (this.shouldAction(device, mappedDevice)) {
|
|
43
|
-
// this.debug(`Yes!`);
|
|
44
|
-
// await this.doActions(device, mappedDevice);
|
|
45
|
-
// }
|
|
46
|
-
// }
|
|
47
38
|
} catch (error) {
|
|
48
39
|
this.sendError(error);
|
|
49
40
|
this.error(
|
package/lib/zbDeviceConfigure.js
CHANGED
|
@@ -43,7 +43,7 @@ class DeviceConfigure extends BaseExtension {
|
|
|
43
43
|
this.coordinatorEndpoint = await this.zigbee.getDevicesByType('Coordinator')[0].endpoints[0];
|
|
44
44
|
|
|
45
45
|
for (const device of await this.zigbee.getClients()) {
|
|
46
|
-
const mappedDevice = zigbeeHerdsmanConverters.findByDevice(device);
|
|
46
|
+
const mappedDevice = await zigbeeHerdsmanConverters.findByDevice(device);
|
|
47
47
|
|
|
48
48
|
if (forcedConfigureOnEachStart.find((d) => d && d.hasOwnProperty('zigbeeModel') && d.zigbeeModel.includes(device.modelID))) {
|
|
49
49
|
this.debug(`DeviceConfigure ${device.ieeeAddr} ${device.modelID} forced by adapter config`);
|
|
@@ -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,23 @@ 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}`);
|
|
133
|
+
|
|
136
134
|
await mappedDevice.configure(device, coordinatorEndpoint, this);
|
|
135
|
+
|
|
137
136
|
device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice);
|
|
138
137
|
device.save();
|
|
139
138
|
this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`);
|
|
140
139
|
}
|
|
141
140
|
} catch (error) {
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/14857
|
|
142
|
+
if (error.stack.includes('UNSUPPORTED_ATTRIBUTE')) {
|
|
143
|
+
// do nothing
|
|
144
|
+
} else {
|
|
145
|
+
this.sendError(error);
|
|
146
|
+
this.warn(` ${device.ieeeAddr} ${device.modelID} Failed to configure. When device works is all fine when not wake up the device and check again`);
|
|
147
|
+
this.debug(` --> ${error.stack} `);
|
|
148
|
+
}
|
|
144
149
|
}
|
|
145
150
|
}
|
|
146
151
|
}
|
package/lib/zbDeviceEvent.js
CHANGED
|
@@ -11,7 +11,7 @@ class DeviceEvent extends BaseExtension {
|
|
|
11
11
|
|
|
12
12
|
async onZigbeeStarted() {
|
|
13
13
|
for (const device of await this.zigbee.getClients()) {
|
|
14
|
-
this.callOnEvent(device, 'start', {});
|
|
14
|
+
await this.callOnEvent(device, 'start', {});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ class DeviceEvent extends BaseExtension {
|
|
|
20
20
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
onZigbeeEvent(data, mappedDevice) {
|
|
23
|
+
async onZigbeeEvent(data, mappedDevice) {
|
|
24
24
|
if (data.device) {
|
|
25
25
|
this.callOnEvent(data.device, data.type, data, mappedDevice);
|
|
26
26
|
}
|
|
@@ -29,14 +29,14 @@ class DeviceEvent extends BaseExtension {
|
|
|
29
29
|
async stop() {
|
|
30
30
|
if (this.zigbee.getClients() > 0) {
|
|
31
31
|
for (const device of await this.zigbee.getClients()) {
|
|
32
|
-
this.callOnEvent(device, 'stop', {});
|
|
32
|
+
await this.callOnEvent(device, 'stop', {});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
callOnEvent(device, type, data, mappedDevice) {
|
|
37
|
+
async callOnEvent(device, type, data, mappedDevice) {
|
|
38
38
|
if (!mappedDevice) {
|
|
39
|
-
mappedDevice = zigbeeHerdsmanConverters.findByDevice(device);
|
|
39
|
+
mappedDevice = await zigbeeHerdsmanConverters.findByDevice(device);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
if (mappedDevice && mappedDevice.onEvent) {
|
package/lib/zigbeecontroller.js
CHANGED
|
@@ -402,7 +402,7 @@ class ZigbeeController extends EventEmitter {
|
|
|
402
402
|
} else {
|
|
403
403
|
const device = await this.herdsman.getDeviceByIeeeAddr(key);
|
|
404
404
|
if (device) {
|
|
405
|
-
const mapped = zigbeeHerdsmanConverters.findByDevice(device);
|
|
405
|
+
const mapped = await zigbeeHerdsmanConverters.findByDevice(device);
|
|
406
406
|
const endpoints = mapped && mapped.endpoint ? mapped.endpoint(device) : null;
|
|
407
407
|
let endpoint;
|
|
408
408
|
if (endpoints && ep != undefined && endpoints[ep]) {
|
|
@@ -439,10 +439,17 @@ class ZigbeeController extends EventEmitter {
|
|
|
439
439
|
name: `Group ${key}`,
|
|
440
440
|
};
|
|
441
441
|
} else {
|
|
442
|
+
let mapped;
|
|
443
|
+
try {
|
|
444
|
+
mapped = await zigbeeHerdsmanConverters.findByDevice(key);
|
|
445
|
+
} catch (err) {
|
|
446
|
+
this.error(`zigbeeHerdsmanConverters findByDevice ${key.ieeeAddr}`);
|
|
447
|
+
}
|
|
448
|
+
|
|
442
449
|
return {
|
|
443
450
|
type: 'device',
|
|
444
451
|
device: key,
|
|
445
|
-
mapped:
|
|
452
|
+
mapped: mapped,
|
|
446
453
|
name: key.type === 'Coordinator' ? 'Coordinator' : key.ieeeAddr,
|
|
447
454
|
};
|
|
448
455
|
}
|
|
@@ -545,7 +552,7 @@ class ZigbeeController extends EventEmitter {
|
|
|
545
552
|
} catch (error) {
|
|
546
553
|
this.sendError(error);
|
|
547
554
|
if (error)
|
|
548
|
-
this.debug(`Failed to remove device
|
|
555
|
+
this.debug(`Failed to remove device. If device is remove is all fine, when not use Force remove`);
|
|
549
556
|
// skip error if force
|
|
550
557
|
if (!force) {
|
|
551
558
|
throw error;
|
|
@@ -671,7 +678,8 @@ class ZigbeeController extends EventEmitter {
|
|
|
671
678
|
this.emit('new', entity);
|
|
672
679
|
}
|
|
673
680
|
} else if (message.status === 'failed') {
|
|
674
|
-
this.error(`Failed to interview '${friendlyName}', device has not successfully been paired.
|
|
681
|
+
this.error(`Failed to interview '${friendlyName}', device has not successfully been paired. Try again !!!!!!!!!! `);
|
|
682
|
+
//this.error(`Failed to interview '${friendlyName}', device has not successfully been paired. Try again !!!!!!!!!! ${message.error}`);
|
|
675
683
|
this.emit('pairing', 'Interview failed', friendlyName);
|
|
676
684
|
} else {
|
|
677
685
|
if (message.status === 'started') {
|
package/main.js
CHANGED
|
@@ -424,9 +424,9 @@ class Zigbee extends utils.Adapter {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
async checkIfModelUpdate(entity) {
|
|
427
|
-
const model = entity.mapped ? entity.mapped.model : entity.device.modelID
|
|
428
|
-
|
|
429
|
-
|
|
427
|
+
const model = entity.mapped ? entity.mapped.model : entity.device.modelID;
|
|
428
|
+
const device = entity.device;
|
|
429
|
+
const devId = device.ieeeAddr.substr(2);
|
|
430
430
|
|
|
431
431
|
return new Promise((resolve) => {
|
|
432
432
|
this.getObject(devId, (err, obj) => {
|
|
@@ -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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Kirov Ilya",
|
|
6
6
|
"email": "kirovilya@gmail.com"
|
|
@@ -22,12 +22,12 @@
|
|
|
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.
|
|
30
|
-
"zigbee-herdsman-converters": "
|
|
29
|
+
"zigbee-herdsman": "0.32.3",
|
|
30
|
+
"zigbee-herdsman-converters": "18.11.0"
|
|
31
31
|
},
|
|
32
32
|
"description": "Zigbee devices",
|
|
33
33
|
"devDependencies": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
38
38
|
"@iobroker/testing": "^4.1.0",
|
|
39
39
|
"axios": "^1.6.3",
|
|
40
|
-
"chai": "^4.3.
|
|
40
|
+
"chai": "^4.3.5",
|
|
41
41
|
"chai-as-promised": "^7.1.1",
|
|
42
42
|
"eslint": "^8.52.0",
|
|
43
43
|
"eslint-config-prettier": "^9.1.0",
|