iobroker.zigbee 1.9.7 → 1.10.1
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 +8 -0
- package/admin/admin.js +4 -1
- package/admin/i18n/de/translations.json +1 -1
- package/admin/i18n/en/translations.json +1 -1
- package/admin/img/E2213.png +0 -0
- package/admin/img/LED2005R5.jpg +0 -0
- package/admin/img/WXKG01LM.png +0 -0
- package/admin/img/ZG-205Z-A.png +0 -0
- package/admin/index_m.html +10 -10
- package/admin/words.js +2 -2
- package/io-package.json +31 -29
- package/lib/commands.js +18 -0
- 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 +6 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -134,6 +134,14 @@ You can thank the authors by these links:
|
|
|
134
134
|
-----------------------------------------------------------------------------------------------------
|
|
135
135
|
|
|
136
136
|
## Changelog
|
|
137
|
+
### 1.10.1 (2024-01-21)
|
|
138
|
+
* (arteck) Baudrate is now configurable. works ONLY with Deconz/Conbee( 38400 )
|
|
139
|
+
* (arteck) add nvbackup.json delete button
|
|
140
|
+
|
|
141
|
+
### 1.10.0 (2024-01-13)
|
|
142
|
+
* (arteck) new zigbee-herdsman-converters 18.x
|
|
143
|
+
* (arteck) configure message is now a warning
|
|
144
|
+
|
|
137
145
|
### 1.9.7 (2024-01-05)
|
|
138
146
|
* (arteck) corr configure for some devices
|
|
139
147
|
|
package/admin/admin.js
CHANGED
|
@@ -31,7 +31,7 @@ const updateCardInterval = setInterval(updateCardTimer, 6000);
|
|
|
31
31
|
|
|
32
32
|
const savedSettings = [
|
|
33
33
|
'port', 'panID', 'channel', 'disableLed', 'countDown', 'groups', 'extPanID', 'precfgkey', 'transmitPower',
|
|
34
|
-
'adapterType', 'debugHerdsman', 'disableBackup', 'disablePing', 'external', 'startWithInconsistent', 'warnOnDeviceAnnouncement'
|
|
34
|
+
'adapterType', 'debugHerdsman', 'disableBackup', 'disablePing', 'external', 'startWithInconsistent', 'warnOnDeviceAnnouncement', 'baudRate'
|
|
35
35
|
];
|
|
36
36
|
|
|
37
37
|
function getDeviceByID(ID) {
|
|
@@ -806,6 +806,9 @@ function load(settings, onChange) {
|
|
|
806
806
|
if (settings.warnOnDeviceAnnouncement === undefined) {
|
|
807
807
|
settings.warnOnDeviceAnnouncement = true;
|
|
808
808
|
}
|
|
809
|
+
if (settings.baudRate === undefined) {
|
|
810
|
+
settings.baudRate = 115200;
|
|
811
|
+
}
|
|
809
812
|
|
|
810
813
|
// example: select elements with id=key and class=value and insert value
|
|
811
814
|
for (const key in settings) {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"Command": "Befehl",
|
|
17
17
|
"Command Type": "Befehlstyp",
|
|
18
18
|
"Configure reporting": "Konfigurieren Sie die Berichterstellung",
|
|
19
|
-
"Countdown": "Countdown zwischen
|
|
19
|
+
"Countdown": "Countdown zwischen 10 und 240 Sek während der Kopplung",
|
|
20
20
|
"Delete confirmation": "Löschen bestätigen",
|
|
21
21
|
"Developer": "Entwickler",
|
|
22
22
|
"Device": "Gerät",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"Command": "Command",
|
|
17
17
|
"Command Type": "Command type",
|
|
18
18
|
"Configure reporting": "Configure reporting",
|
|
19
|
-
"Countdown": "Countdown between
|
|
19
|
+
"Countdown": "Countdown between 10 and 240 sec during the pairing",
|
|
20
20
|
"Delete confirmation": "Delete confirmation",
|
|
21
21
|
"Developer": "Developer",
|
|
22
22
|
"Device": "Device",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/admin/index_m.html
CHANGED
|
@@ -494,8 +494,7 @@
|
|
|
494
494
|
</div>
|
|
495
495
|
<div class="nav-content">
|
|
496
496
|
<ul class="tabs tabs-transparent">
|
|
497
|
-
<li class="tab col s2"><a href="#tab-main" id="devs" class="translate tooltipped">Devices</a></li>
|
|
498
|
-
<!-- <li class="tab col s2"><a href="#tab-groups" class="translate tooltipped">Groups</a></li>-->
|
|
497
|
+
<li class="tab col s2"><a href="#tab-main" id="devs" class="translate tooltipped">Devices</a></li>
|
|
499
498
|
<li class="tab col s2"><a href="#tab-map" id="tabmap" class="translate tooltipped">Network map</a>
|
|
500
499
|
</li>
|
|
501
500
|
<li class="tab col s2"><a href="#tab-binding" class="translate tooltipped">Binding</a></li>
|
|
@@ -590,7 +589,7 @@
|
|
|
590
589
|
</ul>
|
|
591
590
|
</span>
|
|
592
591
|
</div>
|
|
593
|
-
<div class="input-field col s12 m6
|
|
592
|
+
<div class="input-field col s12 m6 l2">
|
|
594
593
|
<select id="adapterType" class="value">
|
|
595
594
|
<option value="" disabled selected class="translate">Choose type</option>
|
|
596
595
|
<option value="zstack">TI Z-Stack/CCxxxx</option>
|
|
@@ -600,8 +599,12 @@
|
|
|
600
599
|
</select>
|
|
601
600
|
<label class="translate">Type</label>
|
|
602
601
|
</div>
|
|
603
|
-
<div class="input-field col s6 m3
|
|
604
|
-
<input id="
|
|
602
|
+
<div class="input-field col s6 m3 l2">
|
|
603
|
+
<input id="baudRate" type="number" min="38400" max="115200" class="value"/>
|
|
604
|
+
<label class="translate" for="baudRate">Baudate Deconz/Conbee</label>
|
|
605
|
+
</div>
|
|
606
|
+
<div class="input-field col s6 m3 l2">
|
|
607
|
+
<input id="countDown" type="number" min="10" max="240" class="value"/>
|
|
605
608
|
<label class="translate" for="countDown">Countdown</label>
|
|
606
609
|
</div>
|
|
607
610
|
</div>
|
|
@@ -659,11 +662,6 @@
|
|
|
659
662
|
<input id="precfgkey" type="text" pattern="[a-fA-F\d]+" class="validate value"/>
|
|
660
663
|
<label class="translate" for="precfgkey">Transport Key</label>
|
|
661
664
|
</div>
|
|
662
|
-
<div class="input-field col s12 m6 l8">
|
|
663
|
-
<p class="translate">Tranport Key Text</p>
|
|
664
|
-
</div>
|
|
665
|
-
</div>
|
|
666
|
-
<div class="row">
|
|
667
665
|
<div class="input-field col s12 m6 l4 col-transmitPower">
|
|
668
666
|
<select id="transmitPower" class="value">
|
|
669
667
|
<option value="" disabled selected class="translate">transmitPower</option>
|
|
@@ -675,6 +673,7 @@
|
|
|
675
673
|
<label class="translate" for="transmitPower">transmitPower</label>
|
|
676
674
|
</div>
|
|
677
675
|
</div>
|
|
676
|
+
|
|
678
677
|
<div class="row">
|
|
679
678
|
<h6 class="translate">Others</h6>
|
|
680
679
|
<div class="input-field col s12 m6 l4 col-disableLed">
|
|
@@ -1175,6 +1174,7 @@
|
|
|
1175
1174
|
<p class="translate">Reset Info</p>
|
|
1176
1175
|
<a id="soft" data-mode="soft" class="modal-action modal-close waves-effect waves-red btn translate">Soft-Reset</a>
|
|
1177
1176
|
<a id="hard" data-mode="hard" class="modal-action modal-close waves-effect waves-red btn translate">Hard-Reset</a>
|
|
1177
|
+
<a id="delNvbackup" data-mode="delNvbackup" class="modal-action modal-close waves-effect waves-red btn translate">delete NVBackup.json</a>
|
|
1178
1178
|
</div>
|
|
1179
1179
|
<div class="modal-footer">
|
|
1180
1180
|
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat translate">Cancel</a>
|
package/admin/words.js
CHANGED
|
@@ -17,7 +17,7 @@ systemDictionary = {
|
|
|
17
17
|
"Command": { "uk": "Команда", "en": "Command", "de": "Befehl", "ru": "Команда", "pt": "Comando", "nl": "Commando", "fr": "Commande", "it": "Comando", "es": "Mando", "pl": "Komenda", "zh-cn": "命令"},
|
|
18
18
|
"Command Type": { "uk": "Тип команди", "en": "Command type", "de": "Befehlstyp", "ru": "Тип команды", "pt": "Tipo de Comando", "nl": "Commando type", "fr": "Type de commande", "it": "Tipo di comando", "es": "Tipo de comando", "pl": "Typ polecenia", "zh-cn": "命令类型"},
|
|
19
19
|
"Configure reporting": { "uk": "Налаштувати звітність", "en": "Configure reporting", "de": "Konfigurieren Sie die Berichterstellung", "ru": "Настроить отчеты", "pt": "Configurar relatórios", "nl": "Configureer rapportage", "fr": "Configurer les rapports", "it": "Configura i rapporti", "es": "Configurar informes", "pl": "Skonfiguruj raportowanie", "zh-cn": "配置报告"},
|
|
20
|
-
"Countdown": { "uk": "Зворотний відлік від
|
|
20
|
+
"Countdown": { "uk": "Зворотний відлік від 10 до 240 секунд під час підʼєднання нових компонентів Zigbee до координатора.", "en": "Countdown between 10 and 240 sec during the pairing", "de": "Countdown zwischen 10 und 240 Sek während der Kopplung", "ru": "Обратный отсчет от 10 до 240 секунд во время сопряжения новых компонентов Zigbee с координатором.", "pt": "Contagem regressiva entre 10 e 240 seg", "nl": "Aftellen tussen 10 en 240 sec tijdens het pairen", "fr": "Compte à rebours entre 10 et 240 sec pendant l'assemblage de nouveaux composants", "it": "Conto alla rovescia tra 10 e 240 sec", "es": "Cuenta atrás entre 10 y 240 seg.", "pl": "Countdown między 10 a 240 sekundem podczas łączenia", "zh-cn": "倒计时(0-255秒)"},
|
|
21
21
|
"Delete confirmation": { "uk": "Підтвердження видалення", "en": "Delete confirmation", "de": "Löschen bestätigen", "ru": "Подтвердите удаление", "pt": "Excluir confirmação", "nl": "Bevestig verwijderen", "fr": "Confirmer la suppression", "it": "Cancella conferma", "es": "Eliminar confirmación", "pl": "Usuń potwierdzenie", "zh-cn": "确认删除?"},
|
|
22
22
|
"Developer": { "uk": "Розробник", "en": "Developer", "de": "Entwickler", "ru": "Разработчику", "pt": "Developer", "nl": "Ontwikkelaar", "fr": "Développeur", "it": "Developer", "es": "Developer", "pl": "Developer", "zh-cn": "开发者页面"},
|
|
23
23
|
"Device": { "uk": "Пристрій", "en": "Device", "de": "Gerät", "ru": "Устройство", "pt": "Dispositivo", "nl": "Apparaat", "fr": "Dispositif", "it": "Dispositivo", "es": "Dispositivo", "pl": "Urządzenie", "zh-cn": "设备"},
|
|
@@ -108,4 +108,4 @@ systemDictionary = {
|
|
|
108
108
|
"The value to send to your device (use douple-quotes if a number is a string).": {"uk": "Значення, яке потрібно надіслати на ваш пристрій (використовуйте подвійні лапки, якщо число є строкою).", "en": "The value to send to your device (use double-quotes if a number is a string).", "de": "Der Wert der an Ihr Gerät gesendet werden soll (verwenden Sie doppelte Anführungszeichen wenn eine Zahl als Zeichenfolge gesendet werden soll).", "ru": "Значение для отправки на ваше устройство (используйте двойные кавычки, если число является строкой).", "pt": "O valor a ser enviado ao seu dispositivo (use aspas duplas se um número for uma string).", "nl": "De waarde die naar uw apparaat moet worden verzonden (gebruik dubbele aanhalingstekens als een getal een tekenreeks is).", "fr": "La valeur à envoyer à votre appareil (utilisez des guillemets doubles si un nombre est une chaîne).", "it": "Il valore da inviare al tuo dispositivo (usa virgolette doppie se un numero è una stringa).", "es": "El valor para enviar a su dispositivo (use comillas dobles si un número es una cadena).", "pl": "Wartość do wysłania do urządzenia (użyj podwójnych cudzysłowów, jeśli liczba jest łańcuchem).", "zh-cn": "要发送到设备的值(如果数字是字符串,请使用双引号)。"},
|
|
109
109
|
"This page is needed only for advanced users that like to extend adapter functionalities!": {"uk": "Ця сторінка потрібна лише досвідченим користувачам, які хочуть розширити функціональність адаптера!", "en": "This page is needed only for advanced users that like to extend adapter functionalities!", "de": "Diese Seite ist nur für fortgeschrittene Benutzer gedacht, die den Adapter erweitern möchten!", "ru": "Эта страница нужна только опытным пользователям, которые хотят расширить функциональные возможности адаптера!", "pt": "Esta página é necessária apenas para usuários avançados que gostam de estender as funcionalidades do adaptador!", "nl": "Deze pagina is alleen bedoeld voor gevorderden welke de adapter functionaliteit uit willen breiden!", "fr": "Cette page n'est nécessaire que pour les utilisateurs avancés souhaitant étendre les fonctionnalités de l'adaptateur !", "it": "Questa pagina è necessaria solo per utenti avanzati che desiderano estendere le funzionalità dell'adattatore!", "es": "Esta página es necesaria solo para usuarios avanzados que deseen ampliar las funcionalidades del adaptador.", "pl": "Ta strona jest potrzebna tylko zaawansowanym użytkownikom, którzy lubią rozszerzać funkcje adaptera!", "zh-cn": "只有喜欢扩展适配器功能的高级用户才需要此页面!"},
|
|
110
110
|
"Transport Key Text": { "uk": "Транспортний ключ – це ключ шифрування мережі. Будь ласка, виберіть випадкову послідовність символів, перш ніж приєднувати пристрої. Просто введіть 32 випадкових шістнадцяткових символи (a-f і 0-9). Якщо ви зміните ключ пізніше, вам доведеться переприєднати свої пристрої.", "en": "Transport Key is the network encryption key. Please choose a random key sequence before you pair your devices. Just enter 32 random hex character (a-f and 0-9). If you change the key later, you will have to repair your devices.", "de": "Transportschlüssel ist der Netzwerkverschlüsselungsschlüssel. Bitte wähle eine zufällige Schlüsselsequenz <b>bevor</b> du Geräte koppelst. Gib einfach 32 zufällige Hex-Zeichen ein (a-f und 0-9). Wenn du den Schlüssel später änderst, musst du alle Geräte neu koppeln.", "ru": "Транспортный ключ - это сетевой ключ шифрования. Пожалуйста, выберите случайную последовательность <b>перед</b> подключением устройств. Просто введите 32 случайных шестнадцатеричных символа (a-f и 0-9). Если вы поменяете ключ позже, вам придется снова спаривать свои устройства.", "pt": "Chave de transporte é a chave de criptografia da rede. ", "nl": "Transportsleutel is de netwerkversleutelingssleutel. Kies een willekeurige toetsenreeks <b> voordat </b> u uw apparaten koppelt. Voer gewoon 32 willekeurige hexadecimale tekens in (a-f en 0-9). Als u de sleutel later wijzigt, moet u alle apparaten opnieuw aanleren.", "fr": "La clé de transport est la clé de chiffrement du réseau. Choisissez s.v.p. une chaîne <b>avant</b> de coupler vos dispositifs. Entrez simplement 32 caractères hexadécimaux aléatoires (a-f et 0-9). Si vous changez la clé plus tard, vous devez re-coupler vos dispositifs.", "it": "La chiave di trasporto è la chiave di crittografia della rete. ", "es": "Transport Key es la clave de cifrado de red. ", "pl": "Klucz transportowy to sieciowy klucz szyfrowania.", "zh-cn": "传输密钥是网络加密密钥。"},
|
|
111
|
-
};
|
|
111
|
+
};
|
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.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.10.1": {
|
|
7
|
+
"en": "Baudrate is now configurable. works ONLY with Deconz/Conbee( 38400 )\nadd nvbackup.json delete button",
|
|
8
|
+
"de": "Baudrate ist jetzt konfigurierbar. funktioniert nur mit Deconz/Conbee( 38400 )\nnvbackup hinzufügen. json löschen taste",
|
|
9
|
+
"ru": "Baudrate теперь настраиваемый. работает только с Deconz/Conbee (38400)\nдобавьте nvbackup. кнопка",
|
|
10
|
+
"pt": "O Baudrate agora é configurável. funciona somente com Deconz/Conbee( 38400 )\nadicionar nvbackup. botão de exclusão json",
|
|
11
|
+
"nl": "Baudrate is nu configureerbaar. ALLEEN werkt met Deconz/Conbee( 38400 )\nnvbackup toevoegen. json delete knop",
|
|
12
|
+
"fr": "Baudrate est maintenant configurable. fonctionne uniquement avec Decanz/Conbee( 38400 )\najouter nvbackup. bouton de suppression de json",
|
|
13
|
+
"it": "Baudrate è ora configurabile. funziona SOLO con Deconz/Conbee( 38400 )\naggiungere nvbackup. pulsante di cancellazione json",
|
|
14
|
+
"es": "Baudrate es ahora configurable. sólo funciona con Deconz/Conbee( 38400 )\nañadir nvbackup. json delete botón",
|
|
15
|
+
"pl": "Baudrate jest teraz konfigurowalny. działa tylko z Deconz / Conbee (38400)\ndodaj nvbackup. json usuń przycisk",
|
|
16
|
+
"uk": "Baudrate тепер конфігурується. працює ONLY з Deconz/Conbee( 38400 )\nдодати nvbackup. json видалити кнопка",
|
|
17
|
+
"zh-cn": "鲍德拉特现在可塑. 仅与Deconz/Conbee(38400)合作\n添加 nv 备份。 json 删除按钮"
|
|
18
|
+
},
|
|
19
|
+
"1.10.0": {
|
|
20
|
+
"en": "new zigbee-herdsman-converters 18.x\nconfigure message is now a warning",
|
|
21
|
+
"de": "neue zickbee-herdsman-konverter 18.x\nkonfigurieren von meldungen",
|
|
22
|
+
"ru": "новые зигби-гердсман-конвертеры 18.x\nнастройка сообщения - это предупреждение",
|
|
23
|
+
"pt": "novos conversores de zigbee-herdsman 18.x\nconfigurar a mensagem é agora um aviso",
|
|
24
|
+
"nl": "nieuwe zigbee-herdsman-converters 18.x\nconfigureren bericht is nu een waarschuwing",
|
|
25
|
+
"fr": "nouveaux convertisseurs zigbee-herdsman 18.x\nconfigure message est maintenant un avertissement",
|
|
26
|
+
"it": "nuovo zigbee-herdsman-converter 18.x\nconfigurare il messaggio è ora un avviso",
|
|
27
|
+
"es": "nuevos zigbee-herdsman-converters 18.x\nmensaje de configuración es ahora una advertencia",
|
|
28
|
+
"pl": "nowe konwertery zigbee- herdsman- 18 x\nkonfiguracja wiadomości jest teraz ostrzeżeniem",
|
|
29
|
+
"uk": "новий zigbee-herdsman-converters 18.х\nналаштування повідомлення тепер попередження",
|
|
30
|
+
"zh-cn": "新的 zigbee- herdsman- 转换器 18.x 电话\n配置信件现在是警告"
|
|
31
|
+
},
|
|
6
32
|
"1.9.7": {
|
|
7
33
|
"en": "corr configure for some devices",
|
|
8
34
|
"de": "corr konfigurieren für einige geräte",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "ostatnia wersja 16.x\nkor reboot w systemie kontroli państwa",
|
|
68
94
|
"uk": "остання версія jc 16.x\nперезавантаження коренів в держконтролері",
|
|
69
95
|
"zh-cn": "上一次zhc Version 16x\n州控制容忍的报复"
|
|
70
|
-
},
|
|
71
|
-
"1.9.2": {
|
|
72
|
-
"en": "gen states from exposes as function\nrebuild dev_names.json with state cleanup button",
|
|
73
|
-
"de": "gen-staaten von exponiert als funktion\ndev_names neu aufbauen. json with state cleanup taste",
|
|
74
|
-
"ru": "гены из экспозиций как функция\nперестроить dev_names. json с государственной кнопкой очистки",
|
|
75
|
-
"pt": "gen estados de exposições como função\nreconstruir dev_names. json com botão de limpeza do estado",
|
|
76
|
-
"nl": "gen staten van blootstelling als functioneren\nherbouwde dev namen. json met staatsopruimknop",
|
|
77
|
-
"fr": "gen states from exposes as function\nreconstruire dev_names. json avec bouton de nettoyage de l'état",
|
|
78
|
-
"it": "gen stati da espone come funzione\nricostruire dev_names. json con il pulsante di pulizia dello stato",
|
|
79
|
-
"es": "gen estados de expone como función\nreconstruir dev_names. json con botón de limpieza del estado",
|
|
80
|
-
"pl": "państwa genowe zjawiają się jako funkcje\nodbudowa nazw. json z przyciskiem czystego przycisku",
|
|
81
|
-
"uk": "генні стани від вибухів як функції\nrebuild dev_names. json з державною кнопкою очищення",
|
|
82
|
-
"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": {
|
|
@@ -238,7 +238,8 @@
|
|
|
238
238
|
"cancel"
|
|
239
239
|
]
|
|
240
240
|
}
|
|
241
|
-
]
|
|
241
|
+
],
|
|
242
|
+
"installedFrom": "ioBroker/ioBroker.zigbee#ed32d2bb7a65c9c5c47f6633a4cb97aeb2b3e002"
|
|
242
243
|
},
|
|
243
244
|
"native": {
|
|
244
245
|
"port": "",
|
|
@@ -254,7 +255,8 @@
|
|
|
254
255
|
"disableBackup": false,
|
|
255
256
|
"external": "",
|
|
256
257
|
"startWithInconsistent": false,
|
|
257
|
-
"warnOnDeviceAnnouncement": true
|
|
258
|
+
"warnOnDeviceAnnouncement": true,
|
|
259
|
+
"baudRate": 115200
|
|
258
260
|
},
|
|
259
261
|
"instanceObjects": [
|
|
260
262
|
{
|
package/lib/commands.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const getZbId = require('./utils').getZbId;
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const pathLib = require('path');
|
|
4
6
|
const statesMapping = require('./devices');
|
|
5
7
|
const disallowedDashStates = [
|
|
6
8
|
'link_quality', 'available', 'battery', 'groups', 'device_query',
|
|
@@ -46,6 +48,11 @@ class Commands {
|
|
|
46
48
|
onMessage(obj) {
|
|
47
49
|
if (typeof obj === 'object' && obj.command) {
|
|
48
50
|
switch (obj.command) {
|
|
51
|
+
case 'reset':
|
|
52
|
+
if (obj && obj.message && obj.message.mode == 'delNvbackup') {
|
|
53
|
+
this.delNvBackup(obj.from, obj.command, obj.message, obj.callback);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
49
56
|
case 'letsPairing':
|
|
50
57
|
if (obj && obj.message && typeof obj.message === 'object') {
|
|
51
58
|
this.letsPairing(obj.from, obj.command, obj.message, obj.callback);
|
|
@@ -110,6 +117,17 @@ class Commands {
|
|
|
110
117
|
}
|
|
111
118
|
}
|
|
112
119
|
|
|
120
|
+
delNvBackup(from, command, msg, callback) {
|
|
121
|
+
try {
|
|
122
|
+
if (this.zbController) {
|
|
123
|
+
const name = this.zbController.herdsman.adapter.backupPath;
|
|
124
|
+
require('fs').unlinkSync(name);
|
|
125
|
+
}
|
|
126
|
+
} catch (error) {
|
|
127
|
+
this.error(error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
113
131
|
async letsPairing(from, command, message, callback) {
|
|
114
132
|
if (this.zbController) {
|
|
115
133
|
let devId = '';
|
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) => {
|
|
@@ -961,6 +961,8 @@ class Zigbee extends utils.Adapter {
|
|
|
961
961
|
// https://github.com/ioBroker/ioBroker.zigbee/issues/668
|
|
962
962
|
const extPanIdFix = this.config.extPanIdFix ? this.config.extPanIdFix : false;
|
|
963
963
|
|
|
964
|
+
const baudRate = parseInt(this.config.baudRate ? this.config.baudRate : 115200);
|
|
965
|
+
|
|
964
966
|
return {
|
|
965
967
|
net: {
|
|
966
968
|
panId: panID,
|
|
@@ -970,7 +972,7 @@ class Zigbee extends utils.Adapter {
|
|
|
970
972
|
},
|
|
971
973
|
sp: {
|
|
972
974
|
port: port,
|
|
973
|
-
baudRate:
|
|
975
|
+
baudRate: baudRate,
|
|
974
976
|
rtscts: false,
|
|
975
977
|
adapter: adapterType,
|
|
976
978
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
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.7",
|
|
30
|
+
"zigbee-herdsman-converters": "18.17.0"
|
|
31
31
|
},
|
|
32
32
|
"description": "Zigbee devices",
|
|
33
33
|
"devDependencies": {
|