iobroker.zigbee 1.9.7 → 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 +4 -0
- package/io-package.json +14 -14
- package/lib/devices.js +2 -1
- package/lib/exposes.js +1 -3
- package/lib/zbDelayedAction.js +0 -9
- package/lib/zbDeviceConfigure.js +5 -2
- package/lib/zbDeviceEvent.js +5 -5
- package/lib/zigbeecontroller.js +12 -4
- package/main.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -134,6 +134,10 @@ 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
|
+
|
|
137
141
|
### 1.9.7 (2024-01-05)
|
|
138
142
|
* (arteck) corr configure for some devices
|
|
139
143
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
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
|
+
},
|
|
6
19
|
"1.9.7": {
|
|
7
20
|
"en": "corr configure for some devices",
|
|
8
21
|
"de": "corr konfigurieren für einige geräte",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "państwa genowe zjawiają się jako funkcje\nodbudowa nazw. json z przyciskiem czystego przycisku",
|
|
81
94
|
"uk": "генні стани від вибухів як функції\nrebuild dev_names. json з державною кнопкою очищення",
|
|
82
95
|
"zh-cn": "根塔里斯·奥古尔(签名)\n页:1 j. 有国家清洁,但顿"
|
|
83
|
-
},
|
|
84
|
-
"1.9.1": {
|
|
85
|
-
"en": "corr TypeError: Cannot read properties of undefined (reading 'state')",
|
|
86
|
-
"de": "korpustyp Fehler: Kann Eigenschaften von undefinierten (Lesezustand) nicht lesen",
|
|
87
|
-
"ru": "тип корр Ошибка: Не смогите прочитать свойства неопределенного (читая состояние)",
|
|
88
|
-
"pt": "tipo de corante Erro: Não pode ler propriedades de indefinido (estado de leitura)",
|
|
89
|
-
"nl": "_ Kan geen eigendommen lezen van onbepaalde staat",
|
|
90
|
-
"fr": "type Erreur: Impossible de lire les propriétés indéfinies (état de lecture)",
|
|
91
|
-
"it": "tipo Errore: non può leggere le proprietà di non definito (stato di lettura)",
|
|
92
|
-
"es": "tipo de corrido Error: No se pueden leer propiedades de estado indefinido (estado de lectura)",
|
|
93
|
-
"pl": "kor Type Error: Cannot przeczytał właściwości nieokreślone (czytać stan)",
|
|
94
|
-
"uk": "тип кореня Помилка: Не можна прочитати властивості невизнаного (прочитаного стану)",
|
|
95
|
-
"zh-cn": "类型 Error: Cannot宣读了未界定的(国名)财产"
|
|
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`);
|
|
@@ -130,7 +130,9 @@ class DeviceConfigure extends BaseExtension {
|
|
|
130
130
|
try {
|
|
131
131
|
if (mappedDevice) {
|
|
132
132
|
this.info(`-> Configuring ${device.ieeeAddr} ${device.modelID}`);
|
|
133
|
+
|
|
133
134
|
await mappedDevice.configure(device, coordinatorEndpoint, this);
|
|
135
|
+
|
|
134
136
|
device.meta.configured = zigbeeHerdsmanConverters.getConfigureKey(mappedDevice);
|
|
135
137
|
device.save();
|
|
136
138
|
this.info(`DeviceConfigure successful ${device.ieeeAddr} ${device.modelID}`);
|
|
@@ -141,7 +143,8 @@ class DeviceConfigure extends BaseExtension {
|
|
|
141
143
|
// do nothing
|
|
142
144
|
} else {
|
|
143
145
|
this.sendError(error);
|
|
144
|
-
this.
|
|
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} `);
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
150
|
}
|
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) => {
|
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"
|
|
@@ -26,8 +26,8 @@
|
|
|
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": {
|