iobroker.zigbee2mqtt 2.13.11 → 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 +1 -1
- package/README.md +4 -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 +38 -51
- package/lib/check.js +40 -32
- package/lib/deviceController.js +3 -3
- package/lib/imageController.js +10 -5
- 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,9 @@ 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
|
+
|
|
25
28
|
### 2.13.11 (2024-10-17)
|
|
26
29
|
- (arteck) corr package.json
|
|
27
30
|
|
|
@@ -254,7 +257,7 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
254
257
|
|
|
255
258
|
MIT License
|
|
256
259
|
|
|
257
|
-
Copyright (c)
|
|
260
|
+
Copyright (c) 2025 Arthur Rupp <arteck@outlook.com>,
|
|
258
261
|
|
|
259
262
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
260
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
|
}
|
package/admin/jsonConfig.json
CHANGED
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "
|
|
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
|
+
},
|
|
6
19
|
"2.13.11": {
|
|
7
20
|
"en": "corr package.json",
|
|
8
21
|
"de": "korr paket.json",
|
|
@@ -67,32 +80,6 @@
|
|
|
67
80
|
"pl": "zasadnicza zależność\naktualizacja zależności\nWłącz zawsze aktualizację obłożenia, jeśli jest prawdziwe",
|
|
68
81
|
"uk": "сердечник\nоновлення залежності\nУвімкнути можливість постійно оновлюватися, якщо правда",
|
|
69
82
|
"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
83
|
}
|
|
97
84
|
},
|
|
98
85
|
"messages": [
|
|
@@ -100,35 +87,35 @@
|
|
|
100
87
|
"condition": {
|
|
101
88
|
"operand": "and",
|
|
102
89
|
"rules": [
|
|
103
|
-
"oldVersion
|
|
104
|
-
"newVersion>=
|
|
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": "
|
|
122
|
-
"de": "
|
|
123
|
-
"ru": "
|
|
124
|
-
"pt": "
|
|
125
|
-
"nl": "
|
|
126
|
-
"fr": "
|
|
127
|
-
"it": "
|
|
128
|
-
"es": "
|
|
129
|
-
"pl": "
|
|
130
|
-
"uk": "
|
|
131
|
-
"zh-cn": "
|
|
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": [
|
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
|
@@ -56,12 +56,17 @@ class ImageController {
|
|
|
56
56
|
}
|
|
57
57
|
// If not donwload image
|
|
58
58
|
else {
|
|
59
|
-
let iconUrl = this.
|
|
60
|
-
|
|
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
|
-
|
|
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": "
|
|
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.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": [
|