iobroker.zigbee2mqtt 2.7.4 → 2.8.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 +9 -0
- package/admin/jsonConfig.json +17 -1
- package/io-package.json +28 -27
- package/lib/exposes.js +1 -0
- package/lib/messages.js +1 -0
- package/lib/states.js +15 -0
- package/lib/websocketController.js +2 -2
- package/main.js +19 -6
- package/package.json +16 -15
package/README.md
CHANGED
|
@@ -32,6 +32,15 @@ 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.8.0 (2023-07-19)
|
|
36
|
+
|
|
37
|
+
- (o0shojo0o) added WSS support for websoket connection([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191))
|
|
38
|
+
- (o0shojo0o) small fixes
|
|
39
|
+
|
|
40
|
+
### 2.7.5 (2023-04-08)
|
|
41
|
+
|
|
42
|
+
- (o0shojo0o) added state `last_seen` contains date/time of last Zigbee message ([#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131))
|
|
43
|
+
|
|
35
44
|
### 2.7.4 (2023-03-05)
|
|
36
45
|
|
|
37
46
|
- (o0shojo0o) fix for Aqara presence detector FP1 `reset_nopresence_status`
|
package/admin/jsonConfig.json
CHANGED
|
@@ -38,10 +38,26 @@
|
|
|
38
38
|
"text": "Configure your Zigbee2MQTT connection",
|
|
39
39
|
"newLine": true
|
|
40
40
|
},
|
|
41
|
+
"wsScheme": {
|
|
42
|
+
"type": "select",
|
|
43
|
+
"label": "Scheme",
|
|
44
|
+
"options": [
|
|
45
|
+
{
|
|
46
|
+
"label": "WS",
|
|
47
|
+
"value": "ws"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"label": "WSS (SSL)",
|
|
51
|
+
"value": "wss"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"newLine": true,
|
|
55
|
+
"hidden": "data.connectionType != 'ws'"
|
|
56
|
+
},
|
|
41
57
|
"wsServerIP": {
|
|
42
58
|
"type": "text",
|
|
43
59
|
"label": "Websocket IP-Address",
|
|
44
|
-
"newLine":
|
|
60
|
+
"newLine": false,
|
|
45
61
|
"hidden": "data.connectionType != 'ws'"
|
|
46
62
|
},
|
|
47
63
|
"wsServerPort": {
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.8.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.8.0": {
|
|
7
|
+
"en": "added WSS support for websoket connection([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191))\nsmall fixes",
|
|
8
|
+
"de": "wSS-Unterstützung für Websoket-Verbindung([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/191)\nkleine fixierungen",
|
|
9
|
+
"ru": "добавлена поддержка WSS для подключения к websoket([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191)\nнебольшие исправления",
|
|
10
|
+
"pt": "adicionado suporte WSS para conexão websoket([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191)\npequenas correções",
|
|
11
|
+
"nl": "voegde WSS steun toe voor websoket connectie\nkleine fixes",
|
|
12
|
+
"fr": "a ajouté le support WSS pour la connexion websoket([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/191)\npetites corrections",
|
|
13
|
+
"it": "supporto WSS aggiunto per il collegamento websoket([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/191)\npiccole correzioni",
|
|
14
|
+
"es": "añadido WSS support for websoket connection([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191)\npequeños accesorios",
|
|
15
|
+
"pl": "dodano obsługę stron internetowych (#191(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191)\ndrobne rozwiązanie",
|
|
16
|
+
"uk": "javaScript licenses API Веб-сайт Go1.13.8\nмаленькі кріплення",
|
|
17
|
+
"zh-cn": "增加了WSS支助网络联系([第191](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/191)\n小型配件"
|
|
18
|
+
},
|
|
19
|
+
"2.7.5": {
|
|
20
|
+
"en": "added state `last_seen` contains date/time of last Zigbee message ([#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131))",
|
|
21
|
+
"de": "add state last_seen enthält Datum/Zeit der letzten Zigbee-Nachricht [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
|
|
22
|
+
"ru": "добавленное состояние last_seen содержит дату/время последнего сообщения Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
|
|
23
|
+
"pt": "adicionado estado last_seen contém data/hora da última mensagem Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
|
|
24
|
+
"nl": "vertaling:",
|
|
25
|
+
"fr": "add state last_seen contains date/time of last Zigbee message [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
|
|
26
|
+
"it": "aggiunto state last_seen contiene data/ora dell'ultimo messaggio Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
|
|
27
|
+
"es": "añadido state last_seen contiene fecha/hora del último mensaje de Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)",
|
|
28
|
+
"pl": "dodano stan ostatni_seen:/time of last Zigbee message #131(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
|
|
29
|
+
"uk": "додано стан last_seen містить дату/час останнього повідомлення Zigbee [#131](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/131)",
|
|
30
|
+
"zh-cn": "添加国家:见最后Zigbee信息的日期/时间[第131号](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/131)"
|
|
31
|
+
},
|
|
6
32
|
"2.7.4": {
|
|
7
33
|
"en": "fix for Aqara presence detector FP1 `reset_nopresence_status`",
|
|
8
34
|
"de": "fix für Aqara Präsenzmelder FP1 reset_nopresence_status",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"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ł",
|
|
68
94
|
"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 час",
|
|
69
95
|
"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网页"
|
|
70
|
-
},
|
|
71
|
-
"2.6.0": {
|
|
72
|
-
"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",
|
|
73
|
-
"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",
|
|
74
|
-
"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добавлена обработка для инвалидов",
|
|
75
|
-
"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",
|
|
76
|
-
"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",
|
|
77
|
-
"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",
|
|
78
|
-
"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",
|
|
79
|
-
"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",
|
|
80
|
-
"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",
|
|
81
|
-
"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додана обробка для пристроїв відключення",
|
|
82
|
-
"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. 增加处理残疾装置"
|
|
83
|
-
},
|
|
84
|
-
"2.5.0": {
|
|
85
|
-
"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))",
|
|
86
|
-
"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)",
|
|
87
|
-
"ru": "добавленная опция `Яркость шаг должен также повернуть свет на или вне`\nдобавлена обработка brightness_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nсостояния обработки более гибкий дизайн #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
|
|
88
|
-
"pt": "opção adicionada `A etapa de justiça também deve ligar ou desligar a luz`\nmanuseio adicionado de gloss_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nestados processando mais flexível projetado #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
|
|
89
|
-
"nl": "voegde optie 'Brightness step' ook het licht aan of uit'\nvoegde toegevoegd om te gaan met helderheid stegen cijfer 96\nhet verwerkt meer flexibele ontworpen 94: github.com/oshojoo/ioBroker",
|
|
90
|
-
"fr": "option ajoutée `Brightness step should also turn the light on or off`\ngestion de la luminosité_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\ndéclare que le traitement est plus souple, conçu #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/94)",
|
|
91
|
-
"it": "opzione aggiunta `Brightness passo dovrebbe anche accendere o spegnere la luce `\n[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\n(https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/94)",
|
|
92
|
-
"es": "opción agregada `El paso de la rectitud también debe encender o apagar la luz &apos\nadicional handling of brightness_step #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nestados procesan más flexiblemente diseñados #[94](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
|
|
93
|
-
"pl": "dodał również krok opcji 'Brightness'\ndodano obsługę jasności (stop #96) (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\nprzetwarzają bardziej elastyczne przetwory #94 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
|
|
94
|
-
"uk": "доданий варіант `Бритальність кроку також повинен перетворювати світло або вимкнути`\nдодано обробка яскравості_кроку #[96](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/96)\n[94] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/94)",
|
|
95
|
-
"zh-cn": "增加“权利步骤”的选择,也应该改变“或”的提法。\n增加光明处理:第[96]号(http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/96)\n国家处理较为灵活的第[94]号(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/94)"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -183,6 +183,7 @@
|
|
|
183
183
|
},
|
|
184
184
|
"native": {
|
|
185
185
|
"connectionType": "ws",
|
|
186
|
+
"wsScheme": "ws",
|
|
186
187
|
"wsServerIP": "",
|
|
187
188
|
"wsServerPort": 8080,
|
|
188
189
|
"wsTokenEnabled": false,
|
package/lib/exposes.js
CHANGED
|
@@ -1032,6 +1032,7 @@ function createDeviceFromExposes(devicesMessag, config) {
|
|
|
1032
1032
|
|
|
1033
1033
|
// Add default states
|
|
1034
1034
|
pushToStates(statesDefs.available, z2mAccess.STATE);
|
|
1035
|
+
pushToStates(statesDefs.last_seen, z2mAccess.STATE);
|
|
1035
1036
|
|
|
1036
1037
|
// Create buttons for scenes
|
|
1037
1038
|
for (const scene of scenes) {
|
package/lib/messages.js
CHANGED
|
@@ -5,6 +5,7 @@ async function adapterInfo(config, log) {
|
|
|
5
5
|
log.info(`|| Zigbee2MQTT Frontend Port: ${config.webUIPort}`);
|
|
6
6
|
log.info(`|| Zigbee2MQTT Connection Type: ${config.connectionType}`);
|
|
7
7
|
if (config.connectionType == 'ws') {
|
|
8
|
+
log.info(`|| Zigbee2MQTT Websocket Scheme: ${config.wsScheme}`);
|
|
8
9
|
log.info(`|| Zigbee2MQTT Websocket Server: ${config.wsServerIP}`);
|
|
9
10
|
log.info(`|| Zigbee2MQTT Websocket Port: ${config.wsServerPort}`);
|
|
10
11
|
log.info(`|| Zigbee2MQTT Websocket Auth-Token: ${config.wsTokenEnabled ? 'use' : 'unused'}`);
|
package/lib/states.js
CHANGED
|
@@ -87,6 +87,21 @@ const states = {
|
|
|
87
87
|
def: false,
|
|
88
88
|
},
|
|
89
89
|
|
|
90
|
+
last_seen: {
|
|
91
|
+
id: 'last_seen',
|
|
92
|
+
prop: 'last_seen',
|
|
93
|
+
name: 'The date/time of last Zigbee message',
|
|
94
|
+
icon: undefined,
|
|
95
|
+
role: 'state',
|
|
96
|
+
write: false,
|
|
97
|
+
read: true,
|
|
98
|
+
type: 'string',
|
|
99
|
+
def: '',
|
|
100
|
+
getter: (payload) => {
|
|
101
|
+
return payload.last_seen.replace('T', ' ').split('+')[0];
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
90
105
|
color_read: {
|
|
91
106
|
id: 'color',
|
|
92
107
|
prop: 'action',
|
|
@@ -13,13 +13,13 @@ class WebsocketController {
|
|
|
13
13
|
|
|
14
14
|
initWsClient() {
|
|
15
15
|
try {
|
|
16
|
-
let wsURL =
|
|
16
|
+
let wsURL = `${this.adapter.config.wsScheme}://${this.adapter.config.wsServerIP}:${this.adapter.config.wsServerPort}/api`;
|
|
17
17
|
|
|
18
18
|
if (this.adapter.config.wsTokenEnabled == true) {
|
|
19
19
|
wsURL += `?token=${this.adapter.config.wsToken}`;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
wsClient = new WebSocket(wsURL);
|
|
22
|
+
wsClient = new WebSocket(wsURL), { rejectUnauthorized: false };
|
|
23
23
|
|
|
24
24
|
wsClient.on('open', () => {
|
|
25
25
|
// Send ping to server
|
package/main.js
CHANGED
|
@@ -133,6 +133,7 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
133
133
|
|
|
134
134
|
async messageParse(message) {
|
|
135
135
|
const messageObj = JSON.parse(message);
|
|
136
|
+
//this.log.debug(JSON.stringify(messageObj));
|
|
136
137
|
|
|
137
138
|
switch (messageObj.topic) {
|
|
138
139
|
case 'bridge/config':
|
|
@@ -225,7 +226,9 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
225
226
|
if (['exmqtt', 'intmqtt'].includes(this.config.connectionType)) {
|
|
226
227
|
if (mqttClient && !mqttClient.closed) {
|
|
227
228
|
try {
|
|
228
|
-
mqttClient
|
|
229
|
+
if (mqttClient) {
|
|
230
|
+
mqttClient.close();
|
|
231
|
+
}
|
|
229
232
|
} catch (e) {
|
|
230
233
|
this.log.error(e);
|
|
231
234
|
}
|
|
@@ -234,7 +237,9 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
234
237
|
// Internal or Dummy MQTT-Server
|
|
235
238
|
if (this.config.connectionType == 'intmqtt' || this.config.dummyMqtt == true) {
|
|
236
239
|
try {
|
|
237
|
-
mqttServerController
|
|
240
|
+
if (mqttServerController) {
|
|
241
|
+
mqttServerController.closeServer();
|
|
242
|
+
}
|
|
238
243
|
} catch (e) {
|
|
239
244
|
this.log.error(e);
|
|
240
245
|
}
|
|
@@ -242,26 +247,34 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
242
247
|
// Websocket
|
|
243
248
|
else if (this.config.connectionType == 'ws') {
|
|
244
249
|
try {
|
|
245
|
-
websocketController
|
|
250
|
+
if (websocketController) {
|
|
251
|
+
websocketController.closeConnection();
|
|
252
|
+
}
|
|
246
253
|
} catch (e) {
|
|
247
254
|
this.log.error(e);
|
|
248
255
|
}
|
|
249
256
|
}
|
|
250
257
|
// Set all device available states of false
|
|
251
258
|
try {
|
|
252
|
-
|
|
259
|
+
if (statesController) {
|
|
260
|
+
await statesController.setAllAvailableToFalse();
|
|
261
|
+
}
|
|
253
262
|
} catch (e) {
|
|
254
263
|
this.log.error(e);
|
|
255
264
|
}
|
|
256
265
|
// Clear all websocket timers
|
|
257
266
|
try {
|
|
258
|
-
|
|
267
|
+
if (websocketController) {
|
|
268
|
+
await websocketController.allTimerClear();
|
|
269
|
+
}
|
|
259
270
|
} catch (e) {
|
|
260
271
|
this.log.error(e);
|
|
261
272
|
}
|
|
262
273
|
// Clear all state timers
|
|
263
274
|
try {
|
|
264
|
-
|
|
275
|
+
if (statesController) {
|
|
276
|
+
await statesController.allTimerClear();
|
|
277
|
+
}
|
|
265
278
|
} catch (e) {
|
|
266
279
|
this.log.error(e);
|
|
267
280
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee2mqtt",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Zigbee2MQTT adapter for ioBroker",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Dennis Rathjen",
|
|
@@ -19,38 +19,39 @@
|
|
|
19
19
|
"url": "https://github.com/o0shojo0o/ioBroker.zigbee2mqtt.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@iobroker/adapter-core": "^2.6.
|
|
22
|
+
"@iobroker/adapter-core": "^2.6.8",
|
|
23
23
|
"aedes": "^0.49.0",
|
|
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.13.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@alcalzone/release-script
|
|
30
|
+
"@alcalzone/release-script": "^3.6.0",
|
|
31
|
+
"@alcalzone/release-script-plugin-iobroker": "^3.6.0",
|
|
31
32
|
"@alcalzone/release-script-plugin-license": "^3.5.9",
|
|
32
|
-
"@alcalzone/release-script": "^3.5.9",
|
|
33
|
+
"@alcalzone/release-script-plugin-manual-review": "^3.5.9",
|
|
33
34
|
"@iobroker/adapter-dev": "^1.2.0",
|
|
34
35
|
"@iobroker/testing": "^4.1.0",
|
|
35
|
-
"@tsconfig/node14": "^1.0
|
|
36
|
-
"@types/chai": "^4.3.
|
|
36
|
+
"@tsconfig/node14": "^14.1.0",
|
|
37
|
+
"@types/chai": "^4.3.5",
|
|
37
38
|
"@types/chai-as-promised": "^7.1.5",
|
|
38
39
|
"@types/mocha": "^10.0.1",
|
|
39
|
-
"@types/node": "^
|
|
40
|
+
"@types/node": "^20.4.2",
|
|
40
41
|
"@types/proxyquire": "^1.3.28",
|
|
41
|
-
"@types/sinon": "^10.0.
|
|
42
|
+
"@types/sinon": "^10.0.15",
|
|
42
43
|
"@types/sinon-chai": "^3.2.9",
|
|
43
44
|
"chai": "^4.3.7",
|
|
44
45
|
"chai-as-promised": "^7.1.1",
|
|
45
|
-
"eslint": "^8.
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
47
|
-
"eslint-plugin-prettier": "^
|
|
46
|
+
"eslint": "^8.45.0",
|
|
47
|
+
"eslint-config-prettier": "^8.8.0",
|
|
48
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
48
49
|
"mocha": "^10.2.0",
|
|
49
|
-
"prettier": "^
|
|
50
|
+
"prettier": "^3.0.0",
|
|
50
51
|
"proxyquire": "^2.1.3",
|
|
51
|
-
"sinon": "^15.0
|
|
52
|
+
"sinon": "^15.2.0",
|
|
52
53
|
"sinon-chai": "^3.7.0",
|
|
53
|
-
"typescript": "~
|
|
54
|
+
"typescript": "~5.1.6"
|
|
54
55
|
},
|
|
55
56
|
"main": "main.js",
|
|
56
57
|
"files": [
|