iobroker.zigbee2mqtt 2.13.11 → 3.0.1
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 +1 -1
- package/README.md +7 -1
- package/admin/i18n/de/translations.json +4 -1
- package/admin/i18n/en/translations.json +3 -1
- package/admin/jsonConfig.json +1 -0
- package/io-package.json +51 -51
- package/lib/check.js +40 -32
- package/lib/deviceController.js +3 -3
- package/lib/imageController.js +44 -26
- package/main.js +1 -1
- package/package.json +12 -12
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
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.1 (2025-01-04)
|
|
26
|
+
- (arteck) corr icon download
|
|
27
|
+
|
|
28
|
+
### 3.0.0 (2025-01-04)
|
|
29
|
+
- (arteck) adaptation z2m 2.x
|
|
30
|
+
|
|
25
31
|
### 2.13.11 (2024-10-17)
|
|
26
32
|
- (arteck) corr package.json
|
|
27
33
|
|
|
@@ -254,7 +260,7 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
254
260
|
|
|
255
261
|
MIT License
|
|
256
262
|
|
|
257
|
-
Copyright (c)
|
|
263
|
+
Copyright (c) 2025 Arthur Rupp <arteck@outlook.com>,
|
|
258
264
|
|
|
259
265
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
260
266
|
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
|
}
|
package/admin/jsonConfig.json
CHANGED
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.0.1": {
|
|
7
|
+
"en": "corr icon download",
|
|
8
|
+
"de": "corr icon herunterladen",
|
|
9
|
+
"ru": "скачать значок",
|
|
10
|
+
"pt": "corrimento ícone download",
|
|
11
|
+
"nl": "corr pictogramdownload",
|
|
12
|
+
"fr": "corr icon télécharger",
|
|
13
|
+
"it": "icona corr scaricare",
|
|
14
|
+
"es": "corr icono descargar",
|
|
15
|
+
"pl": "pobierz ikonę corr",
|
|
16
|
+
"uk": "cкачати ігру corr",
|
|
17
|
+
"zh-cn": "corr 图标下载"
|
|
18
|
+
},
|
|
19
|
+
"3.0.0": {
|
|
20
|
+
"en": "adaptation z2m 2.x",
|
|
21
|
+
"de": "anpassung z2m 2.x",
|
|
22
|
+
"ru": "адаптация z2m 2.x",
|
|
23
|
+
"pt": "adaptação z2m 2.x",
|
|
24
|
+
"nl": "aanpassing z2m 2.x",
|
|
25
|
+
"fr": "adaptation z2m 2.x",
|
|
26
|
+
"it": "adattamento z2m 2.x",
|
|
27
|
+
"es": "adaptación z2m 2.x",
|
|
28
|
+
"pl": "adaptacja z2m 2.x",
|
|
29
|
+
"uk": "адаптація z2m 2.x",
|
|
30
|
+
"zh-cn": "适应z2m 2.x"
|
|
31
|
+
},
|
|
6
32
|
"2.13.11": {
|
|
7
33
|
"en": "corr package.json",
|
|
8
34
|
"de": "korr paket.json",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "zasadnicza zależność\naktualizacja zależności\nWłącz zawsze aktualizację obłożenia, jeśli jest prawdziwe",
|
|
68
94
|
"uk": "сердечник\nоновлення залежності\nУвімкнути можливість постійно оновлюватися, якщо правда",
|
|
69
95
|
"zh-cn": "核心依赖性\n更新依赖性\n启用若为真则总是更新占用"
|
|
70
|
-
},
|
|
71
|
-
"2.13.6": {
|
|
72
|
-
"en": "update dependecy",
|
|
73
|
-
"de": "aktualisierung abhängigkeit",
|
|
74
|
-
"ru": "обновление",
|
|
75
|
-
"pt": "atualização",
|
|
76
|
-
"nl": "afhankelijkheid bijwerken",
|
|
77
|
-
"fr": "mettre à jour la dépendance",
|
|
78
|
-
"it": "aggiornamento dipendenza",
|
|
79
|
-
"es": "dependencia de actualización",
|
|
80
|
-
"pl": "aktualizacja zależności",
|
|
81
|
-
"uk": "оновлення залежності",
|
|
82
|
-
"zh-cn": "更新依赖性"
|
|
83
|
-
},
|
|
84
|
-
"2.13.5": {
|
|
85
|
-
"en": "fixed mqttClient.end()",
|
|
86
|
-
"de": "mqttClient.end()",
|
|
87
|
-
"ru": "фиксированный mqtClient.end()",
|
|
88
|
-
"pt": "fixo mqttClient.end()",
|
|
89
|
-
"nl": "vaste mqttClient.end()",
|
|
90
|
-
"fr": "mqttClient.end() fixe",
|
|
91
|
-
"it": "fisso mqttClient.end()",
|
|
92
|
-
"es": "mqttClient.end()",
|
|
93
|
-
"pl": "stałe mqttClient.end ()",
|
|
94
|
-
"uk": "фіксований mqttClient.end()",
|
|
95
|
-
"zh-cn": "固定的 mqttClient.end ()"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"messages": [
|
|
@@ -100,35 +100,35 @@
|
|
|
100
100
|
"condition": {
|
|
101
101
|
"operand": "and",
|
|
102
102
|
"rules": [
|
|
103
|
-
"oldVersion
|
|
104
|
-
"newVersion>=
|
|
103
|
+
"oldVersion<=2.13.11",
|
|
104
|
+
"newVersion>=3.0.0"
|
|
105
105
|
]
|
|
106
106
|
},
|
|
107
107
|
"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": "重要的提醒!"
|
|
108
|
+
"en": "Important notice! zigbee2mqtt 2.0",
|
|
109
|
+
"de": "Wichtiger Hinweis! zigbee2mqtt 2.0",
|
|
110
|
+
"ru": "Важное замечание! zigbee2mqtt 2.0",
|
|
111
|
+
"pt": "Notícia importante! zigbee2mqtt 2.0",
|
|
112
|
+
"nl": "Belangrijke mededeling! zigbee2mqtt 2.0",
|
|
113
|
+
"fr": "Avis important! zigbee2mqtt 2.0",
|
|
114
|
+
"it": "Avviso IMPORTANTE! zigbee2mqtt 2.0",
|
|
115
|
+
"es": "¡Noticia importante! zigbee2mqtt 2.0",
|
|
116
|
+
"pl": "Ważna uwaga! zigbee2mqtt 2.0",
|
|
117
|
+
"uk": "Важливе повідомлення! zigbee2mqtt 2.0",
|
|
118
|
+
"zh-cn": "重要的提醒! zigbee2mqtt 2.0"
|
|
119
119
|
},
|
|
120
120
|
"text": {
|
|
121
|
-
"en": "
|
|
122
|
-
"de": "
|
|
123
|
-
"ru": "
|
|
124
|
-
"pt": "
|
|
125
|
-
"nl": "
|
|
126
|
-
"fr": "
|
|
127
|
-
"it": "
|
|
128
|
-
"es": "
|
|
129
|
-
"pl": "
|
|
130
|
-
"uk": "
|
|
131
|
-
"zh-cn": "
|
|
121
|
+
"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",
|
|
122
|
+
"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",
|
|
123
|
+
"ru": "проверьте уведомление zigbee2mqtt об изменениях\n (ссылка: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nгде некоторые объекты переименованы, и вам придется скорректировать свои скрипты",
|
|
124
|
+
"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",
|
|
125
|
+
"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",
|
|
126
|
+
"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.",
|
|
127
|
+
"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.",
|
|
128
|
+
"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.",
|
|
129
|
+
"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.",
|
|
130
|
+
"uk": "перевірте сповіщення zigbee2mqtt на наявність змін\n (посилання: https://github.com/Koenkk/zigbee2mqtt/discussions/24198). \nдеякі об'єкти перейменовано, і вам доведеться скоригувати свої скрипти",
|
|
131
|
+
"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
132
|
},
|
|
133
133
|
"level": "warn",
|
|
134
134
|
"buttons": [
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
log.error('
|
|
16
|
-
log.error('
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
|
package/lib/deviceController.js
CHANGED
|
@@ -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(
|
|
150
|
-
max: this.config.useKelvin == true ? utils.miredKelvinConversion(
|
|
151
|
-
def: this.config.useKelvin == true ? utils.miredKelvinConversion(
|
|
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);
|
package/lib/imageController.js
CHANGED
|
@@ -18,7 +18,7 @@ class ImageController {
|
|
|
18
18
|
return deviceName ? deviceNameString.replace(/\u0000/g, '') : 'NA';
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
getZ2mDeviceImageModelJPG(device) {
|
|
22
22
|
if (device && device.definition && device.definition.model) {
|
|
23
23
|
const icoString = `https://www.zigbee2mqtt.io/images/devices/${this.sanitizeZ2MDeviceName(device.definition.model)}.jpg`;
|
|
24
24
|
// eslint-disable-next-line no-control-regex
|
|
@@ -26,50 +26,58 @@ class ImageController {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
getZ2mDeviceImageModelPNG(device) {
|
|
30
|
+
if (device && device.definition && device.definition.model) {
|
|
31
|
+
const icoString = `https://www.zigbee2mqtt.io/images/devices/${this.sanitizeZ2MDeviceName(device.definition.model)}.png`;
|
|
32
|
+
// eslint-disable-next-line no-control-regex
|
|
33
|
+
return icoString.replace(/\u0000/g, '');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
29
38
|
getSlsDeviceImage(device) {
|
|
30
39
|
if (device && device.model_id) {
|
|
31
|
-
const icoString = `https://
|
|
40
|
+
const icoString = `https://www.zigbee2mqtt.io/images/devices/${this.sanitizeModelIDForImageUrl(device.model_id)}.png`;
|
|
32
41
|
// eslint-disable-next-line no-control-regex
|
|
33
42
|
return icoString.replace(/\u0000/g, '');
|
|
34
43
|
}
|
|
35
44
|
}
|
|
36
45
|
|
|
37
46
|
async getDeviceIcon(device) {
|
|
38
|
-
if (this.adapter.config.useDeviceIcons
|
|
39
|
-
return '';
|
|
40
|
-
}
|
|
47
|
+
if (!this.adapter.config.useDeviceIcons) return '';
|
|
41
48
|
|
|
42
|
-
const imageSize
|
|
49
|
+
const imageSize = this.adapter.config.deviceIconsSize;
|
|
43
50
|
|
|
44
|
-
const
|
|
51
|
+
const z2mIconFileNameJPG = `${this.sanitizeZ2MDeviceName(device.definition.model)}.jpg`;
|
|
52
|
+
const z2mIconFileNamePNG = `${this.sanitizeZ2MDeviceName(device.definition.model)}.png`;
|
|
45
53
|
const slsIconFileName = `${this.sanitizeModelIDForImageUrl(device.model_id)}.png`;
|
|
46
54
|
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
let iconFileName = await this.getExistingIconFileName(z2mIconFileNameJPG, z2mIconFileNamePNG, slsIconFileName);
|
|
56
|
+
|
|
57
|
+
if (!iconFileName) {
|
|
58
|
+
const iconUrls = [
|
|
59
|
+
this.getZ2mDeviceImageModelJPG(device),
|
|
60
|
+
this.getZ2mDeviceImageModelPNG(device),
|
|
61
|
+
this.getSlsDeviceImage(device)
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
for (const iconUrl of iconUrls) {
|
|
65
|
+
try {
|
|
66
|
+
await this.downloadIcon(this.adapter, iconUrl, this.adapter.namespace);
|
|
67
|
+
iconFileName = this.getFileNameWithExtension(iconUrl);
|
|
68
|
+
break;
|
|
69
|
+
} catch (err) {
|
|
70
|
+
this.adapter.log.warn(`Failed to download image from ${iconUrl}`);
|
|
71
|
+
}
|
|
62
72
|
}
|
|
63
|
-
this.adapter.log.info(`Download image for device model: ${device.definition.model}`);
|
|
64
|
-
await this.downloadIcon(this.adapter, iconUrl, this.adapter.namespace);
|
|
65
|
-
iconFileName = this.getFileNameWithExtension(iconUrl);
|
|
66
73
|
}
|
|
67
74
|
|
|
68
|
-
if (
|
|
75
|
+
if (!iconFileName) {
|
|
69
76
|
this.adapter.log.warn(`No image for device model: ${device.definition.model} found!`);
|
|
70
77
|
return '';
|
|
71
78
|
}
|
|
72
79
|
|
|
80
|
+
let icon;
|
|
73
81
|
try {
|
|
74
82
|
// Load image from the Meta-Store
|
|
75
83
|
icon = await this.adapter.readFileAsync(this.adapter.namespace, iconFileName);
|
|
@@ -117,6 +125,16 @@ class ImageController {
|
|
|
117
125
|
adapter.log.warn(ex);
|
|
118
126
|
}
|
|
119
127
|
}
|
|
128
|
+
async getExistingIconFileName(z2mIconFileNameJPG, z2mIconFileNamePNG, slsIconFileName) {
|
|
129
|
+
if (await this.adapter.fileExistsAsync(this.adapter.namespace, z2mIconFileNameJPG)) {
|
|
130
|
+
return z2mIconFileNameJPG;
|
|
131
|
+
} else if (await this.adapter.fileExistsAsync(this.adapter.namespace, z2mIconFileNamePNG)) {
|
|
132
|
+
return z2mIconFileNamePNG;
|
|
133
|
+
} else if (await this.adapter.fileExistsAsync(this.adapter.namespace, slsIconFileName)) {
|
|
134
|
+
return slsIconFileName;
|
|
135
|
+
}
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
120
138
|
}
|
|
121
139
|
module.exports = {
|
|
122
140
|
ImageController,
|
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": "
|
|
3
|
+
"version": "3.0.1",
|
|
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.2.
|
|
28
|
-
"@iobroker/dm-utils": "^0.
|
|
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.
|
|
31
|
+
"mqtt": "^5.10.3",
|
|
32
32
|
"net": "^1.0.2",
|
|
33
33
|
"node-schedule": "^2.1.1",
|
|
34
34
|
"sharp": "^0.33.5",
|
|
@@ -44,23 +44,23 @@
|
|
|
44
44
|
"@tsconfig/node14": "^14.1.2",
|
|
45
45
|
"@types/chai": "^4.3.5",
|
|
46
46
|
"@types/chai-as-promised": "^8.0.1",
|
|
47
|
-
"@types/mocha": "^10.0.
|
|
48
|
-
"@types/node": "^22.
|
|
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": "^8.0.
|
|
55
|
-
"eslint": "^9.
|
|
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": "^
|
|
59
|
-
"prettier": "^3.
|
|
58
|
+
"mocha": "^11.0.1",
|
|
59
|
+
"prettier": "^3.4.2",
|
|
60
60
|
"proxyquire": "^2.1.3",
|
|
61
|
-
"sinon": "^
|
|
61
|
+
"sinon": "^19.0.2",
|
|
62
62
|
"sinon-chai": "^3.7.0",
|
|
63
|
-
"typescript": "~5.
|
|
63
|
+
"typescript": "~5.7.2"
|
|
64
64
|
},
|
|
65
65
|
"main": "main.js",
|
|
66
66
|
"files": [
|