iobroker.zigbee2mqtt 2.5.0 → 2.7.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 +16 -1
- package/admin/i18n/de/translations.json +3 -1
- package/admin/i18n/en/translations.json +2 -0
- package/admin/i18n/es/translations.json +2 -0
- package/admin/i18n/fr/translations.json +2 -0
- package/admin/i18n/it/translations.json +11 -9
- package/admin/i18n/nl/translations.json +10 -8
- package/admin/i18n/pl/translations.json +8 -6
- package/admin/i18n/pt/translations.json +9 -7
- package/admin/i18n/ru/translations.json +2 -0
- package/admin/i18n/uk/translations.json +2 -0
- package/admin/i18n/zh-cn/translations.json +11 -9
- package/admin/jsonConfig.json +13 -0
- package/io-package.json +30 -28
- package/lib/deviceController.js +66 -21
- package/lib/exposes.js +55 -14
- package/lib/messages.js +1 -0
- package/lib/states.js +18 -11
- package/lib/websocketController.js +8 -2
- package/lib/z2mController.js +36 -5
- package/main.js +26 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -32,6 +32,21 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
32
32
|
Placeholder for the next version (at the beginning of the line):
|
|
33
33
|
### **WORK IN PROGRESS**
|
|
34
34
|
-->
|
|
35
|
+
### 2.7.0 (2023-01-18)
|
|
36
|
+
|
|
37
|
+
- (o0shojo0o) added support for wildcard actions (eg. *_single) ([#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116))
|
|
38
|
+
- (o0shojo0o) added error handling optimizations ([more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679))
|
|
39
|
+
- (o0shojo0o) added option `auth_token` for websocket connection ([#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112))
|
|
40
|
+
- (o0shojo0o) websocket timeout increased
|
|
41
|
+
|
|
42
|
+
### 2.6.0 (2023-01-10)
|
|
43
|
+
|
|
44
|
+
- (o0shojo0o) added state `transition` for transition overwrite (-1 disabled overwrite) ([#101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101))
|
|
45
|
+
- (o0shojo0o) consideration of the description when creating the friendly name ([#105](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/105))
|
|
46
|
+
- (o0shojo0o) added state `effect` for groups ([#101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101))
|
|
47
|
+
- (o0shojo0o) fix state contact
|
|
48
|
+
- (o0shojo0o) added handling for disabled devices
|
|
49
|
+
|
|
35
50
|
### 2.5.0 (2023-01-02)
|
|
36
51
|
|
|
37
52
|
- (o0shojo0o) added option `Brightness step should also turn the light on or off`
|
|
@@ -40,7 +55,7 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
40
55
|
|
|
41
56
|
### 2.4.5 (2022-12-20)
|
|
42
57
|
|
|
43
|
-
- (o0shojo0o) extend
|
|
58
|
+
- (o0shojo0o) extend `text` for `action` ([#84](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84))
|
|
44
59
|
|
|
45
60
|
### 2.4.4 (2022-12-06)
|
|
46
61
|
|
|
@@ -22,5 +22,7 @@
|
|
|
22
22
|
"Other configurations": "Andere Konfigurationen",
|
|
23
23
|
"Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT Protokolle zu ioBroker Protokollen",
|
|
24
24
|
"Brightness move should also turn the light on or off": "Brightness move soll auch das Licht ein- oder ausschalten",
|
|
25
|
-
"Brightness step should also turn the light on or off": "Brightness step soll auch das Licht ein- oder ausschalten"
|
|
25
|
+
"Brightness step should also turn the light on or off": "Brightness step soll auch das Licht ein- oder ausschalten",
|
|
26
|
+
"Use Auth-Token": "Auth-Token verwenden",
|
|
27
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (Sonderzeichen werden nicht unterstützt)"
|
|
26
28
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Configure your Zigbee2MQTT connection",
|
|
9
9
|
"Websocket IP-Address": "Websocket IP-Address",
|
|
10
10
|
"Websocket Port": "Websocket Port",
|
|
11
|
+
"Use Auth-Token": "Use Auth-Token",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (special characters are not supported)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Create a dummy MQTT-Server for Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "External MQTT-Server IP-Address",
|
|
13
15
|
"External MQTT-Server Port": "External MQTT-Server Port",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Configura tu conexión Zigbee2MQTT",
|
|
9
9
|
"Websocket IP-Address": "Dirección IP de Websocket",
|
|
10
10
|
"Websocket Port": "puerto websocket",
|
|
11
|
+
"Use Auth-Token": "Usar token de autenticación",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (los caracteres especiales no son compatibles)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Cree un servidor MQTT ficticio para Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "Dirección IP del servidor MQTT externo",
|
|
13
15
|
"External MQTT-Server Port": "Puerto de servidor MQTT externo",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Configurez votre connexion Zigbee2MQTT",
|
|
9
9
|
"Websocket IP-Address": "Adresse IP Websocket",
|
|
10
10
|
"Websocket Port": "Port WebSocket",
|
|
11
|
+
"Use Auth-Token": "Utiliser le jeton d'authentification",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (les caractères spéciaux ne sont pas pris en charge)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Créer un serveur MQTT factice pour Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "Adresse IP du serveur MQTT externe",
|
|
13
15
|
"External MQTT-Server Port": "Port serveur MQTT externe",
|
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
"zigbee2mqtt adapter settings": "Impostazioni dell'adattatore per zigbee2mqtt",
|
|
3
3
|
"Select and configure your Zigbee2MQTT connection": "Seleziona e configura la connessione Zigbee2MQTT",
|
|
4
4
|
"Select connection to Zigbee2MQTT": "Seleziona la connessione a Zigbee2MQTT",
|
|
5
|
-
"Websocket": "
|
|
5
|
+
"Websocket": "Presa web",
|
|
6
6
|
"External MQTT-Server (Experimental)": "Server MQTT esterno (sperimentale)",
|
|
7
7
|
"Internal MQTT-Server (Experimental)": "Server MQTT interno (sperimentale)",
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Configura la tua connessione Zigbee2MQTT",
|
|
9
9
|
"Websocket IP-Address": "Indirizzo IP WebSocket",
|
|
10
|
-
"Websocket Port": "Porta
|
|
10
|
+
"Websocket Port": "Porta websocket",
|
|
11
|
+
"Use Auth-Token": "Usa token di autenticazione",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (i caratteri speciali non sono supportati)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Crea un server MQTT fittizio per Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "Indirizzo IP del server MQTT esterno",
|
|
13
|
-
"External MQTT-Server Port": "Porta
|
|
14
|
-
"MQTT-Server IP-Address bind": "
|
|
15
|
-
"MQTT-Server Port": "Porta server MQTT",
|
|
15
|
+
"External MQTT-Server Port": "Porta server MQTT esterna",
|
|
16
|
+
"MQTT-Server IP-Address bind": "Binding dell'indirizzo IP del server MQTT",
|
|
17
|
+
"MQTT-Server Port": "Porta del server MQTT",
|
|
16
18
|
"Configure your Zigbee2MQTT WebUi connection": "Configura la connessione Zigbee2MQTT WebUi",
|
|
17
19
|
"WebUi Address": "Indirizzo WebUi",
|
|
18
20
|
"WebUi Port": "Porta WebUi",
|
|
19
|
-
"Color configurations": "Configurazioni colore",
|
|
21
|
+
"Color configurations": "Configurazioni di colore",
|
|
20
22
|
"Color temperature sync with color": "Sincronizzazione della temperatura del colore con il colore",
|
|
21
|
-
"Use Kelvin instead of mired for the color temps": "Usa Kelvin invece di mired per le temperature
|
|
23
|
+
"Use Kelvin instead of mired for the color temps": "Usa Kelvin invece di mired per le temperature del colore",
|
|
22
24
|
"Other configurations": "Altre configurazioni",
|
|
23
|
-
"Proxy Zigbee2MQTT logs to ioBroker logs": "
|
|
24
|
-
"Brightness move should also turn the light on or off": "
|
|
25
|
+
"Proxy Zigbee2MQTT logs to ioBroker logs": "Il proxy Zigbee2MQTT registra nei registri ioBroker",
|
|
26
|
+
"Brightness move should also turn the light on or off": "Lo spostamento della luminosità dovrebbe anche accendere o spegnere la luce",
|
|
25
27
|
"Brightness step should also turn the light on or off": "Il passo di luminosità dovrebbe anche accendere o spegnere la luce"
|
|
26
28
|
}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"zigbee2mqtt adapter settings": "Adapterinstellingen voor zigbee2mqtt",
|
|
3
|
-
"Select and configure your Zigbee2MQTT connection": "Selecteer en configureer Zigbee2MQTT-verbinding",
|
|
3
|
+
"Select and configure your Zigbee2MQTT connection": "Selecteer en configureer de Zigbee2MQTT-verbinding",
|
|
4
4
|
"Select connection to Zigbee2MQTT": "Selecteer verbinding met Zigbee2MQTT",
|
|
5
5
|
"Websocket": "Websocket",
|
|
6
6
|
"External MQTT-Server (Experimental)": "Externe MQTT-server (experimenteel)",
|
|
7
7
|
"Internal MQTT-Server (Experimental)": "Interne MQTT-server (experimenteel)",
|
|
8
|
-
"Configure your Zigbee2MQTT connection": "Configureer
|
|
8
|
+
"Configure your Zigbee2MQTT connection": "Configureer je Zigbee2MQTT-verbinding",
|
|
9
9
|
"Websocket IP-Address": "Websocket IP-adres",
|
|
10
10
|
"Websocket Port": "Websocket-poort",
|
|
11
|
+
"Use Auth-Token": "Gebruik Auth-Token",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (speciale tekens worden niet ondersteund)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Maak een dummy MQTT-server voor Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "Extern MQTT-server IP-adres",
|
|
13
15
|
"External MQTT-Server Port": "Externe MQTT-serverpoort",
|
|
14
|
-
"MQTT-Server IP-Address bind": "MQTT-server IP-adres
|
|
16
|
+
"MQTT-Server IP-Address bind": "MQTT-server IP-adres binding",
|
|
15
17
|
"MQTT-Server Port": "MQTT-serverpoort",
|
|
16
|
-
"Configure your Zigbee2MQTT WebUi connection": "Configureer Zigbee2MQTT WebUi-verbinding",
|
|
18
|
+
"Configure your Zigbee2MQTT WebUi connection": "Configureer de Zigbee2MQTT WebUi-verbinding",
|
|
17
19
|
"WebUi Address": "WebUi-adres",
|
|
18
20
|
"WebUi Port": "WebUi-poort",
|
|
19
|
-
"Color configurations": "
|
|
20
|
-
"Color temperature sync with color": "
|
|
21
|
+
"Color configurations": "Kleur configuraties",
|
|
22
|
+
"Color temperature sync with color": "Kleurtemperatuursynchronisatie met kleur",
|
|
21
23
|
"Use Kelvin instead of mired for the color temps": "Gebruik Kelvin in plaats van mired voor de kleurtemperaturen",
|
|
22
24
|
"Other configurations": "Andere configuraties",
|
|
23
|
-
"Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT logt
|
|
24
|
-
"Brightness move should also turn the light on or off": "Helderheidsbeweging
|
|
25
|
+
"Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT logt naar ioBroker-logboeken",
|
|
26
|
+
"Brightness move should also turn the light on or off": "Helderheidsbeweging zou ook het licht aan of uit moeten zetten",
|
|
25
27
|
"Brightness step should also turn the light on or off": "De helderheidsstap moet het licht ook in- of uitschakelen"
|
|
26
28
|
}
|
|
@@ -6,21 +6,23 @@
|
|
|
6
6
|
"External MQTT-Server (Experimental)": "Zewnętrzny serwer MQTT (eksperymentalny)",
|
|
7
7
|
"Internal MQTT-Server (Experimental)": "Wewnętrzny serwer MQTT (eksperymentalny)",
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Skonfiguruj połączenie Zigbee2MQTT",
|
|
9
|
-
"Websocket IP-Address": "Adres IP gniazda
|
|
10
|
-
"Websocket Port": "
|
|
11
|
-
"
|
|
9
|
+
"Websocket IP-Address": "Adres IP gniazda internetowego",
|
|
10
|
+
"Websocket Port": "Gniazdo sieciowe",
|
|
11
|
+
"Use Auth-Token": "Użyj tokena uwierzytelniającego",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (znaki specjalne nie są obsługiwane)",
|
|
13
|
+
"Create a dummy MQTT-Server for Zigbee2MQTT": "Utwórz fikcyjny serwer MQTT dla Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "Adres IP zewnętrznego serwera MQTT",
|
|
13
15
|
"External MQTT-Server Port": "Zewnętrzny port serwera MQTT",
|
|
14
|
-
"MQTT-Server IP-Address bind": "Powiązanie adresu IP serwera MQTT
|
|
16
|
+
"MQTT-Server IP-Address bind": "Powiązanie adresu IP serwera MQTT",
|
|
15
17
|
"MQTT-Server Port": "Port serwera MQTT",
|
|
16
18
|
"Configure your Zigbee2MQTT WebUi connection": "Skonfiguruj połączenie Zigbee2MQTT WebUi",
|
|
17
19
|
"WebUi Address": "Adres WebUI",
|
|
18
20
|
"WebUi Port": "Port WebUI",
|
|
19
21
|
"Color configurations": "Konfiguracje kolorów",
|
|
20
22
|
"Color temperature sync with color": "Synchronizacja temperatury barwowej z kolorem",
|
|
21
|
-
"Use Kelvin instead of mired for the color temps": "Użyj Kelvina zamiast
|
|
23
|
+
"Use Kelvin instead of mired for the color temps": "Użyj Kelvina zamiast pogrążonego dla temp. kolorów",
|
|
22
24
|
"Other configurations": "Inne konfiguracje",
|
|
23
|
-
"Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT loguje do logów ioBroker",
|
|
25
|
+
"Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT loguje się do logów ioBroker",
|
|
24
26
|
"Brightness move should also turn the light on or off": "Ruch jasności powinien również włączać lub wyłączać światło",
|
|
25
27
|
"Brightness step should also turn the light on or off": "Krok jasności powinien również włączać lub wyłączać światło"
|
|
26
28
|
}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"zigbee2mqtt adapter settings": "Configurações do adaptador para zigbee2mqtt",
|
|
3
3
|
"Select and configure your Zigbee2MQTT connection": "Selecione e configure a conexão Zigbee2MQTT",
|
|
4
|
-
"Select connection to Zigbee2MQTT": "Selecione a conexão com
|
|
4
|
+
"Select connection to Zigbee2MQTT": "Selecione a conexão com Zigbee2MQTT",
|
|
5
5
|
"Websocket": "Websocket",
|
|
6
6
|
"External MQTT-Server (Experimental)": "Servidor MQTT Externo (Experimental)",
|
|
7
7
|
"Internal MQTT-Server (Experimental)": "Servidor MQTT Interno (Experimental)",
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Configure sua conexão Zigbee2MQTT",
|
|
9
9
|
"Websocket IP-Address": "Endereço IP do Websocket",
|
|
10
10
|
"Websocket Port": "Porta Websocket",
|
|
11
|
+
"Use Auth-Token": "Usar token de autenticação",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (caracteres especiais não são suportados)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Crie um servidor MQTT fictício para Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "Endereço IP do servidor MQTT externo",
|
|
13
15
|
"External MQTT-Server Port": "Porta externa do servidor MQTT",
|
|
14
|
-
"MQTT-Server IP-Address bind": "
|
|
15
|
-
"MQTT-Server Port": "Porta do
|
|
16
|
+
"MQTT-Server IP-Address bind": "Vinculação de endereço IP do servidor MQTT",
|
|
17
|
+
"MQTT-Server Port": "Porta do Servidor MQTT",
|
|
16
18
|
"Configure your Zigbee2MQTT WebUi connection": "Configurar conexão Zigbee2MQTT WebUi",
|
|
17
|
-
"WebUi Address": "Endereço
|
|
19
|
+
"WebUi Address": "Endereço WebUI",
|
|
18
20
|
"WebUi Port": "Porta WebUI",
|
|
19
21
|
"Color configurations": "Configurações de cores",
|
|
20
|
-
"Color temperature sync with color": "Sincronização
|
|
21
|
-
"Use Kelvin instead of mired for the color temps": "Use Kelvin em vez de
|
|
22
|
+
"Color temperature sync with color": "Sincronização de temperatura de cor com cores",
|
|
23
|
+
"Use Kelvin instead of mired for the color temps": "Use Kelvin em vez de mired para as temperaturas de cor",
|
|
22
24
|
"Other configurations": "Outras configurações",
|
|
23
|
-
"Proxy Zigbee2MQTT logs to ioBroker logs": "
|
|
25
|
+
"Proxy Zigbee2MQTT logs to ioBroker logs": "Logs proxy Zigbee2MQTT para logs ioBroker",
|
|
24
26
|
"Brightness move should also turn the light on or off": "O movimento de brilho também deve ligar ou desligar a luz",
|
|
25
27
|
"Brightness step should also turn the light on or off": "A etapa de brilho também deve ligar ou desligar a luz"
|
|
26
28
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Настройте соединение Zigbee2MQTT",
|
|
9
9
|
"Websocket IP-Address": "IP-адрес веб-сокета",
|
|
10
10
|
"Websocket Port": "Порт веб-сокета",
|
|
11
|
+
"Use Auth-Token": "Использовать авторизационный токен",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (специальные символы не поддерживаются)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Создайте фиктивный MQTT-сервер для Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "IP-адрес внешнего MQTT-сервера",
|
|
13
15
|
"External MQTT-Server Port": "Порт внешнего MQTT-сервера",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "Налаштуйте підключення Zigbee2MQTT",
|
|
9
9
|
"Websocket IP-Address": "IP-адреса Websocket",
|
|
10
10
|
"Websocket Port": "Порт Websocket",
|
|
11
|
+
"Use Auth-Token": "Використовуйте Auth-Token",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token (спеціальні символи не підтримуються)",
|
|
11
13
|
"Create a dummy MQTT-Server for Zigbee2MQTT": "Створіть фіктивний MQTT-сервер для Zigbee2MQTT",
|
|
12
14
|
"External MQTT-Server IP-Address": "IP-адреса зовнішнього MQTT-сервера",
|
|
13
15
|
"External MQTT-Server Port": "Зовнішній порт MQTT-сервера",
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"zigbee2mqtt adapter settings": "zigbee2mqtt 的适配器设置",
|
|
3
|
-
"Select and configure your Zigbee2MQTT connection": "
|
|
4
|
-
"Select connection to Zigbee2MQTT": "
|
|
3
|
+
"Select and configure your Zigbee2MQTT connection": "选择并配置 Zigbee2MQTT 连接",
|
|
4
|
+
"Select connection to Zigbee2MQTT": "选择与 Zigbee2MQTT 的连接",
|
|
5
5
|
"Websocket": "网络套接字",
|
|
6
|
-
"External MQTT-Server (Experimental)": "外部 MQTT
|
|
6
|
+
"External MQTT-Server (Experimental)": "外部 MQTT 服务器(实验性)",
|
|
7
7
|
"Internal MQTT-Server (Experimental)": "内部 MQTT 服务器(实验性)",
|
|
8
8
|
"Configure your Zigbee2MQTT connection": "配置您的 Zigbee2MQTT 连接",
|
|
9
9
|
"Websocket IP-Address": "Websocket IP 地址",
|
|
10
10
|
"Websocket Port": "Websocket 端口",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"Use Auth-Token": "使用授权令牌",
|
|
12
|
+
"Auth-Token (special characters are not supported)": "Auth-Token(不支持特殊字符)",
|
|
13
|
+
"Create a dummy MQTT-Server for Zigbee2MQTT": "为 Zigbee2MQTT 创建虚拟 MQTT 服务器",
|
|
14
|
+
"External MQTT-Server IP-Address": "外部 MQTT 服务器 IP 地址",
|
|
13
15
|
"External MQTT-Server Port": "外部 MQTT 服务器端口",
|
|
14
|
-
"MQTT-Server IP-Address bind": "MQTT-服务器
|
|
16
|
+
"MQTT-Server IP-Address bind": "MQTT-服务器IP地址绑定",
|
|
15
17
|
"MQTT-Server Port": "MQTT-服务器端口",
|
|
16
18
|
"Configure your Zigbee2MQTT WebUi connection": "配置 Zigbee2MQTT WebUi 连接",
|
|
17
|
-
"WebUi Address": "
|
|
18
|
-
"WebUi Port": "
|
|
19
|
+
"WebUi Address": "WebUi地址",
|
|
20
|
+
"WebUi Port": "WebUi端口",
|
|
19
21
|
"Color configurations": "颜色配置",
|
|
20
22
|
"Color temperature sync with color": "色温与颜色同步",
|
|
21
|
-
"Use Kelvin instead of mired for the color temps": "使用 Kelvin 而不是 mired
|
|
23
|
+
"Use Kelvin instead of mired for the color temps": "使用 Kelvin 而不是 mired 的色温",
|
|
22
24
|
"Other configurations": "其他配置",
|
|
23
25
|
"Proxy Zigbee2MQTT logs to ioBroker logs": "代理 Zigbee2MQTT 日志到 ioBroker 日志",
|
|
24
26
|
"Brightness move should also turn the light on or off": "亮度移动也应该打开或关闭灯",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -50,6 +50,19 @@
|
|
|
50
50
|
"newLine": false,
|
|
51
51
|
"hidden": "data.connectionType != 'ws'"
|
|
52
52
|
},
|
|
53
|
+
"wsTokenEnabled": {
|
|
54
|
+
"type": "checkbox",
|
|
55
|
+
"label": "Use Auth-Token",
|
|
56
|
+
"newLine": true,
|
|
57
|
+
"hidden": "data.connectionType != 'ws'"
|
|
58
|
+
},
|
|
59
|
+
"wsToken": {
|
|
60
|
+
"type": "password",
|
|
61
|
+
"label": "Auth-Token (special characters are not supported)",
|
|
62
|
+
"newLine": true,
|
|
63
|
+
"lg": 2,
|
|
64
|
+
"hidden": "data.wsTokenEnabled != true || data.connectionType != 'ws'"
|
|
65
|
+
},
|
|
53
66
|
"dummyMqtt": {
|
|
54
67
|
"type": "checkbox",
|
|
55
68
|
"label": "Create a dummy MQTT-Server for Zigbee2MQTT",
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.7.0": {
|
|
7
|
+
"en": "added support for wildcard actions (eg. *_single) ([#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116))\nadded error handling optimizations ([more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679))\nadded option `auth_token` for websocket connection ([#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112))\nwebsocket timeout increased",
|
|
8
|
+
"de": "unterstützung für Wildcard-Aktionen (z.B. *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\nfehlerbehandlungsoptimierungen [mehr](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nzusatzoption auth_token für Websocket-Verbindung [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\nwebsocket timeout erhöht",
|
|
9
|
+
"ru": "добавлена поддержка действий дикой карты (например *_один) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\nдобавлены оптимизации обработки ошибок [more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nдобавлена опция auth_token для подключения к сети [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\ntimeout websocket увеличился",
|
|
10
|
+
"pt": "apoio adicional para ações curingas (por exemplo: *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\notimizações adicionais de manuseio de erros [mais](https://github.com/ioBroker/ioBroker.repositories/pull/1976#comment-1382038679)\nadicionado opção auth_token para conexão websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\ntimeout do websocket aumentou",
|
|
11
|
+
"nl": "voegde ondersteuning toe voor wilde kaarten\nerror toegevoegd aan het omgaan met optimisaties / 1976 #isscombentub.comioBroker /ioBroker / iProker / 1976 3896 389\nvoegde optie toegevoegd voor websocket connectie [Ghtub.com/oshoo/ioBroker\nwebsocket time-out verhoogd",
|
|
12
|
+
"fr": "ajout d ' un appui aux actions de wildcard (par exemple *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\noptimisation de la gestion des erreurs [plus](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\noption ajoutée auth_token for websocket connection [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\nwebsocket timeout augmenté",
|
|
13
|
+
"it": "[#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\n[continua](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nopzione aggiunta auth_token per collegamento websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\nwebsocket timeout aumentato",
|
|
14
|
+
"es": "[#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\n[más](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nañadida la opción auth_token para la conexión websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\ntiempo de websocket aumentó",
|
|
15
|
+
"pl": "dodano wsparcie dla działań na rzecz dzikich kart (eg. *_single) #116(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\ndodano optymalizację błędów (https:/github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nauth_token for websocket connection #112(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\nczas dostępu do stron internetowych wzrastał",
|
|
16
|
+
"uk": "додана підтримка дій дикої картки (наприклад, *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\nдодано оптимізацію обробки помилок [більше](https://github.com/ioBroker/ioBroker.repositories/pull/1976#productcomment-1382038679)\nдодано опцію auth_token для підключення websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\nwebsocket час",
|
|
17
|
+
"zh-cn": "对野生卡行动(第 *_single)[第116](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/116))的支持\n新增的错误处理优化[(http://github.com/ioBroker/ioBroker.reories/pull/1976#issuement-1382038679)\n添加以下选择:网站联系(第112号)(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/112)\n网页"
|
|
18
|
+
},
|
|
19
|
+
"2.6.0": {
|
|
20
|
+
"en": "added state `transition` for transition overwrite (-1 disabled overwrite) ([#101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101))\nconsideration of the description when creating the friendly name ([#105](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/105))\nadded state `effect` for groups ([#101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101))\nfix state contact\nadded handling for disabled devices",
|
|
21
|
+
"de": "hinzugefügter Zustandsübergang für Übergangsüberschreiben -(1 behinderte Überschreiben) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nberücksichtigung der Beschreibung bei der Erstellung des freundlichen Namens #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/105)\nzusätzliche staatliche Wirkung für Gruppen #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\nkontakt mit dem status\nzusätzliches handling für behinderte",
|
|
22
|
+
"ru": "добавлен государственный переход для перехода переписать -(1 отключен перезапись) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nрассмотрение описания при создании дружественного имени #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/105)\nдобавлен государственный эффект для групп #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nисправить государственный контакт\nдобавлена обработка для инвалидов",
|
|
23
|
+
"pt": "adicionado transição de estado para a transição sobreescrita -(1 sobreescrita desativada) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nconsideração da descrição ao criar o nome amigável #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/105)\nadicionado efeito estatal para grupos #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\ncorrigir contato estado\nmanuseio adicionado para dispositivos com deficiência",
|
|
24
|
+
"nl": "voegde staatsoverschrijving toe voor overschrijving overschrijving - (1 gehandicapte overschrijving) (1) (1 gehandicapte overschrijving)\noverweeg de beschrijving als het creëren van de vriendelijke naam £10:\nvoegde toegevoegd staats effect voor groepen £101, httub.com/oshojoo/ioBroker\nvertaling:\nvoegde toegevoegd voor gehandicapte apparaten",
|
|
25
|
+
"fr": "transition de l ' État pour la surécriture de transition -(1 surécriture désactivée) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\nexamen de la description lors de la création du nom amical #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/105)\neffet d ' État ajouté pour les groupes #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\ncontact étatique\nmanipulation supplémentaire pour les dispositifs handicapés",
|
|
26
|
+
"it": "aggiunto passaggio di stato per overwrite di transizione -(1 overwrite disabilitato) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\nconsiderazione della descrizione quando si crea il nome amichevole #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/105)\neffetto stato aggiunto per gruppi #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\nfix contatto stato\nmanipolazione aggiuntiva per dispositivi disabili",
|
|
27
|
+
"es": "añadida transición estatal para la sobreescritura de transición -(1 invalidez sobreescritura) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nexamen de la descripción al crear el nombre amistoso #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/105)\nañadido efecto estatal para los grupos #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\narreglar contacto estado\nmanejo añadido para dispositivos discapacitados",
|
|
28
|
+
"pl": "dodano przejście stanowe na przepisanie -(1 disabled overwrite) #101(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nrezultatem tego opisu było stworzenie przyjaznej nazwy #105 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/105)\ndodano efekt stanowy dla grup #101 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nkontakt państwowy\nobsługa urządzeń dla osób niepełnosprawnych",
|
|
29
|
+
"uk": "додано державний перехід для переходу перезапису -(1 вимкнено перезапис) #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nрозгляд опису при створенні дружньої назви #[105](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/products/105)\nдодано державний ефект для груп #[101](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/101)\nфіксувати державний контакт\nдодана обробка для пристроїв відключення",
|
|
30
|
+
"zh-cn": "此外,国家向过渡过渡的过渡——《残疾》第[101]号(http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/101)\n在建立友好名称编号(http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/105)时,审议说明\n第[101]号(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/101)\nfix 国家联络点\nd. 增加处理残疾装置"
|
|
31
|
+
},
|
|
6
32
|
"2.5.0": {
|
|
7
33
|
"en": "added option `Brightness step should also turn the light on or off`\nadded handling of `brightness_step` ([#96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96))\nstates processing more flexible designed ([#94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94))",
|
|
8
34
|
"de": "zusätzliche Option `Brightness Schritt sollte auch das Licht ein- oder ausschalten `\nzusätzliches Handling der Helligkeit_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\nzustände, die flexibler gestaltet sind #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/94)",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "(Prawdziwa obsługa ruchu_to_saturation, hue_move and brightness_move_to_level #68(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68)\nustanowić się, gdy przyjaźnić nazwisko/'. zawierać",
|
|
68
94
|
"uk": "додано правильну обробку рухом_to_saturation, hue_move_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68)\nфіксація при дружній_ім`я `/` в наявності",
|
|
69
95
|
"zh-cn": "进一步正确地处理搬迁问题:流向、障碍和光明_move_to_级[#68](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/68)\nfix 友好时的名称:“/” 内载"
|
|
70
|
-
},
|
|
71
|
-
"2.4.1": {
|
|
72
|
-
"en": "fix based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
|
|
73
|
-
"de": "(https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
|
|
74
|
-
"ru": "исправить на [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
|
|
75
|
-
"pt": "correção com base em [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#comment-1316656378)",
|
|
76
|
-
"nl": "quality over Quantity Releases Vertaling:",
|
|
77
|
-
"fr": "fix based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
|
|
78
|
-
"it": "fix based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
|
|
79
|
-
"es": "fijado basado en [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
|
|
80
|
-
"pl": "recenzent oparty na przeglądzie (https:/github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656363636378)",
|
|
81
|
-
"uk": "javaScript licenses API Веб-сайт Go1.13.8",
|
|
82
|
-
"zh-cn": "fix 基于[审查](http://github.com/ioBroker/ioBroker.reories/pull/1976#issuement-1316656378)"
|
|
83
|
-
},
|
|
84
|
-
"2.4.0": {
|
|
85
|
-
"en": "fix for devices with multiple endpoints ([#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/57)).\nadded option `Brightness move should also turn the light on or off`\nadded state toggle for groups \nmore dynamic during data point creation ([#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/48)).",
|
|
86
|
-
"de": "fix für Geräte mit mehreren Endpunkten [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/57).\nzusätzliche Option `Brightness move sollte auch das Licht ein- oder ausschalten `\nzusatzzustandswinkel für gruppen\nmehr Dynamik bei der Erstellung von Datenpunkten [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/48).",
|
|
87
|
-
"ru": "исправить для устройств с несколькими точками [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/57).\nдобавленная опция `Перемещение яркости должно также повернуть свет на или вне`\nдобавлена государственная очка для групп\nболее динамично во время создания данных [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/48).",
|
|
88
|
-
"pt": "correção para dispositivos com múltiplos endpoints [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/57).\nopção adicionada `Brightness move também deve ligar ou desligar a luz`\nadicionado conjunto de estado para grupos\nmais dinâmico durante a criação do ponto de dados [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/48).",
|
|
89
|
-
"nl": "vertaling:.\nvoegde optie 'Brightness zet ook het licht aan of uit'\nvertaling:\ndynamischer tijdens datapunt 48: github.com/oshojoo/ioBroker.",
|
|
90
|
-
"fr": "correction des dispositifs comportant plusieurs paramètres [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/57).\noption ajoutée `Brightness move should also turn the light on or off`\nla lutte de l'état pour les groupes\nplus dynamique lors de la création de points de données [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/48).",
|
|
91
|
-
"it": "fix per dispositivi con più endpoint [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/57).\nopzione aggiunta `Brightness movimento dovrebbe anche accendere o spegnere la luce `\ntoggle di stato aggiunto per gruppi\npiù dinamica durante la creazione di data point [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/48).",
|
|
92
|
-
"es": "fix for devices with multiple endpoints [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/57).\nopción agregada `El movimiento de la rectitud también debe encender o apagar la luz &apos\nañadido a la lucha estatal para grupos\nmás dinámica durante la creación de puntos de datos [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/48).",
|
|
93
|
-
"pl": "urządzenia z wieloma punktami końcowymi (#57(https:/github.com/o0shojo0/ioBroker.zigbee2mqtt/issues/57).\ndodano również możliwość wykonania ruchu `Brightness'\ndodać stan dla grup\ndynamiczny w czasie tworzenia danych (#48)(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/48).",
|
|
94
|
-
"uk": "виправлення для пристроїв з декількома кінцевими точками [#57](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/57).\nдоданий варіант `Брайтний рух також повинен перетворювати світло або вимкнути`\nдодано державний контроль за групами\nбільш динамічний при створенні точки даних [#48](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/48).",
|
|
95
|
-
"zh-cn": "fix 有多个最终用户的装置[第57号](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/57).\n增加“权利流动”的选择,也应该改变“或”以外的照明。\n加入集团的州\n在数据点创建期间,增加活力[第48](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/48)."
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"readme": "https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/blob/main/README.md",
|
|
142
142
|
"loglevel": "info",
|
|
143
143
|
"mode": "daemon",
|
|
144
|
-
"type": "
|
|
144
|
+
"type": "hardware",
|
|
145
145
|
"compact": true,
|
|
146
146
|
"connectionType": "local",
|
|
147
147
|
"dataSource": "push",
|
|
@@ -184,6 +184,8 @@
|
|
|
184
184
|
"connectionType": "ws",
|
|
185
185
|
"wsServerIP": "",
|
|
186
186
|
"wsServerPort": 8080,
|
|
187
|
+
"wsTokenEnabled": false,
|
|
188
|
+
"wsToken": "",
|
|
187
189
|
"dummyMqtt": false,
|
|
188
190
|
"externalMqttServerIP": "",
|
|
189
191
|
"externalMqttServerPort": 1883,
|
package/lib/deviceController.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const states = require('./states').states;
|
|
2
|
-
const
|
|
2
|
+
const createDeviceFromExposes = require('./exposes').createDeviceFromExposes;
|
|
3
3
|
const utils = require('./utils');
|
|
4
4
|
const colors = require('./colors.js');
|
|
5
5
|
const rgb = require('./rgb.js');
|
|
@@ -15,23 +15,21 @@ class DeviceController {
|
|
|
15
15
|
this.createCache = createCache;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
async createDeviceDefinitions(
|
|
18
|
+
async createDeviceDefinitions(devicesMessage) {
|
|
19
19
|
utils.clearArray(this.deviceCache);
|
|
20
|
-
for (const
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
scenes = scenes.concat(expose.endpoints[key].scenes);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (this.logCustomizations.debugDevices.includes(expose.ieee_address)) {
|
|
30
|
-
this.adapter.log.warn(`--->>> fromZ2M -> ${expose.ieee_address} exposes: ${JSON.stringify(expose)}`);
|
|
31
|
-
}
|
|
20
|
+
for (const devicesMessag of devicesMessage) {
|
|
21
|
+
if (this.logCustomizations.debugDevices.includes(devicesMessag.ieee_address)) {
|
|
22
|
+
this.adapter.log.warn(`--->>> fromZ2M -> ${devicesMessag.ieee_address} exposes: ${JSON.stringify(devicesMessag)}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (devicesMessag.definition != null) {
|
|
32
26
|
// if the device is already present in the cache, remove it
|
|
33
|
-
this.removeDeviceByIeee(this.deviceCache,
|
|
34
|
-
|
|
27
|
+
this.removeDeviceByIeee(this.deviceCache, devicesMessag.ieee_address);
|
|
28
|
+
|
|
29
|
+
if (devicesMessag.definition.exposes) {
|
|
30
|
+
const newDevice = createDeviceFromExposes(devicesMessag, this.config);
|
|
31
|
+
this.deviceCache.push(newDevice);
|
|
32
|
+
}
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
}
|
|
@@ -44,10 +42,25 @@ class DeviceController {
|
|
|
44
42
|
id: groupID,
|
|
45
43
|
ieee_address: ieee_address,
|
|
46
44
|
icon: undefined,
|
|
45
|
+
optionsValues: {},
|
|
47
46
|
states: [
|
|
48
|
-
states.state,
|
|
49
47
|
states.brightness,
|
|
50
48
|
states.colortemp_move,
|
|
49
|
+
states.transition,
|
|
50
|
+
{
|
|
51
|
+
id: 'state',
|
|
52
|
+
prob: 'state',
|
|
53
|
+
name: 'Switch state',
|
|
54
|
+
options: ['transition'],
|
|
55
|
+
icon: undefined,
|
|
56
|
+
role: 'switch',
|
|
57
|
+
write: true,
|
|
58
|
+
read: true,
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
def: false,
|
|
61
|
+
getter: payload => (payload.state === 'ON'),
|
|
62
|
+
setter: (value) => (value) ? 'ON' : 'OFF',
|
|
63
|
+
},
|
|
51
64
|
{
|
|
52
65
|
id: 'brightness_move',
|
|
53
66
|
prop: brmPropName,
|
|
@@ -61,7 +74,6 @@ class DeviceController {
|
|
|
61
74
|
max: 50,
|
|
62
75
|
def: 0
|
|
63
76
|
},
|
|
64
|
-
|
|
65
77
|
{
|
|
66
78
|
id: 'brightness_step',
|
|
67
79
|
prop: brsPropName,
|
|
@@ -79,6 +91,7 @@ class DeviceController {
|
|
|
79
91
|
id: 'color',
|
|
80
92
|
prop: 'color',
|
|
81
93
|
name: 'Color',
|
|
94
|
+
options: ['transition'],
|
|
82
95
|
icon: undefined,
|
|
83
96
|
role: 'level.color.rgb',
|
|
84
97
|
write: true,
|
|
@@ -110,6 +123,7 @@ class DeviceController {
|
|
|
110
123
|
id: 'colortemp',
|
|
111
124
|
prop: 'color_temp',
|
|
112
125
|
name: 'Color temperature',
|
|
126
|
+
options: ['transition'],
|
|
113
127
|
icon: undefined,
|
|
114
128
|
role: 'level.color.temperature',
|
|
115
129
|
write: true,
|
|
@@ -136,6 +150,7 @@ class DeviceController {
|
|
|
136
150
|
{
|
|
137
151
|
id: 'state_toggle',
|
|
138
152
|
name: 'Toggle the state',
|
|
153
|
+
options: ['transition'],
|
|
139
154
|
icon: undefined,
|
|
140
155
|
role: 'button',
|
|
141
156
|
write: true,
|
|
@@ -144,7 +159,19 @@ class DeviceController {
|
|
|
144
159
|
setattr: 'state',
|
|
145
160
|
def: true,
|
|
146
161
|
setter: (value) => (value) ? 'TOGGLE' : undefined
|
|
147
|
-
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 'effect',
|
|
165
|
+
name: 'Triggers an effect on the light (e.g. make light blink for a few seconds)',
|
|
166
|
+
prop: 'effect',
|
|
167
|
+
icon: undefined,
|
|
168
|
+
role: 'state',
|
|
169
|
+
write: true,
|
|
170
|
+
read: true,
|
|
171
|
+
type: 'string',
|
|
172
|
+
def: '',
|
|
173
|
+
states: { blink: 'blink', breathe: 'breathe', okay: 'okay', channel_change: 'channel_change', finish_effect: 'finish_effect', stop_effect: 'stop_effect' }
|
|
174
|
+
},
|
|
148
175
|
],
|
|
149
176
|
};
|
|
150
177
|
|
|
@@ -180,7 +207,17 @@ class DeviceController {
|
|
|
180
207
|
|
|
181
208
|
async createOrUpdateDevices() {
|
|
182
209
|
for (const device of this.groupCache.concat(this.deviceCache)) {
|
|
183
|
-
|
|
210
|
+
let deviceName = device.id == device.ieee_address ? '' : device.id;
|
|
211
|
+
|
|
212
|
+
if (deviceName == '' && device.description) {
|
|
213
|
+
deviceName = device.description;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Manipulate deviceName if the device is disabled, so the update of the device is triggered as well
|
|
217
|
+
if (device.disabled && device.disabled == true) {
|
|
218
|
+
deviceName = `[Disabled] ${deviceName}`;
|
|
219
|
+
}
|
|
220
|
+
|
|
184
221
|
if (!this.createCache[device.ieee_address] || this.createCache[device.ieee_address].name != deviceName) {
|
|
185
222
|
const deviceObj = {
|
|
186
223
|
type: 'device',
|
|
@@ -191,11 +228,17 @@ class DeviceController {
|
|
|
191
228
|
native: {}
|
|
192
229
|
};
|
|
193
230
|
|
|
194
|
-
if
|
|
231
|
+
// Only the onlineId is set if the device is not disabled and is not a group
|
|
232
|
+
if (!device.ieee_address.includes('group_') && (!device.disabled || device.disabled == false)) {
|
|
195
233
|
deviceObj.common.statusStates = {
|
|
196
234
|
onlineId: `${this.adapter.name}.${this.adapter.instance}.${device.ieee_address}.available`
|
|
197
235
|
};
|
|
198
236
|
}
|
|
237
|
+
else {
|
|
238
|
+
deviceObj.common.statusStates = {
|
|
239
|
+
onlineId: ''
|
|
240
|
+
};
|
|
241
|
+
}
|
|
199
242
|
|
|
200
243
|
//@ts-ignore
|
|
201
244
|
await this.adapter.extendObjectAsync(device.ieee_address, deviceObj);
|
|
@@ -266,6 +309,7 @@ class DeviceController {
|
|
|
266
309
|
async copyAndCleanStateObj(state) {
|
|
267
310
|
const iobState = { ...state };
|
|
268
311
|
const blacklistedKeys = [
|
|
312
|
+
'prop',
|
|
269
313
|
'setter',
|
|
270
314
|
'setterOpt',
|
|
271
315
|
'getter',
|
|
@@ -275,6 +319,7 @@ class DeviceController {
|
|
|
275
319
|
'isOption',
|
|
276
320
|
'inOptions',
|
|
277
321
|
'isEvent',
|
|
322
|
+
'options',
|
|
278
323
|
];
|
|
279
324
|
for (const blacklistedKey of blacklistedKeys) {
|
|
280
325
|
delete iobState[blacklistedKey];
|
package/lib/exposes.js
CHANGED
|
@@ -164,8 +164,16 @@ function genState(expose, role, name, desc) {
|
|
|
164
164
|
return state;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
function
|
|
167
|
+
function createDeviceFromExposes(devicesMessag, config) {
|
|
168
168
|
const states = [];
|
|
169
|
+
let scenes = [];
|
|
170
|
+
const deviceID = devicesMessag.friendly_name;
|
|
171
|
+
const ieee_address = devicesMessag.ieee_address;
|
|
172
|
+
const definition = devicesMessag.definition;
|
|
173
|
+
const power_source = devicesMessag.power_source;
|
|
174
|
+
const disabled = devicesMessag.disabled && devicesMessag.disabled == true;
|
|
175
|
+
const description = devicesMessag.description ? devicesMessag.description : undefined;
|
|
176
|
+
|
|
169
177
|
function pushToStates(state, access) {
|
|
170
178
|
if (state === undefined) {
|
|
171
179
|
return 0;
|
|
@@ -278,7 +286,14 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
278
286
|
}
|
|
279
287
|
}
|
|
280
288
|
|
|
281
|
-
for
|
|
289
|
+
// search for scenes in the endpoints and build them into an array
|
|
290
|
+
for (const key in devicesMessag.endpoints) {
|
|
291
|
+
if (devicesMessag.endpoints[key].scenes) {
|
|
292
|
+
scenes = scenes.concat(devicesMessag.endpoints[key].scenes);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
for (const expose of definition.exposes) {
|
|
282
297
|
let state;
|
|
283
298
|
|
|
284
299
|
switch (expose.type) {
|
|
@@ -290,6 +305,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
290
305
|
pushToStates({
|
|
291
306
|
id: stateName,
|
|
292
307
|
name: `Switch state ${expose.endpoint ? expose.endpoint : ''}`.trim(),
|
|
308
|
+
options: ['transition'],
|
|
293
309
|
icon: undefined,
|
|
294
310
|
role: 'switch',
|
|
295
311
|
write: true,
|
|
@@ -306,6 +322,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
306
322
|
id: `${stateName}_toggle`,
|
|
307
323
|
prop: `${stateName}_toggle`,
|
|
308
324
|
name: `Toggle state of the ${stateName}`,
|
|
325
|
+
options: ['transition'],
|
|
309
326
|
icon: undefined,
|
|
310
327
|
role: 'button',
|
|
311
328
|
write: true,
|
|
@@ -323,6 +340,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
323
340
|
pushToStates({
|
|
324
341
|
id: stateName,
|
|
325
342
|
name: `Brightness ${expose.endpoint ? expose.endpoint : ''}`.trim(),
|
|
343
|
+
options: ['transition'],
|
|
326
344
|
icon: undefined,
|
|
327
345
|
role: 'level.dimmer',
|
|
328
346
|
write: true,
|
|
@@ -331,7 +349,6 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
331
349
|
min: 0, // ignore expose.value_min
|
|
332
350
|
max: 100, // ignore expose.value_max
|
|
333
351
|
def: 100,
|
|
334
|
-
inOptions: true,
|
|
335
352
|
unit: '%',
|
|
336
353
|
getter: (value) => {
|
|
337
354
|
return utils.bulbLevelToAdapterLevel(value[stateName]);
|
|
@@ -361,6 +378,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
361
378
|
id: `${stateName}_step`,
|
|
362
379
|
prop: brspropName,
|
|
363
380
|
name: 'Increases or decreases brightness by X steps',
|
|
381
|
+
options: ['transition'],
|
|
364
382
|
icon: undefined,
|
|
365
383
|
role: 'state',
|
|
366
384
|
write: true,
|
|
@@ -380,6 +398,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
380
398
|
id: stateName,
|
|
381
399
|
prop: propName,
|
|
382
400
|
name: `Color temperature ${expose.endpoint ? expose.endpoint : ''}`.trim(),
|
|
401
|
+
options: ['transition'],
|
|
383
402
|
icon: undefined,
|
|
384
403
|
role: 'level.color.temperature',
|
|
385
404
|
write: true,
|
|
@@ -425,6 +444,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
425
444
|
pushToStates({
|
|
426
445
|
id: stateName,
|
|
427
446
|
name: `Color ${expose.endpoint ? expose.endpoint : ''}`.trim(),
|
|
447
|
+
options: ['transition'],
|
|
428
448
|
icon: undefined,
|
|
429
449
|
role: 'level.color.rgb',
|
|
430
450
|
write: true,
|
|
@@ -464,6 +484,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
464
484
|
pushToStates({
|
|
465
485
|
id: stateName,
|
|
466
486
|
name: `Color ${expose.endpoint ? expose.endpoint : ''}`.trim(),
|
|
487
|
+
options: ['transition'],
|
|
467
488
|
icon: undefined,
|
|
468
489
|
role: 'level.color.rgb',
|
|
469
490
|
write: true,
|
|
@@ -504,8 +525,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
504
525
|
break;
|
|
505
526
|
}
|
|
506
527
|
}
|
|
507
|
-
|
|
508
|
-
//pushToStates(statesDefs.transition_time, 2);
|
|
528
|
+
pushToStates(statesDefs.transition, z2mAccess.SET);
|
|
509
529
|
break;
|
|
510
530
|
|
|
511
531
|
case 'switch':
|
|
@@ -612,6 +632,30 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
612
632
|
break;
|
|
613
633
|
}
|
|
614
634
|
|
|
635
|
+
// Support for DIYRuZ Device
|
|
636
|
+
const wildcardValues = expose.values.filter(x => x.startsWith('*'));
|
|
637
|
+
if (wildcardValues && wildcardValues.length > 0) {
|
|
638
|
+
for (const endpointName of [...new Set(definition.exposes.filter(x => x.endpoint).map(x => x.endpoint))]) {
|
|
639
|
+
for (const value of wildcardValues) {
|
|
640
|
+
const actionName = value.replace('*', endpointName);
|
|
641
|
+
pushToStates({
|
|
642
|
+
id: actionName,
|
|
643
|
+
prop: 'action',
|
|
644
|
+
name: `Triggered action ${value.replace('*_', endpointName)}`,
|
|
645
|
+
icon: undefined,
|
|
646
|
+
role: 'button',
|
|
647
|
+
write: false,
|
|
648
|
+
read: true,
|
|
649
|
+
type: 'boolean',
|
|
650
|
+
def: false,
|
|
651
|
+
isEvent: true,
|
|
652
|
+
getter: payload => (payload.action === actionName) ? true : undefined,
|
|
653
|
+
}, expose.access);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
break;
|
|
657
|
+
}
|
|
658
|
+
|
|
615
659
|
const hasHold = expose.values.find((actionName) => actionName.includes('hold'));
|
|
616
660
|
const hasRelease = expose.values.find((actionName) => actionName.includes('release'));
|
|
617
661
|
|
|
@@ -802,7 +846,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
802
846
|
}
|
|
803
847
|
}
|
|
804
848
|
// Can the device simulated_brightness?
|
|
805
|
-
if (
|
|
849
|
+
if (definition.options && definition.options.find(x => x.property == 'simulated_brightness')) {
|
|
806
850
|
pushToStates(statesDefs.simulated_brightness, z2mAccess.STATE);
|
|
807
851
|
}
|
|
808
852
|
state = null;
|
|
@@ -964,7 +1008,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
964
1008
|
|
|
965
1009
|
// If necessary, add states defined for this device model.
|
|
966
1010
|
// Unfortunately this is necessary for some device models because they do not adhere to the standard
|
|
967
|
-
for (const state of getNonGenDevStatesDefs(
|
|
1011
|
+
for (const state of getNonGenDevStatesDefs(definition.model)) {
|
|
968
1012
|
pushToStates(state, state.write ? z2mAccess.SET : z2mAccess.STATE);
|
|
969
1013
|
}
|
|
970
1014
|
|
|
@@ -991,19 +1035,16 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
|
|
|
991
1035
|
id: deviceID,
|
|
992
1036
|
ieee_address: ieee_address,
|
|
993
1037
|
power_source: power_source,
|
|
1038
|
+
disabled: disabled,
|
|
1039
|
+
description: description,
|
|
1040
|
+
optionsValues: {},
|
|
994
1041
|
states: states,
|
|
995
1042
|
};
|
|
996
1043
|
|
|
997
1044
|
return newDevice;
|
|
998
1045
|
}
|
|
999
1046
|
|
|
1000
|
-
function defineDeviceFromExposes(devices, deviceID, ieee_address, definitions, power_source, scenes, config) {
|
|
1001
|
-
if (definitions.hasOwnProperty('exposes')) {
|
|
1002
|
-
const newDevice = createFromExposes(deviceID, ieee_address, definitions, power_source, scenes, config);
|
|
1003
|
-
devices.push(newDevice);
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
1047
|
|
|
1007
1048
|
module.exports = {
|
|
1008
|
-
|
|
1049
|
+
createDeviceFromExposes: createDeviceFromExposes,
|
|
1009
1050
|
};
|
package/lib/messages.js
CHANGED
|
@@ -7,6 +7,7 @@ async function adapterInfo(config, log) {
|
|
|
7
7
|
if (config.connectionType == 'ws') {
|
|
8
8
|
log.info(`|| Zigbee2MQTT Websocket Server: ${config.wsServerIP}`);
|
|
9
9
|
log.info(`|| Zigbee2MQTT Websocket Port: ${config.wsServerPort}`);
|
|
10
|
+
log.info(`|| Zigbee2MQTT Websocket Auth-Token: ${config.wsTokenEnabled ? 'use' : 'unused'}`);
|
|
10
11
|
log.info(`|| Zigbee2MQTT Websocket Dummy MQTT-Server: ${config.dummyMqtt ? 'activated' : 'deactivated'}`);
|
|
11
12
|
if (config.dummyMqtt == true) {
|
|
12
13
|
log.info(`|| Zigbee2MQTT Dummy MQTT IP-Bind: ${config.mqttServerIPBind}`);
|
package/lib/states.js
CHANGED
|
@@ -144,6 +144,7 @@ const states = {
|
|
|
144
144
|
brightness: {
|
|
145
145
|
id: 'brightness',
|
|
146
146
|
name: 'Brightness',
|
|
147
|
+
options: ['transition'],
|
|
147
148
|
icon: undefined,
|
|
148
149
|
role: 'level.dimmer',
|
|
149
150
|
write: true,
|
|
@@ -189,6 +190,22 @@ const states = {
|
|
|
189
190
|
def: 0
|
|
190
191
|
},
|
|
191
192
|
|
|
193
|
+
transition: {
|
|
194
|
+
id: 'transition',
|
|
195
|
+
prop: 'transition',
|
|
196
|
+
name: 'Transition time overwrite (-1 disabled)',
|
|
197
|
+
icon: undefined,
|
|
198
|
+
role: 'state',
|
|
199
|
+
write: true,
|
|
200
|
+
read: false,
|
|
201
|
+
type: 'number',
|
|
202
|
+
unit: 'sec',
|
|
203
|
+
min: -1,
|
|
204
|
+
max: 65535,
|
|
205
|
+
def: -1,
|
|
206
|
+
isOption: true
|
|
207
|
+
},
|
|
208
|
+
|
|
192
209
|
//#################################################################
|
|
193
210
|
device_query: { // button to trigger device read
|
|
194
211
|
id: 'device_query',
|
|
@@ -781,6 +798,7 @@ const states = {
|
|
|
781
798
|
},
|
|
782
799
|
contact: {
|
|
783
800
|
id: 'contact',
|
|
801
|
+
prop: 'contact',
|
|
784
802
|
name: 'Contact event',
|
|
785
803
|
icon: undefined,
|
|
786
804
|
role: 'state',
|
|
@@ -1327,17 +1345,6 @@ const states = {
|
|
|
1327
1345
|
}
|
|
1328
1346
|
},
|
|
1329
1347
|
},
|
|
1330
|
-
transition_time: {
|
|
1331
|
-
id: 'transition_time',
|
|
1332
|
-
name: 'Transition time',
|
|
1333
|
-
icon: undefined,
|
|
1334
|
-
role: 'state',
|
|
1335
|
-
write: true,
|
|
1336
|
-
read: false,
|
|
1337
|
-
type: 'number',
|
|
1338
|
-
unit: 'sec',
|
|
1339
|
-
isOption: true,
|
|
1340
|
-
},
|
|
1341
1348
|
operation_mode: {
|
|
1342
1349
|
id: 'decoupled',
|
|
1343
1350
|
prop: 'operation_mode',
|
|
@@ -13,7 +13,13 @@ class WebsocketController {
|
|
|
13
13
|
|
|
14
14
|
initWsClient() {
|
|
15
15
|
try {
|
|
16
|
-
|
|
16
|
+
let wsURL = `ws://${this.adapter.config.wsServerIP}:${this.adapter.config.wsServerPort}/api`;
|
|
17
|
+
|
|
18
|
+
if (this.adapter.config.wsTokenEnabled == true) {
|
|
19
|
+
wsURL += `?token=${this.adapter.config.wsToken}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
wsClient = new WebSocket(wsURL);
|
|
17
23
|
|
|
18
24
|
wsClient.on('open', () => {
|
|
19
25
|
// Send ping to server
|
|
@@ -66,7 +72,7 @@ class WebsocketController {
|
|
|
66
72
|
pingTimeout = setTimeout(() => {
|
|
67
73
|
this.adapter.log.warn('Websocked connection timed out');
|
|
68
74
|
wsClient.terminate();
|
|
69
|
-
}, wsHeartbeatIntervall +
|
|
75
|
+
}, wsHeartbeatIntervall + 3000);
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
async autoRestart() {
|
package/lib/z2mController.js
CHANGED
|
@@ -40,23 +40,53 @@ class Z2mController {
|
|
|
40
40
|
stateID = deviceState.setattr;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
43
|
const controlObj = {
|
|
45
44
|
payload: {
|
|
46
|
-
[stateID]: stateVal
|
|
45
|
+
[stateID]: stateVal,
|
|
47
46
|
},
|
|
48
47
|
topic: `${device.id}/set`
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
//
|
|
52
|
-
if (
|
|
50
|
+
// if available read option and set payload
|
|
51
|
+
if (deviceState.options) {
|
|
52
|
+
for (const option of deviceState.options) {
|
|
53
|
+
// if optionsValues not set, set it!
|
|
54
|
+
if (!device.optionsValues[option]) {
|
|
55
|
+
const optionValue = (await this.adapter.getStateAsync(`${splitedID[0]}.${splitedID[1]}.${splitedID[2]}.${option}`)).val;
|
|
56
|
+
// optionsValues Cache
|
|
57
|
+
device.optionsValues[option] = optionValue;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// if transition value == -1 it will be ignored. -1 stands for no overwrite!
|
|
61
|
+
if (option == 'transition' && device.optionsValues[option] == -1) {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
controlObj.payload[option] = device.optionsValues[option];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// If an option datapoint has been set, it does not have to be sent.
|
|
70
|
+
// This is confirmed directly by the adapter (ack = true)
|
|
71
|
+
if (deviceState.isOption && deviceState.isOption == true) {
|
|
72
|
+
// set optionsValues 'Cache'
|
|
73
|
+
device.optionsValues[stateName] = state.val;
|
|
74
|
+
this.adapter.setState(id, state, true);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// set stats with the mentioned roles or always immediately to ack = true, because these are not reported back by Zigbee2MQTT
|
|
79
|
+
if (['button'].includes(deviceState.role)) {
|
|
80
|
+
this.adapter.setState(id, state, true);
|
|
81
|
+
}
|
|
82
|
+
// set stats with the mentioned ids always immediately to ack = true, because these are not reported back by Zigbee2MQTT
|
|
83
|
+
if (['brightness_move', 'colortemp_move', 'brightness_move', 'brightness_step', 'effect'].includes(deviceState.id)) {
|
|
53
84
|
this.adapter.setState(id, state, true);
|
|
54
85
|
}
|
|
55
86
|
|
|
56
87
|
if (this.logCustomizations.debugDevices.includes(device.ieee_address)) {
|
|
57
88
|
this.adapter.log.warn(`<<<--- toZ2M -> ${device.ieee_address} states: ${JSON.stringify(controlObj)}`);
|
|
58
89
|
}
|
|
59
|
-
|
|
60
90
|
return controlObj;
|
|
61
91
|
}
|
|
62
92
|
|
|
@@ -80,6 +110,7 @@ class Z2mController {
|
|
|
80
110
|
}
|
|
81
111
|
}
|
|
82
112
|
|
|
113
|
+
|
|
83
114
|
module.exports = {
|
|
84
115
|
Z2mController: Z2mController
|
|
85
116
|
};
|
package/main.js
CHANGED
|
@@ -128,7 +128,6 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
128
128
|
wsClient.on('close', async () => {
|
|
129
129
|
this.setStateChanged('info.connection', false, true);
|
|
130
130
|
await statesController.setAllAvailableToFalse();
|
|
131
|
-
this.log.warn('Websocket disconnected');
|
|
132
131
|
});
|
|
133
132
|
}
|
|
134
133
|
|
|
@@ -169,6 +168,8 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
169
168
|
case 'bridge/response/device/remove':
|
|
170
169
|
deviceController.processRemoveEvent(messageObj);
|
|
171
170
|
break;
|
|
171
|
+
case 'bridge/response/device/options':
|
|
172
|
+
break;
|
|
172
173
|
case 'bridge/extensions':
|
|
173
174
|
break;
|
|
174
175
|
case 'bridge/logging':
|
|
@@ -222,15 +223,36 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
222
223
|
if (mqttClient && !mqttClient.closed) {
|
|
223
224
|
mqttClient.close();
|
|
224
225
|
}
|
|
225
|
-
mqttServerController.closeServer();
|
|
226
226
|
websocketController.closeConnection();
|
|
227
|
+
} catch (e) {
|
|
228
|
+
this.log.error(e);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
try {
|
|
232
|
+
mqttServerController.closeServer();
|
|
233
|
+
} catch (e) {
|
|
234
|
+
this.log.error(e);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
try {
|
|
227
238
|
await statesController.setAllAvailableToFalse();
|
|
239
|
+
} catch (e) {
|
|
240
|
+
this.log.error(e);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
try {
|
|
228
244
|
await websocketController.allTimerClear();
|
|
245
|
+
} catch (e) {
|
|
246
|
+
this.log.error(e);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
try {
|
|
229
250
|
await statesController.allTimerClear();
|
|
230
|
-
callback();
|
|
231
251
|
} catch (e) {
|
|
232
|
-
|
|
252
|
+
this.log.error(e);
|
|
233
253
|
}
|
|
254
|
+
|
|
255
|
+
callback();
|
|
234
256
|
}
|
|
235
257
|
|
|
236
258
|
async onStateChange(id, state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee2mqtt",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Zigbee2MQTT adapter for ioBroker",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Dennis Rathjen",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"aedes-persistence-nedb": "^2.0.3",
|
|
25
25
|
"mqtt": "^4.3.7",
|
|
26
26
|
"net": "^1.0.2",
|
|
27
|
-
"ws": "^8.
|
|
27
|
+
"ws": "^8.12.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@alcalzone/release-script-plugin-iobroker": "^3.5.9",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"chai": "^4.3.7",
|
|
44
44
|
"chai-as-promised": "^7.1.1",
|
|
45
45
|
"eslint": "^8.31.0",
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
46
|
+
"eslint-config-prettier": "^8.6.0",
|
|
47
47
|
"eslint-plugin-prettier": "^4.2.1",
|
|
48
48
|
"mocha": "^10.2.0",
|
|
49
|
-
"prettier": "^2.8.
|
|
49
|
+
"prettier": "^2.8.3",
|
|
50
50
|
"proxyquire": "^2.1.3",
|
|
51
51
|
"sinon": "^15.0.1",
|
|
52
52
|
"sinon-chai": "^3.7.0",
|