iobroker.zigbee2mqtt 2.13.1 → 2.13.3
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/io-package.json +28 -28
- package/lib/statesController.js +22 -13
- package/main.js +6 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -32,6 +32,14 @@ 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.13.3 (2023-10-10)
|
|
36
|
+
|
|
37
|
+
- (o0shojo0o) fixed devices erroneous offline indication ([#255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255))
|
|
38
|
+
|
|
39
|
+
### 2.13.2 (2023-09-30)
|
|
40
|
+
|
|
41
|
+
- (o0shojo0o) fixed NULL values when HASS integration is enabled in zigbee2mqtt
|
|
42
|
+
|
|
35
43
|
### 2.13.1 (2023-09-07)
|
|
36
44
|
|
|
37
45
|
- (o0shojo0o) fixed storage name
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "2.13.
|
|
4
|
+
"version": "2.13.3",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.13.3": {
|
|
7
|
+
"en": "fixed devices erroneous offline indication ([#255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255))",
|
|
8
|
+
"de": "feste Geräte fehlerhafte Offline-Anzeige #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
|
|
9
|
+
"ru": "фиксированные устройства ошибочные оффлайн индикация #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255)",
|
|
10
|
+
"pt": "dispositivos fixos errônea indicação offline #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255)",
|
|
11
|
+
"nl": "quality over Quantity (QoQ) Releases Vertaling:",
|
|
12
|
+
"fr": "signalisation erroneous offline #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
|
|
13
|
+
"it": "#[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
|
|
14
|
+
"es": "dispositivos fijos erroneous offline indicating #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
|
|
15
|
+
"pl": "uruchomione urządzenia błędne, #255 (https:/github.com/o0shojo0o/ioBroker,zigbee2mqtt/issues/255)",
|
|
16
|
+
"uk": "фіксовані пристрої erroneous офлайн показання # [255] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/products/255)",
|
|
17
|
+
"zh-cn": "固定装置随线标明编号[255](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/255)"
|
|
18
|
+
},
|
|
19
|
+
"2.13.2": {
|
|
20
|
+
"en": "fixed NULL values when HASS integration is enabled in zigbee2mqtt",
|
|
21
|
+
"de": "feste NULL-Werte, wenn die HASS-Integration in zigbee2mqtt aktiviert ist",
|
|
22
|
+
"ru": "фиксированные значения NULL, когда интеграция HASS включена в zigbee2mqtt",
|
|
23
|
+
"pt": "valores NULL fixos quando a integração HASS é ativada em zigbee2mqtt",
|
|
24
|
+
"nl": "gerepareerde NUll waarden wanneer HASS integratie in staat is in Zigbee2mqt",
|
|
25
|
+
"fr": "valeurs NULL fixes lorsque l'intégration HASS est activée en zigbee2mqt",
|
|
26
|
+
"it": "valori NULL fissi quando l'integrazione HASS è attivata in zigbee2mqtt",
|
|
27
|
+
"es": "valores fijos NULL cuando la integración HASS está habilitada en zigbee2mqt",
|
|
28
|
+
"pl": "zastawione wartości NULL, gdy integracja HASS jest dostępna w zigbee2mqtt",
|
|
29
|
+
"uk": "виправлено значення NULL при інтеграції HASS у Zigbee2mqtt",
|
|
30
|
+
"zh-cn": "当人道协调厅的一体化得以在齐格贝2mqtttt条件下实现固定的NULL数值。"
|
|
31
|
+
},
|
|
6
32
|
"2.13.1": {
|
|
7
33
|
"en": "fixed storage name",
|
|
8
34
|
"de": "fester speichername",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "definicja typów (tx @arteck)",
|
|
68
94
|
"uk": "фіксувати визначення типу (thx @arteck)",
|
|
69
95
|
"zh-cn": "fix类定义(x @arteck)"
|
|
70
|
-
},
|
|
71
|
-
"2.10.0": {
|
|
72
|
-
"en": "optimisation for the MQTT connection \nfix for MQTT output type: attribute_and_json ([#87](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/87))\nadded support for external MQTT-Server credentials ([#148](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148))\n*After update, Websocket Auth-Token must be set again, if used.*",
|
|
73
|
-
"de": "optimierung der MQTT-Verbindung\nfix für den MQTT-Ausgangstyp: attribute_and_json #[87](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/87)\nunterstützung für externe MQTT-Server-Anmeldeinformationen #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/148)\n*Nach dem Update muss Websocket Auth-Token wieder eingestellt werden, wenn verwendet*",
|
|
74
|
-
"ru": "оптимизация подключения к MQTT\nисправить для типа вывода MQTT: attribute_and_json #[87](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/87)\nдобавлена поддержка внешних учетных записей MQTT-Server #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148)\n*После обновления, Websocket Auth-Token должен быть установлен снова, если используется *",
|
|
75
|
-
"pt": "otimização para a conexão MQTT\ncorreção para o tipo de saída MQTT: atributo_and_json #[87](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/87)\nadicionado suporte para credenciais externas do MQTT-Server #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148)\n*Depois da atualização, Websocket Auth-Token deve ser definido novamente, se usado*",
|
|
76
|
-
"nl": "vertaling:\nvertaling:\nvoegde steun toe voor externe MQTT-Server credentials 48148:\nNa de update, moeten websocket Auth-Token opnieuw ingesteld worden, als gebruikt",
|
|
77
|
-
"fr": "optimisation de la connexion MQTT\ncorrection du type de sortie MQTT : attribute_and_json #[87](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/87)\najout d ' un appui aux pouvoirs externes de MQTT-Server #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/148)\n*Après la mise à jour, Websocket Auth-Token doit être réinitialisé, si utilisé*",
|
|
78
|
-
"it": "ottimizzazione della connessione MQTT\ncorrezione del tipo di uscita MQTT: attribute_and_json #[87](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/87)\n[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/148)\n*Dopo l'aggiornamento, Websocket Auth-Token deve essere impostato di nuovo, se utilizzato*",
|
|
79
|
-
"es": "optimización para la conexión MQTT\nfix for MQTT output type: attributed_and_json #[87](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/87)\napoyo añadido a las credenciales externas de MQTT-Server #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148)\n*Después de la actualización, Websocket Auth-Token debe configurarse de nuevo, si se utiliza*",
|
|
80
|
-
"pl": "optymalizacja połączenia MQTT\nrezultaty na MQTT: attribute_and_json #87(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/87)\nwsparcie dla zewnętrznych MQTT-Server Credentials #148 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148)\n*After update, Websocket Auth-Token musi być ponownie ustawiony, jeśli jest używany *",
|
|
81
|
-
"uk": "оптимізація підключення MQTT\njavaScript licenses API Веб-сайт Go1.13.8\nдодано підтримку зовнішніх облікових записів MQTT-Server #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148)\n*Оновлення, Websocket Auth-Token необхідно встановити знову, якщо використовується*",
|
|
82
|
-
"zh-cn": "最惠国条款的生效\nfix MQTT产出类型:归属_and_json #[87](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/87)\n补充支持外贸总协定(第[148]号(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/148)\n* 如使用最新资料,必须再次建立万维网。"
|
|
83
|
-
},
|
|
84
|
-
"2.9.0": {
|
|
85
|
-
"en": "added state `send_payload` to send a raw json payload",
|
|
86
|
-
"de": "add state send_payload to send a roh json payload",
|
|
87
|
-
"ru": "добавленное государство send_payload для отправки сырья json payload",
|
|
88
|
-
"pt": "adicionado estado send_payload para enviar uma carga de json cru",
|
|
89
|
-
"nl": "vertaling:",
|
|
90
|
-
"fr": "add state send_payload pour envoyer une charge utile json brute",
|
|
91
|
-
"it": "aggiunto stato send_payload per inviare un grezzo json payload",
|
|
92
|
-
"es": "añadir estado send_payload para enviar una carga de pago json cruda",
|
|
93
|
-
"pl": "wtedy dodane państwo przesyłają ładunek surowy json",
|
|
94
|
-
"uk": "додано державне відправлення_payload для відправки сировини json",
|
|
95
|
-
"zh-cn": "增派国家派遣国:缴交会费"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"messages": [
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
"role": "json",
|
|
337
337
|
"read": true,
|
|
338
338
|
"write": false,
|
|
339
|
-
"def": []
|
|
339
|
+
"def": "[]"
|
|
340
340
|
},
|
|
341
341
|
"native": {}
|
|
342
342
|
},
|
package/lib/statesController.js
CHANGED
|
@@ -36,6 +36,11 @@ class StatesController {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
for (const [key, value] of Object.entries(messageObj.payload)) {
|
|
39
|
+
|
|
40
|
+
if (value === undefined || value === null) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
let states = device.states.filter(x => x.prop && x.prop == key);
|
|
40
45
|
|
|
41
46
|
if (states.length == 0) {
|
|
@@ -51,7 +56,7 @@ class StatesController {
|
|
|
51
56
|
const stateName = `${device.ieee_address}.${state.id}`;
|
|
52
57
|
|
|
53
58
|
// It may be that the state has not yet been created!
|
|
54
|
-
if (!this.createCache[device.ieee_address] || !this.createCache[device.ieee_address][state.id] || !this.createCache[device.ieee_address][state.id].created) {
|
|
59
|
+
if (!this.createCache[device.ieee_address] || !this.createCache[device.ieee_address][state.id] || !this.createCache[device.ieee_address][state.id].created == true) {
|
|
55
60
|
incStatsQueue[incStatsQueue.length] = messageObj;
|
|
56
61
|
continue;
|
|
57
62
|
}
|
|
@@ -88,27 +93,31 @@ class StatesController {
|
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
async setStateSafelyAsync(stateName, value) {
|
|
91
|
-
if (value
|
|
92
|
-
|
|
96
|
+
if (value === undefined || value === null) {
|
|
97
|
+
return;
|
|
93
98
|
}
|
|
99
|
+
await this.adapter.setStateAsync(stateName, value, true);
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
async setStateChangedSafelyAsync(stateName, value) {
|
|
97
|
-
if (value
|
|
98
|
-
|
|
103
|
+
if (value === undefined || value === null) {
|
|
104
|
+
return;
|
|
99
105
|
}
|
|
106
|
+
await this.adapter.setStateChangedAsync(stateName, value, true);
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
async setStateWithTimeoutAsync(stateName, value, timeout) {
|
|
103
|
-
if (value
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, timeout);
|
|
110
|
+
if (value === undefined || value === null) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
await this.adapter.setStateAsync(stateName, value, true);
|
|
115
|
+
if (timeOutCache[stateName]) {
|
|
116
|
+
clearTimeout(timeOutCache[stateName]);
|
|
111
117
|
}
|
|
118
|
+
timeOutCache[stateName] = setTimeout(() => {
|
|
119
|
+
this.adapter.setStateAsync(stateName, !value, true);
|
|
120
|
+
}, timeout);
|
|
112
121
|
}
|
|
113
122
|
|
|
114
123
|
processQueue() {
|
package/main.js
CHANGED
|
@@ -148,6 +148,8 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
148
148
|
wsClient.on('close', async () => {
|
|
149
149
|
this.setStateChanged('info.connection', false, true);
|
|
150
150
|
await statesController.setAllAvailableToFalse();
|
|
151
|
+
deviceCache = [];
|
|
152
|
+
groupCache = [];
|
|
151
153
|
});
|
|
152
154
|
}
|
|
153
155
|
}
|
|
@@ -224,16 +226,15 @@ class Zigbee2mqtt extends core.Adapter {
|
|
|
224
226
|
break;
|
|
225
227
|
default:
|
|
226
228
|
{
|
|
227
|
-
//
|
|
229
|
+
// is the payload an availability status?
|
|
228
230
|
if (messageObj.topic.endsWith('/availability')) {
|
|
229
|
-
|
|
230
231
|
// If an availability message for an old device ID comes with a payload of NULL, this is the indicator that a device has been unnamed.
|
|
231
|
-
// If this is then still available in the cache, the messages must first be cached.
|
|
232
232
|
if (messageObj.payload == 'null') {
|
|
233
|
-
|
|
233
|
+
return;
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
// is it a viable payload?
|
|
236
236
|
if (messageObj.payload && messageObj.payload.state) {
|
|
237
|
+
// {"payload":{"state":"online"},"topic":"FL.Licht.Links/availability"} ----> {"payload":{"available":true},"topic":"FL.Licht.Links"}
|
|
237
238
|
const newMessage = {
|
|
238
239
|
payload: { available: messageObj.payload.state == 'online' },
|
|
239
240
|
topic: messageObj.topic.replace('/availability', '')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee2mqtt",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.3",
|
|
4
4
|
"description": "Zigbee2MQTT adapter for ioBroker",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Dennis Rathjen",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"@iobroker/adapter-core": "^3.0.3",
|
|
23
23
|
"aedes": "^0.50.0",
|
|
24
24
|
"aedes-persistence-nedb": "^2.0.3",
|
|
25
|
-
"mqtt": "
|
|
25
|
+
"mqtt": "~5.0.5",
|
|
26
26
|
"net": "^1.0.2",
|
|
27
27
|
"node-schedule": "^2.1.1",
|
|
28
|
-
"sharp": "^0.32.
|
|
28
|
+
"sharp": "^0.32.6",
|
|
29
29
|
"ws": "^8.13.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"@tsconfig/node14": "^14.1.0",
|
|
39
39
|
"@types/chai": "^4.3.5",
|
|
40
40
|
"@types/chai-as-promised": "^7.1.5",
|
|
41
|
-
"@types/mocha": "^10.0.
|
|
41
|
+
"@types/mocha": "^10.0.2",
|
|
42
42
|
"@types/node": "^20.5.7",
|
|
43
43
|
"@types/node-schedule": "^2.1.0",
|
|
44
|
-
"@types/proxyquire": "^1.3.
|
|
44
|
+
"@types/proxyquire": "^1.3.29",
|
|
45
45
|
"@types/sinon": "^10.0.16",
|
|
46
46
|
"@types/sinon-chai": "^3.2.9",
|
|
47
47
|
"chai": "^4.3.8",
|
|
48
48
|
"chai-as-promised": "^7.1.1",
|
|
49
|
-
"eslint": "^8.
|
|
49
|
+
"eslint": "^8.50.0",
|
|
50
50
|
"eslint-config-prettier": "^9.0.0",
|
|
51
51
|
"eslint-plugin-prettier": "^5.0.0",
|
|
52
52
|
"mocha": "^10.2.0",
|
|
53
53
|
"prettier": "^3.0.3",
|
|
54
54
|
"proxyquire": "^2.1.3",
|
|
55
|
-
"sinon": "^
|
|
55
|
+
"sinon": "^16.0.0",
|
|
56
56
|
"sinon-chai": "^3.7.0",
|
|
57
57
|
"typescript": "~5.2.2"
|
|
58
58
|
},
|