iobroker.zigbee2mqtt 2.13.10 → 3.0.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Arthur Rupp <arteck@outlook.com>,
3
+ Copyright (c) 2025 Arthur Rupp <arteck@outlook.com>,
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -22,6 +22,12 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
22
22
  [Adapter Documentation](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/wiki.md)
23
23
 
24
24
  ## Changelog
25
+ ### 3.0.0 (2025-01-04)
26
+ - (arteck) adaptation z2m 2.x
27
+
28
+ ### 2.13.11 (2024-10-17)
29
+ - (arteck) corr package.json
30
+
25
31
  ### 2.13.10 (2024-09-05)
26
32
  - (arteck) update dependecy
27
33
  - (arteck) add available object for groups
@@ -251,7 +257,7 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
251
257
 
252
258
  MIT License
253
259
 
254
- Copyright (c) 2024 Arthur Rupp <arteck@outlook.com>,
260
+ Copyright (c) 2025 Arthur Rupp <arteck@outlook.com>,
255
261
 
256
262
  Permission is hereby granted, free of charge, to any person obtaining a copy
257
263
  of this software and associated documentation files (the "Software"), to deal
@@ -42,5 +42,8 @@
42
42
  "Automatic check for missing routers in the coordinator memory.": "Automatische Prüfung auf fehlende Router im Speicher des Koordinators.",
43
43
  "With which log level should a negative search be logged?": "Mit welcher Loglevel soll ein negatives Suchergebnis protokolliert werden?",
44
44
  "Time of the automatic check": "Zeitpunkt der automatischen Prüfung",
45
- "More information": "Mehr Informationen"
45
+ "More information": "Mehr Informationen",
46
+ "Expert Settings. Please only use if you know what you're doing": "Expert Einstellungen. Bitte nur verwenden, wenn Du weisst was du machst",
47
+ "Allways update state for occupancy when message arrives from zigbee2mqtt server (Only for true state). Increases load on ioBroker System" : "Aktualisiert immer den Status für die Bewegung, wenn eine Nachricht vom zigbee2mqtt-Server eintrifft (nur bei true). Erhöht die Last auf dem ioBroker"
48
+ }
46
49
  }
@@ -42,5 +42,7 @@
42
42
  "Automatic check for missing routers in the coordinator memory.": "Automatic check for missing routers in the coordinator memory.",
43
43
  "With which log level should a negative search be logged?": "With which log level should a negative search be logged?",
44
44
  "Time of the automatic check": "Time of the automatic check",
45
- "More information": "More information"
45
+ "More information": "More information",
46
+ "Expert Settings. Please only use if you know what you're doing": "Expert Settings. Please only use if you know what you're doing",
47
+ "Allways update state for occupancy when message arrives from zigbee2mqtt server (Only for true state). Increases load on ioBroker System" : "Allways update state for occupancy when message arrives from zigbee2mqtt server (Only for true state). Increases load on ioBroker System"
46
48
  }
@@ -113,6 +113,7 @@
113
113
  "type": "password",
114
114
  "label": "MQTT Password",
115
115
  "newLine": false,
116
+ "visible": true,
116
117
  "hidden": "data.externalMqttServerCredentials != true ||data.connectionType != 'exmqtt'"
117
118
  },
118
119
  "mqttServerIPBind": {
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee2mqtt",
4
- "version": "2.13.10",
4
+ "version": "3.0.0",
5
5
  "news": {
6
+ "3.0.0": {
7
+ "en": "adaptation z2m 2.x",
8
+ "de": "anpassung z2m 2.x",
9
+ "ru": "адаптация z2m 2.x",
10
+ "pt": "adaptação z2m 2.x",
11
+ "nl": "aanpassing z2m 2.x",
12
+ "fr": "adaptation z2m 2.x",
13
+ "it": "adattamento z2m 2.x",
14
+ "es": "adaptación z2m 2.x",
15
+ "pl": "adaptacja z2m 2.x",
16
+ "uk": "адаптація z2m 2.x",
17
+ "zh-cn": "适应z2m 2.x"
18
+ },
19
+ "2.13.11": {
20
+ "en": "corr package.json",
21
+ "de": "korr paket.json",
22
+ "ru": "коррек-пакет.json",
23
+ "pt": "corr pacote.json",
24
+ "nl": "corr package.json",
25
+ "fr": "c'est ce qu'il a dit",
26
+ "it": "pacchetto corr.json",
27
+ "es": "corr package.json",
28
+ "pl": "corr package.json",
29
+ "uk": "english, українська, français..",
30
+ "zh-cn": "corr 软件包.json"
31
+ },
6
32
  "2.13.10": {
7
33
  "en": "update dependecy\nadd available object for groups",
8
34
  "de": "aktualisierung abhängigkeit\nobjekt für gruppen hinzufügen",
@@ -54,45 +80,6 @@
54
80
  "pl": "zasadnicza zależność\naktualizacja zależności\nWłącz zawsze aktualizację obłożenia, jeśli jest prawdziwe",
55
81
  "uk": "сердечник\nоновлення залежності\nУвімкнути можливість постійно оновлюватися, якщо правда",
56
82
  "zh-cn": "核心依赖性\n更新依赖性\n启用若为真则总是更新占用"
57
- },
58
- "2.13.6": {
59
- "en": "update dependecy",
60
- "de": "aktualisierung abhängigkeit",
61
- "ru": "обновление",
62
- "pt": "atualização",
63
- "nl": "afhankelijkheid bijwerken",
64
- "fr": "mettre à jour la dépendance",
65
- "it": "aggiornamento dipendenza",
66
- "es": "dependencia de actualización",
67
- "pl": "aktualizacja zależności",
68
- "uk": "оновлення залежності",
69
- "zh-cn": "更新依赖性"
70
- },
71
- "2.13.5": {
72
- "en": "fixed mqttClient.end()",
73
- "de": "mqttClient.end()",
74
- "ru": "фиксированный mqtClient.end()",
75
- "pt": "fixo mqttClient.end()",
76
- "nl": "vaste mqttClient.end()",
77
- "fr": "mqttClient.end() fixe",
78
- "it": "fisso mqttClient.end()",
79
- "es": "mqttClient.end()",
80
- "pl": "stałe mqttClient.end ()",
81
- "uk": "фіксований mqttClient.end()",
82
- "zh-cn": "固定的 mqttClient.end ()"
83
- },
84
- "2.13.4": {
85
- "en": "fixed unnecessary warning for special value ([269](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269))",
86
- "de": "feste unnötige Warnung für Sonderwert [269](https://github.com/arteck/ioBroker.zigbee2mqt/issues/269)",
87
- "ru": "фиксированное ненужное предупреждение для особенного значения [269](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269)",
88
- "pt": "aviso desnecessário fixo para valor especial [269](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269)",
89
- "nl": "onnodig gewaarschuwd voor speciale waarde voor speciale waarde [269)",
90
- "fr": "avertissement inutile fixe pour valeur spéciale [269](https://github.com/arteck/ioBroker.zigbee2mqt/issues/269)",
91
- "it": "[269](https://github.com/arteck/ioBroker.zigbee2mqt/issues/269)",
92
- "es": "fija innecesaria advertencia para valor especial [269](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269)",
93
- "pl": "niepotrzebne ostrzeżenie dla specjalnej wartości (269)(https:/github.com/arteck/ioBroker.zigbee2mqtt/issues/269)",
94
- "uk": "виправлено непотрібне попередження про спеціальне значення [269] (https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269)",
95
- "zh-cn": "(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/269)"
96
83
  }
97
84
  },
98
85
  "messages": [
@@ -100,35 +87,35 @@
100
87
  "condition": {
101
88
  "operand": "and",
102
89
  "rules": [
103
- "oldVersion<2.10.0",
104
- "newVersion>=2.10.0"
90
+ "oldVersion<=2.13.11",
91
+ "newVersion>=3.0.0"
105
92
  ]
106
93
  },
107
94
  "title": {
108
- "en": "Important notice!",
109
- "de": "Wichtiger Hinweis!",
110
- "ru": "Важное замечание!",
111
- "pt": "Notícia importante!",
112
- "nl": "Belangrijke mededeling!",
113
- "fr": "Avis important!",
114
- "it": "Avviso IMPORTANTE!",
115
- "es": "¡Noticia importante!",
116
- "pl": "Ważna uwaga!",
117
- "uk": "Важливе повідомлення!",
118
- "zh-cn": "重要的提醒!"
95
+ "en": "Important notice! zigbee2mqtt 2.0",
96
+ "de": "Wichtiger Hinweis! zigbee2mqtt 2.0",
97
+ "ru": "Важное замечание! zigbee2mqtt 2.0",
98
+ "pt": "Notícia importante! zigbee2mqtt 2.0",
99
+ "nl": "Belangrijke mededeling! zigbee2mqtt 2.0",
100
+ "fr": "Avis important! zigbee2mqtt 2.0",
101
+ "it": "Avviso IMPORTANTE! zigbee2mqtt 2.0",
102
+ "es": "¡Noticia importante! zigbee2mqtt 2.0",
103
+ "pl": "Ważna uwaga! zigbee2mqtt 2.0",
104
+ "uk": "Важливе повідомлення! zigbee2mqtt 2.0",
105
+ "zh-cn": "重要的提醒! zigbee2mqtt 2.0"
119
106
  },
120
107
  "text": {
121
- "en": "After the update, the Websocket Auth-Token must be set again, if used.",
122
- "de": "Nach dem Update muss der Websocket Auth-Token, falls verwendet, erneut gesetzt werden.",
123
- "ru": "После обновления необходимо снова установить Auth-Token Websocket, если он используется.",
124
- "pt": "Após a atualização, o Websocket Auth-Token deve ser configurado novamente, caso seja utilizado.",
125
- "nl": "Na de update moet het Websocket Auth-Token, indien gebruikt, opnieuw worden ingesteld.",
126
- "fr": "Après la mise à jour, le jeton d'authentification Websocket doit être à nouveau défini, s'il est utilisé.",
127
- "it": "Dopo l'aggiornamento, il Websocket Auth-Token deve essere reimpostato, se utilizzato.",
128
- "es": "Después de la actualización, el token de autenticación de Websocket debe configurarse nuevamente, si se usa.",
129
- "pl": "Po aktualizacji należy ponownie ustawić Websocket Auth-Token, jeśli jest używany.",
130
- "uk": "Після оновлення Websocket Auth-Token має бути встановлено знову, якщо він використовується.",
131
- "zh-cn": "更新后,如果使用 Websocket Auth-Token,则必须重新设置。"
108
+ "en": "check zigbee2mqtt notification, for breaking changes\n (link: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nhere are some object renamed and you have to adjust your scripts",
109
+ "de": "Prüfen Sie die zigbee2mqtt-Benachrichtigung, um Änderungen zu erkennen \n(Link: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nEs wurden einige Objekte umbenannt und Sie müssen Ihre Skripte anpassen",
110
+ "ru": "проверьте уведомление zigbee2mqtt об изменениях\n (ссылка: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nгде некоторые объекты переименованы, и вам придется скорректировать свои скрипты",
111
+ "pt": "verifique a notificação do zigbee2mqtt, para alterações de última hora \n(ligação: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nAlguns objectos foram renomeados e é necessário ajustar os scripts",
112
+ "nl": "controleer de zigbee2mqtt melding voor wijzigingen \n(link: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nEr zijn enkele objecten hernoemd en je moet je scripts aanpassen",
113
+ "fr": "Vérifiez la notification de zigbee2mqtt, pour les changements importants \n(lien : https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nIl y a des objets renommés et vous devez ajuster vos scripts.",
114
+ "it": "controllare la notifica di zigbee2mqtt, per le modifiche di rottura \n(link: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nAlcuni oggetti sono stati rinominati e occorre modificare gli script.",
115
+ "es": "revisa la notificación de zigbee2mqtt, para cambios de última hora\n (enlace: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nHay algunos objetos renombrados y tienes que ajustar tus scripts.",
116
+ "pl": "sprawdź powiadomienie zigbee2mqtt, aby uzyskać informacje o zmianach\n (link: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nZmieniono nazwy niektórych obiektów i należy dostosować skrypty.",
117
+ "uk": "перевірте сповіщення zigbee2mqtt на наявність змін\n (посилання: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nдеякі об'єкти перейменовано, і вам доведеться скоригувати свої скрипти",
118
+ "zh-cn": "check zigbee2mqtt notification, for breaking changes\n (link: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nhere are some object renamed and you have to adjust your scripts"
132
119
  },
133
120
  "level": "warn",
134
121
  "buttons": [
@@ -175,7 +162,10 @@
175
162
  "aqara",
176
163
  "tuya"
177
164
  ],
178
- "licenseInformation": "MIT",
165
+ "licenseInformation": {
166
+ "license": "MIT",
167
+ "type": "free"
168
+ },
179
169
  "platform": "Javascript/Node.js",
180
170
  "icon": "zigbee2mqtt.png",
181
171
  "enabled": false,
package/lib/check.js CHANGED
@@ -1,39 +1,48 @@
1
- function checkConfig(config, log) {
1
+ function checkConfig(config, log, version) {
2
2
  const checkAPIOptions = {
3
3
  legacy_api_enabled: config.advanced.legacy_api != false,
4
4
  legacy_availability_payload_enabled: config.advanced.legacy_availability_payload != false,
5
- device_legacy_enabled: config.device_options.legacy != false,
6
- payload_contains_not_json: config.advanced.output != 'attribute_and_json' && config.advanced.output != 'json',
5
+ device_legacy_enabled: config.device_options.legacy != false
7
6
  };
8
7
 
9
- if (Object.values(checkAPIOptions).filter((x) => x == true).length > 0) {
10
- log.error('===================================================');
11
- log.error('===================================================');
12
- if (checkAPIOptions.legacy_api_enabled == true) {
13
- log.error('Legacy api is activated, so the adapter can not work correctly!!!');
14
- log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:');
15
- log.error('advanced:');
16
- log.error(' legacy_api: false');
17
- log.error('');
18
- }
19
- if (checkAPIOptions.legacy_availability_payload_enabled == true) {
20
- log.error(
21
- 'Legacy Availability Payload is activated, thus the adapter cannot represent the availability of the devices!!!'
22
- );
23
- log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:');
24
- log.error('advanced:');
25
- log.error('legacy_availability_payload: false');
26
- log.error('');
27
- }
28
- if (checkAPIOptions.device_legacy_enabled == true) {
29
- log.error(
30
- 'Device Legacy Payload is activated, therefore the adapter may process the states of the devices correctly!!!'
31
- );
32
- log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:');
33
- log.error('device_options:');
34
- log.error(' legacy: false');
8
+ const checkAPIOptionsOutput = {
9
+ payload_contains_not_json: config.advanced.output != 'attribute_and_json' && config.advanced.output != 'json'
10
+ };
11
+
12
+ if (version.startsWith('1.')) { // wird in version 2.x immer auf false gesetzt sein
13
+ if (Object.values(checkAPIOptions).filter((x) => x == true).length > 0) {
14
+ log.error('===================================================');
15
+ log.error('===================================================');
16
+ if (checkAPIOptions.legacy_api_enabled == true) {
17
+ log.error('Legacy api is activated, so the adapter can not work correctly!!!');
18
+ log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:');
19
+ log.error('advanced:');
20
+ log.error(' legacy_api: false');
21
+ log.error('');
22
+ }
23
+ if (checkAPIOptions.legacy_availability_payload_enabled == true) {
24
+ log.error(
25
+ 'Legacy Availability Payload is activated, thus the adapter cannot represent the availability of the devices!!!'
26
+ );
27
+ log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:');
28
+ log.error('advanced:');
29
+ log.error('legacy_availability_payload: false');
30
+ log.error('');
31
+ }
32
+ if (checkAPIOptions.device_legacy_enabled == true) {
33
+ log.error(
34
+ 'Device Legacy Payload is activated, therefore the adapter may process the states of the devices correctly!!!'
35
+ );
36
+ log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:');
37
+ log.error('device_options:');
38
+ log.error(' legacy: false');
39
+ }
40
+ log.error('===================================================');
35
41
  }
36
- if (checkAPIOptions.payload_contains_not_json == true) {
42
+ }
43
+ if (Object.values(checkAPIOptionsOutput).filter((x) => x == true).length > 0) {
44
+ if (checkAPIOptions.payload_contains_not_json == true ) {
45
+ log.error('===================================================');
37
46
  log.error(
38
47
  'MQTT output type must "attribute_and_json" or "json" , therefore the adapter may process the states of the devices correctly!!!'
39
48
  );
@@ -44,9 +53,8 @@ function checkConfig(config, log) {
44
53
  log.error('advanced:');
45
54
  log.error(' output: attribute_and_json');
46
55
  log.error('');
56
+ log.error('===================================================');
47
57
  }
48
- log.error('===================================================');
49
- log.error('===================================================');
50
58
  }
51
59
  }
52
60
 
@@ -146,9 +146,9 @@ class DeviceController {
146
146
  write: true,
147
147
  read: true,
148
148
  type: 'number',
149
- min: this.config.useKelvin == true ? utils.miredKelvinConversion(500) : 150,
150
- max: this.config.useKelvin == true ? utils.miredKelvinConversion(150) : 500,
151
- def: this.config.useKelvin == true ? utils.miredKelvinConversion(150) : 500,
149
+ min: this.config.useKelvin == true ? utils.miredKelvinConversion(550) : 150,
150
+ max: this.config.useKelvin == true ? utils.miredKelvinConversion(153) : 500,
151
+ def: this.config.useKelvin == true ? utils.miredKelvinConversion(153) : 500,
152
152
  unit: this.config.useKelvin == true ? 'K' : 'mired',
153
153
  setter: (value) => {
154
154
  return utils.toMired(value);
@@ -56,12 +56,17 @@ class ImageController {
56
56
  }
57
57
  // If not donwload image
58
58
  else {
59
- let iconUrl = this.getZ2mDeviceImage(device);
60
- if (!iconUrl) {
61
- iconUrl = this.getSlsDeviceImage(device);
62
- }
59
+ let iconUrl = this.getSlsDeviceImage(device);
60
+
63
61
  this.adapter.log.info(`Download image for device model: ${device.definition.model}`);
64
- await this.downloadIcon(this.adapter, iconUrl, this.adapter.namespace);
62
+
63
+ try {
64
+ await this.downloadIcon(this.adapter, iconUrl, this.adapter.namespace);
65
+ } catch (err) {
66
+ iconUrl = this.getZ2mDeviceImage(device);
67
+ await this.downloadIcon(this.adapter, iconUrl, this.adapter.namespace);
68
+ }
69
+
65
70
  iconFileName = this.getFileNameWithExtension(iconUrl);
66
71
  }
67
72
 
package/main.js CHANGED
@@ -190,7 +190,7 @@ class Zigbee2mqtt extends core.Adapter {
190
190
  case 'bridge/info':
191
191
  if (showInfo) {
192
192
  zigbee2mqttInfo(messageObj.payload, this.log);
193
- checkConfig(messageObj.payload.config, this.log);
193
+ checkConfig(messageObj.payload.config, this.log, messageObj.payload.version);
194
194
  showInfo = false;
195
195
  }
196
196
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee2mqtt",
3
- "version": "2.13.10",
3
+ "version": "3.0.0",
4
4
  "description": "Zigbee2MQTT adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen and Arthur Rupp",
@@ -24,11 +24,11 @@
24
24
  "node": ">= 18"
25
25
  },
26
26
  "dependencies": {
27
- "@iobroker/adapter-core": "^3.1.6",
28
- "@iobroker/dm-utils": "^0.1.9",
27
+ "@iobroker/adapter-core": "^3.2.3",
28
+ "@iobroker/dm-utils": "^0.6.9",
29
29
  "aedes": "^0.51.3",
30
30
  "aedes-persistence-nedb": "^2.0.3",
31
- "mqtt": "^5.9.0",
31
+ "mqtt": "^5.10.3",
32
32
  "net": "^1.0.2",
33
33
  "node-schedule": "^2.1.1",
34
34
  "sharp": "^0.33.5",
@@ -43,24 +43,24 @@
43
43
  "@iobroker/testing": "^4.1.3",
44
44
  "@tsconfig/node14": "^14.1.2",
45
45
  "@types/chai": "^4.3.5",
46
- "@types/chai-as-promised": "^7.1.8",
47
- "@types/mocha": "^10.0.7",
48
- "@types/node": "^22.0.2",
46
+ "@types/chai-as-promised": "^8.0.1",
47
+ "@types/mocha": "^10.0.9",
48
+ "@types/node": "^22.10.3",
49
49
  "@types/node-schedule": "^2.1.7",
50
50
  "@types/proxyquire": "^1.3.31",
51
51
  "@types/sinon": "^17.0.3",
52
52
  "@types/sinon-chai": "^3.2.12",
53
53
  "chai": "^4.4.1",
54
- "chai-as-promised": "^7.1.1",
55
- "eslint": "^9.9.1",
54
+ "chai-as-promised": "^8.0.1",
55
+ "eslint": "^9.16.0",
56
56
  "eslint-config-prettier": "^9.1.0",
57
57
  "eslint-plugin-prettier": "^5.2.1",
58
- "mocha": "^10.5.2",
59
- "prettier": "^3.3.3",
58
+ "mocha": "^11.0.1",
59
+ "prettier": "^3.4.2",
60
60
  "proxyquire": "^2.1.3",
61
- "sinon": "^18.0.0",
61
+ "sinon": "^19.0.2",
62
62
  "sinon-chai": "^3.7.0",
63
- "typescript": "~5.5.4"
63
+ "typescript": "~5.7.2"
64
64
  },
65
65
  "main": "main.js",
66
66
  "files": [