iobroker.zigbee2mqtt 2.13.2 → 2.13.4

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 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.4 (2023-12-17)
36
+
37
+ - (o0shojo0o) fixed unnecessary warning for special value ([269](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269))
38
+
39
+ ### 2.13.3 (2023-10-10)
40
+
41
+ - (o0shojo0o) fixed devices erroneous offline indication ([#255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255))
42
+
35
43
  ### 2.13.2 (2023-09-30)
36
44
 
37
45
  - (o0shojo0o) fixed NULL values when HASS integration is enabled in zigbee2mqtt
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee2mqtt",
4
- "version": "2.13.2",
4
+ "version": "2.13.4",
5
5
  "news": {
6
+ "2.13.4": {
7
+ "en": "fixed unnecessary warning for special value ([269](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269))",
8
+ "de": "feste unnötige Warnung für Sonderwert [269](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/269)",
9
+ "ru": "фиксированное ненужное предупреждение для особенного значения [269](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269)",
10
+ "pt": "aviso desnecessário fixo para valor especial [269](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269)",
11
+ "nl": "onnodig gewaarschuwd voor speciale waarde voor speciale waarde [269)",
12
+ "fr": "avertissement inutile fixe pour valeur spéciale [269](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/269)",
13
+ "it": "[269](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/269)",
14
+ "es": "fija innecesaria advertencia para valor especial [269](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269)",
15
+ "pl": "niepotrzebne ostrzeżenie dla specjalnej wartości (269)(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269)",
16
+ "uk": "виправлено непотрібне попередження про спеціальне значення [269] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/269)",
17
+ "zh-cn": "(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/269)"
18
+ },
19
+ "2.13.3": {
20
+ "en": "fixed devices erroneous offline indication ([#255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255))",
21
+ "de": "feste Geräte fehlerhafte Offline-Anzeige #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
22
+ "ru": "фиксированные устройства ошибочные оффлайн индикация #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255)",
23
+ "pt": "dispositivos fixos errônea indicação offline #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/255)",
24
+ "nl": "quality over Quantity (QoQ) Releases Vertaling:",
25
+ "fr": "signalisation erroneous offline #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
26
+ "it": "#[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
27
+ "es": "dispositivos fijos erroneous offline indicating #[255](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/255)",
28
+ "pl": "uruchomione urządzenia błędne, #255 (https:/github.com/o0shojo0o/ioBroker,zigbee2mqtt/issues/255)",
29
+ "uk": "фіксовані пристрої erroneous офлайн показання # [255] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/products/255)",
30
+ "zh-cn": "固定装置随线标明编号[255](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/255)"
31
+ },
6
32
  "2.13.2": {
7
33
  "en": "fixed NULL values when HASS integration is enabled in zigbee2mqtt",
8
34
  "de": "feste NULL-Werte, wenn die HASS-Integration in zigbee2mqtt aktiviert ist",
@@ -67,32 +93,6 @@
67
93
  "pl": "dodał automatyczny pobranie obrazu zigbee2mqtt na meta-storage\ndodał dodatki do opcjonalnych zdjęć z Zigbee2Mqtt i używał ich jako ikon obiektowych. `\nugruntowany\ndodano opcjonalne stany Hold i Release. `\ndodano możliwość generowanego prostego Move'a i Stop states'\ndodał opcję \"Generate simple Press and Release states\". `",
68
94
  "uk": "додано автоматичне завантаження зображення пристрою з zigbee2mqtt до мета-сторage\nдодано опцію `Завантажити зображення пристроїв з Zigbee2Mqtt і використовувати їх як іконки об'єкта. й\nфіксована Hue_Move\nдодано варіант `Generate simple Hold and Release State й\nдодано варіант `Generate Simple Move and Stop State`\nдодано варіант `Generate simple Press and Release State й",
69
95
  "zh-cn": "加上自齐格贝德二米克特自动下载器图像\n添加了“Zigbee2Mqt的载荷装置图像”的备选办法,并将这些图像作为目标。 目 录\n固定的He_Move\n增加“简单的霍乱和释放国”的选择 目 录\n增加“简单的摩托和托儿”\n增加的“简单新闻”选择 目 录"
70
- },
71
- "2.10.1": {
72
- "en": "fix type definitions (thx @arteck)",
73
- "de": "fix typdefinitionen (thx @arteck)",
74
- "ru": "определение типа исправления (thx @arteck)",
75
- "pt": "definições de tipo de correção (thx @arteck)",
76
- "nl": "vertaling:",
77
- "fr": "définitions de type fixe (thx @arteck)",
78
- "it": "correggere le definizioni di tipo (thx @arteck)",
79
- "es": "fijar definiciones tipo (thx @arteck)",
80
- "pl": "definicja typów (tx @arteck)",
81
- "uk": "фіксувати визначення типу (thx @arteck)",
82
- "zh-cn": "fix类定义(x @arteck)"
83
- },
84
- "2.10.0": {
85
- "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.*",
86
- "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*",
87
- "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 должен быть установлен снова, если используется *",
88
- "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*",
89
- "nl": "vertaling:\nvertaling:\nvoegde steun toe voor externe MQTT-Server credentials 48148:\nNa de update, moeten websocket Auth-Token opnieuw ingesteld worden, als gebruikt",
90
- "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é*",
91
- "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*",
92
- "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*",
93
- "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 *",
94
- "uk": "оптимізація підключення MQTT\njavaScript licenses API Веб-сайт Go1.13.8\nдодано підтримку зовнішніх облікових записів MQTT-Server #[148](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/148)\n*Оновлення, Websocket Auth-Token необхідно встановити знову, якщо використовується*",
95
- "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* 如使用最新资料,必须再次建立万维网。"
96
96
  }
97
97
  },
98
98
  "messages": [
@@ -186,6 +186,7 @@
186
186
  "type": "hardware",
187
187
  "compact": true,
188
188
  "stopTimeout": 2000,
189
+ "tier": 2,
189
190
  "connectionType": "local",
190
191
  "dataSource": "push",
191
192
  "adminUI": {
@@ -336,7 +337,7 @@
336
337
  "role": "json",
337
338
  "read": true,
338
339
  "write": false,
339
- "def": []
340
+ "def": "[]"
340
341
  },
341
342
  "native": {}
342
343
  },
package/lib/exposes.js CHANGED
@@ -447,6 +447,40 @@ async function createDeviceFromExposes(devicesMessag, adapter) {
447
447
  }, prop.access);
448
448
  break;
449
449
  }
450
+ case 'color_temp_startup': {
451
+ const stateName = expose.endpoint ? `colortempstartup_${expose.endpoint}` : 'colortempstartup';
452
+ const propName = expose.endpoint ? `color_temp_startup_${expose.endpoint}` : 'color_temp_startup';
453
+ //const colorMode = expose.endpoint ? `color_mode_${expose.endpoint}` : 'color_mode';
454
+ pushToStates({
455
+ id: stateName,
456
+ prop: propName,
457
+ name: `${prop.description} ${expose.endpoint ? `(${expose.endpoint})` : ''}`.trim(),
458
+ //options: ['transition'],
459
+ icon: undefined,
460
+ role: 'level.color.temperature',
461
+ write: true,
462
+ read: true,
463
+ type: 'number',
464
+ min: 0,
465
+ max: 65535,
466
+ def: undefined,
467
+ unit: config.useKelvin == true ? 'K' : 'mired',
468
+ setter: (value) => {
469
+ return utils.toMired(value);
470
+ },
471
+ getter: (payload) => {
472
+ //if (payload[colorMode] != 'color_temp') {
473
+ // return undefined;
474
+ //}
475
+ if (config.useKelvin == true) {
476
+ return utils.miredKelvinConversion(payload[propName]);
477
+ } else {
478
+ return payload[propName];
479
+ }
480
+ },
481
+ }, prop.access);
482
+ break;
483
+ }
450
484
  case 'color_xy': {
451
485
  const stateName = expose.endpoint ? `color_${expose.endpoint}` : 'color';
452
486
  const colorMode = expose.endpoint ? `color_mode_${expose.endpoint}` : 'color_mode';
@@ -56,7 +56,7 @@ class StatesController {
56
56
  const stateName = `${device.ieee_address}.${state.id}`;
57
57
 
58
58
  // It may be that the state has not yet been created!
59
- 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) {
60
60
  incStatsQueue[incStatsQueue.length] = messageObj;
61
61
  continue;
62
62
  }
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
- // {"payload":{"state":"online"},"topic":"FL.Licht.Links/availability"} ----> {"payload":{"available":true},"topic":"FL.Licht.Links"}
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
- break;
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.2",
3
+ "version": "2.13.4",
4
4
  "description": "Zigbee2MQTT adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen",
@@ -18,41 +18,44 @@
18
18
  "type": "git",
19
19
  "url": "https://github.com/o0shojo0o/ioBroker.zigbee2mqtt.git"
20
20
  },
21
+ "engines": {
22
+ "node": ">= 16"
23
+ },
21
24
  "dependencies": {
22
- "@iobroker/adapter-core": "^3.0.3",
25
+ "@iobroker/adapter-core": "^3.0.4",
23
26
  "aedes": "^0.50.0",
24
27
  "aedes-persistence-nedb": "^2.0.3",
25
- "mqtt": "^5.0.4",
28
+ "mqtt": "~5.1.4",
26
29
  "net": "^1.0.2",
27
30
  "node-schedule": "^2.1.1",
28
- "sharp": "^0.32.5",
31
+ "sharp": "^0.32.6",
29
32
  "ws": "^8.13.0"
30
33
  },
31
34
  "devDependencies": {
32
- "@alcalzone/release-script": "^3.6.0",
35
+ "@alcalzone/release-script": "^3.7.0",
33
36
  "@alcalzone/release-script-plugin-iobroker": "^3.6.0",
34
- "@alcalzone/release-script-plugin-license": "^3.5.9",
35
- "@alcalzone/release-script-plugin-manual-review": "^3.5.9",
37
+ "@alcalzone/release-script-plugin-license": "^3.7.0",
38
+ "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
36
39
  "@iobroker/adapter-dev": "^1.2.0",
37
40
  "@iobroker/testing": "^4.1.0",
38
41
  "@tsconfig/node14": "^14.1.0",
39
42
  "@types/chai": "^4.3.5",
40
- "@types/chai-as-promised": "^7.1.5",
41
- "@types/mocha": "^10.0.1",
42
- "@types/node": "^20.5.7",
43
+ "@types/chai-as-promised": "^7.1.8",
44
+ "@types/mocha": "^10.0.2",
45
+ "@types/node": "^20.8.10",
43
46
  "@types/node-schedule": "^2.1.0",
44
- "@types/proxyquire": "^1.3.28",
47
+ "@types/proxyquire": "^1.3.31",
45
48
  "@types/sinon": "^10.0.16",
46
49
  "@types/sinon-chai": "^3.2.9",
47
50
  "chai": "^4.3.8",
48
51
  "chai-as-promised": "^7.1.1",
49
- "eslint": "^8.48.0",
52
+ "eslint": "^8.50.0",
50
53
  "eslint-config-prettier": "^9.0.0",
51
- "eslint-plugin-prettier": "^5.0.0",
54
+ "eslint-plugin-prettier": "^5.0.1",
52
55
  "mocha": "^10.2.0",
53
56
  "prettier": "^3.0.3",
54
57
  "proxyquire": "^2.1.3",
55
- "sinon": "^15.2.0",
58
+ "sinon": "^16.0.0",
56
59
  "sinon-chai": "^3.7.0",
57
60
  "typescript": "~5.2.2"
58
61
  },