iobroker.js-controller 4.0.17 → 4.0.20
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/conf/sources-dist.json +14 -14
- package/io-package.json +13 -13
- package/lib/setup/setupBackup.js +22 -8
- package/lib/setup/setupInstall.js +1 -1
- package/lib/setup/setupUpload.js +5 -5
- package/main.js +6 -2
- package/package.json +12 -12
package/conf/sources-dist.json
CHANGED
|
@@ -597,7 +597,7 @@
|
|
|
597
597
|
"meta": "https://raw.githubusercontent.com/PLCHome/ioBroker.growatt/master/io-package.json",
|
|
598
598
|
"icon": "https://raw.githubusercontent.com/PLCHome/ioBroker.growatt/master/admin/growatt.png",
|
|
599
599
|
"type": "energy",
|
|
600
|
-
"version": "1.1.
|
|
600
|
+
"version": "1.1.8"
|
|
601
601
|
},
|
|
602
602
|
"gruenbeck": {
|
|
603
603
|
"meta": "https://raw.githubusercontent.com/TA2k/ioBroker.gruenbeck/master/io-package.json",
|
|
@@ -831,7 +831,7 @@
|
|
|
831
831
|
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.influxdb/master/io-package.json",
|
|
832
832
|
"icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.influxdb/master/admin/influxdb.png",
|
|
833
833
|
"type": "storage",
|
|
834
|
-
"version": "
|
|
834
|
+
"version": "2.6.3"
|
|
835
835
|
},
|
|
836
836
|
"info": {
|
|
837
837
|
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.info/master/io-package.json",
|
|
@@ -890,7 +890,7 @@
|
|
|
890
890
|
"js-controller": {
|
|
891
891
|
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/master/packages/controller/io-package.json",
|
|
892
892
|
"type": "general",
|
|
893
|
-
"version": "4.0.
|
|
893
|
+
"version": "4.0.19"
|
|
894
894
|
},
|
|
895
895
|
"kecontact": {
|
|
896
896
|
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.kecontact/master/io-package.json",
|
|
@@ -932,7 +932,7 @@
|
|
|
932
932
|
"meta": "https://raw.githubusercontent.com/hombach/ioBroker.kostal-piko-ba/master/io-package.json",
|
|
933
933
|
"icon": "https://raw.githubusercontent.com/hombach/ioBroker.kostal-piko-ba/master/admin/picoba.png",
|
|
934
934
|
"type": "energy",
|
|
935
|
-
"version": "1.2
|
|
935
|
+
"version": "1.4.2"
|
|
936
936
|
},
|
|
937
937
|
"lametric": {
|
|
938
938
|
"meta": "https://raw.githubusercontent.com/klein0r/ioBroker.lametric/master/io-package.json",
|
|
@@ -1064,7 +1064,7 @@
|
|
|
1064
1064
|
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.luxtronik1/master/io-package.json",
|
|
1065
1065
|
"icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.luxtronik1/master/admin/luxtronik1.png",
|
|
1066
1066
|
"type": "climate-control",
|
|
1067
|
-
"version": "0.3.
|
|
1067
|
+
"version": "0.3.5"
|
|
1068
1068
|
},
|
|
1069
1069
|
"material": {
|
|
1070
1070
|
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.material/master/io-package.json",
|
|
@@ -1298,7 +1298,7 @@
|
|
|
1298
1298
|
"meta": "https://raw.githubusercontent.com/Bart1909/ioBroker.netatmo-crawler/master/io-package.json",
|
|
1299
1299
|
"icon": "https://raw.githubusercontent.com/Bart1909/ioBroker.netatmo-crawler/master/admin/netatmo-crawler.png",
|
|
1300
1300
|
"type": "weather",
|
|
1301
|
-
"version": "0.
|
|
1301
|
+
"version": "0.8.1"
|
|
1302
1302
|
},
|
|
1303
1303
|
"netatmo-energy": {
|
|
1304
1304
|
"meta": "https://raw.githubusercontent.com/Homemade-Disaster/ioBroker.netatmo-energy/master/io-package.json",
|
|
@@ -1400,7 +1400,7 @@
|
|
|
1400
1400
|
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.openknx/master/io-package.json",
|
|
1401
1401
|
"icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.openknx/master/admin/openknx.png",
|
|
1402
1402
|
"type": "iot-systems",
|
|
1403
|
-
"version": "0.1.
|
|
1403
|
+
"version": "0.1.22"
|
|
1404
1404
|
},
|
|
1405
1405
|
"openligadb": {
|
|
1406
1406
|
"meta": "https://raw.githubusercontent.com/oweitman/ioBroker.openligadb/master/io-package.json",
|
|
@@ -1706,7 +1706,7 @@
|
|
|
1706
1706
|
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.shelly/master/io-package.json",
|
|
1707
1707
|
"icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.shelly/master/admin/shelly.png",
|
|
1708
1708
|
"type": "iot-systems",
|
|
1709
|
-
"version": "
|
|
1709
|
+
"version": "5.3.2"
|
|
1710
1710
|
},
|
|
1711
1711
|
"shuttercontrol": {
|
|
1712
1712
|
"meta": "https://raw.githubusercontent.com/simatec/ioBroker.shuttercontrol/master/io-package.json",
|
|
@@ -1802,7 +1802,7 @@
|
|
|
1802
1802
|
"meta": "https://raw.githubusercontent.com/afuerhoff/ioBroker.solarviewdatareader/master/io-package.json",
|
|
1803
1803
|
"icon": "https://raw.githubusercontent.com/afuerhoff/ioBroker.solarviewdatareader/master/admin/solarviewdatareader.png",
|
|
1804
1804
|
"type": "energy",
|
|
1805
|
-
"version": "1.0.
|
|
1805
|
+
"version": "1.0.5"
|
|
1806
1806
|
},
|
|
1807
1807
|
"solarwetter": {
|
|
1808
1808
|
"meta": "https://raw.githubusercontent.com/Pix---/ioBroker.solarwetter/master/io-package.json",
|
|
@@ -2243,8 +2243,8 @@
|
|
|
2243
2243
|
"version": "0.1.2"
|
|
2244
2244
|
},
|
|
2245
2245
|
"weatherunderground": {
|
|
2246
|
-
"meta": "https://raw.githubusercontent.com/
|
|
2247
|
-
"icon": "https://raw.githubusercontent.com/
|
|
2246
|
+
"meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.weatherunderground/master/io-package.json",
|
|
2247
|
+
"icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.weatherunderground/master/admin/wu.png",
|
|
2248
2248
|
"type": "weather",
|
|
2249
2249
|
"version": "3.3.1"
|
|
2250
2250
|
},
|
|
@@ -2336,7 +2336,7 @@
|
|
|
2336
2336
|
"meta": "https://raw.githubusercontent.com/foxriver76/ioBroker.xbox/master/io-package.json",
|
|
2337
2337
|
"icon": "https://raw.githubusercontent.com/foxriver76/ioBroker.xbox/master/admin/xbox.png",
|
|
2338
2338
|
"type": "multimedia",
|
|
2339
|
-
"version": "0.7.
|
|
2339
|
+
"version": "0.7.8"
|
|
2340
2340
|
},
|
|
2341
2341
|
"xs1": {
|
|
2342
2342
|
"meta": "https://raw.githubusercontent.com/frankjoke/ioBroker.xs1/master/io-package.json",
|
|
@@ -2372,7 +2372,7 @@
|
|
|
2372
2372
|
"meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.yr/master/io-package.json",
|
|
2373
2373
|
"icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.yr/master/admin/yr.png",
|
|
2374
2374
|
"type": "weather",
|
|
2375
|
-
"version": "5.
|
|
2375
|
+
"version": "5.1.2"
|
|
2376
2376
|
},
|
|
2377
2377
|
"zehnder-cloud": {
|
|
2378
2378
|
"meta": "https://raw.githubusercontent.com/TA2k/ioBroker.zehnder-cloud/master/io-package.json",
|
|
@@ -2398,4 +2398,4 @@
|
|
|
2398
2398
|
"type": "hardware",
|
|
2399
2399
|
"version": "2.4.3"
|
|
2400
2400
|
}
|
|
2401
|
-
}
|
|
2401
|
+
}
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "js-controller",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.20",
|
|
5
5
|
"platform": "Javascript/Node.js",
|
|
6
6
|
"controller": true,
|
|
7
7
|
"mode": "daemon",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"zh-cn": "JS控制器"
|
|
20
20
|
},
|
|
21
21
|
"news": {
|
|
22
|
-
"4.0.
|
|
23
|
-
"en": "
|
|
24
|
-
"de": "
|
|
25
|
-
"ru": "
|
|
26
|
-
"pt": "
|
|
27
|
-
"nl": "
|
|
28
|
-
"fr": "
|
|
29
|
-
"it": "
|
|
30
|
-
"es": "
|
|
31
|
-
"pl": "
|
|
32
|
-
"zh-cn": "
|
|
22
|
+
"4.0.20": {
|
|
23
|
+
"en": "Add missing axios dependency\nOnly log an error if an error is happening when activating/deactivating adapter via .alive states\nFix edge case in redis simulator MULTI/EXEC logic\nPrevent some crash cases reported by Sentry",
|
|
24
|
+
"de": "Fehlende Axios-Abhängigkeit hinzugefügt\nProtokollieren Sie nur dann einen Fehler, wenn beim Aktivieren/Deaktivieren des Adapters über .alive-Zustände ein Fehler auftritt\nGrenzfall in der MULTI/EXEC-Logik des Redis-Simulators behoben\nVerhindern Sie einige von Sentry gemeldete Absturzfälle",
|
|
25
|
+
"ru": "Добавить отсутствующую зависимость axios\nРегистрировать ошибку только в том случае, если ошибка возникает при активации/деактивации адаптера через состояния .alive.\nИсправить пограничный случай в логике MULTI/EXEC симулятора Redis.\nПредотвращение некоторых случаев сбоев, о которых сообщает Sentry.",
|
|
26
|
+
"pt": "Adicionar dependência de axios ausente\nApenas registre um erro se ocorrer um erro ao ativar/desativar o adaptador por meio de estados .alive\nCorrigir caso de borda na lógica MULTI/EXEC do simulador redis\nPrevenir alguns casos de travamento relatados pelo Sentinela",
|
|
27
|
+
"nl": "Ontbrekende axios-afhankelijkheid toevoegen\nLog alleen een fout in als er een fout optreedt bij het activeren/deactiveren van de adapter via .alive states\nRandgeval repareren in redis-simulator MULTI/EXEC-logica\nVoorkom enkele door Sentry gemelde crashgevallen",
|
|
28
|
+
"fr": "Ajouter la dépendance axios manquante\nEnregistrez une erreur uniquement si une erreur se produit lors de l'activation/de la désactivation de l'adaptateur via les états .alive\nCorrection du cas limite dans la logique MULTI/EXEC du simulateur redis\nEmpêcher certains cas de plantage signalés par Sentry",
|
|
29
|
+
"it": "Aggiungi la dipendenza assio mancante\nRegistra un errore solo se si verifica un errore durante l'attivazione/disattivazione dell'adattatore tramite stati .alive\nRisolto il problema con il caso limite nella logica MULTI/EXEC del simulatore Redis\nPrevenire alcuni casi di crash segnalati da Sentry",
|
|
30
|
+
"es": "Agregar la dependencia de axios faltante\nSolo registre un error si ocurre un error al activar/desactivar el adaptador a través de estados .alive\nArreglar el caso de borde en la lógica MULTI / EXEC del simulador redis\nEvitar algunos casos de bloqueo informados por Sentry",
|
|
31
|
+
"pl": "Dodaj brakującą zależność axios\nZapisuj błąd tylko wtedy, gdy wystąpi błąd podczas aktywacji/dezaktywacji adaptera przez stany .alive\nNapraw obudowę krawędziową w symulatorze redis, logika MULTI/EXEC\nZapobiegaj niektórym przypadkom awarii zgłaszanych przez Sentry",
|
|
32
|
+
"zh-cn": "添加缺少的 axios 依赖项\n只有在通过 .alive 状态激活/停用适配器时发生错误时才记录错误\n修复 redis 模拟器 MULTI/EXEC 逻辑中的边缘情况\n防止 Sentry 报告的一些崩溃案例"
|
|
33
33
|
},
|
|
34
|
-
"4.0.
|
|
34
|
+
"4.0.19": {
|
|
35
35
|
"en": "see CHANGELOG.md",
|
|
36
36
|
"de": "siehe CHANGELOG.md",
|
|
37
37
|
"ru": "см. CHANGELOG.md",
|
package/lib/setup/setupBackup.js
CHANGED
|
@@ -125,14 +125,18 @@ class BackupRestore {
|
|
|
125
125
|
copyFileSync(source, target) {
|
|
126
126
|
let targetFile = target;
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (fs.
|
|
131
|
-
|
|
128
|
+
try {
|
|
129
|
+
// if target is a directory a new file with the same name will be created
|
|
130
|
+
if (fs.existsSync(target)) {
|
|
131
|
+
if (fs.statSync(target).isDirectory()) {
|
|
132
|
+
targetFile = pathLib.join(target, pathLib.basename(source));
|
|
133
|
+
}
|
|
132
134
|
}
|
|
133
|
-
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
fs.writeFileSync(targetFile, fs.readFileSync(source));
|
|
137
|
+
} catch (e) {
|
|
138
|
+
console.error(`Could not copy ${targetFile} to ${source}: ${e.message}`);
|
|
139
|
+
}
|
|
136
140
|
}
|
|
137
141
|
|
|
138
142
|
copyFolderRecursiveSync(source, target) {
|
|
@@ -149,10 +153,13 @@ class BackupRestore {
|
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
// copy
|
|
152
|
-
if (fs.statSync(source).isDirectory()) {
|
|
156
|
+
if (fs.existsSync(source) && fs.statSync(source).isDirectory()) {
|
|
153
157
|
files = fs.readdirSync(source);
|
|
154
158
|
files.forEach(file => {
|
|
155
159
|
const curSource = pathLib.join(source, file);
|
|
160
|
+
if (!fs.existsSync(curSource)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
156
163
|
if (fs.statSync(curSource).isDirectory()) {
|
|
157
164
|
this.copyFolderRecursiveSync(curSource, targetFolder);
|
|
158
165
|
} else {
|
|
@@ -600,7 +607,11 @@ class BackupRestore {
|
|
|
600
607
|
}
|
|
601
608
|
const files = fs.readdirSync(root + path);
|
|
602
609
|
for (const file of files) {
|
|
603
|
-
const
|
|
610
|
+
const fName = path.join(root, path, file);
|
|
611
|
+
if (!fs.existsSync(fName)) {
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
const stat = fs.statSync(fName);
|
|
604
615
|
if (stat.isDirectory()) {
|
|
605
616
|
try {
|
|
606
617
|
await this._uploadUserFiles(root, `${path}/${file}`);
|
|
@@ -634,6 +645,9 @@ class BackupRestore {
|
|
|
634
645
|
return;
|
|
635
646
|
}
|
|
636
647
|
const path = pathLib.join(backupDir, dir);
|
|
648
|
+
if (!fs.existsSync(path)) {
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
637
651
|
const stat = fs.statSync(path);
|
|
638
652
|
if (stat.isDirectory()) {
|
|
639
653
|
this.copyFolderRecursiveSync(path, this.configDir);
|
|
@@ -1574,7 +1574,7 @@ function Install(options) {
|
|
|
1574
1574
|
/* ignore, not a valid URL */
|
|
1575
1575
|
}
|
|
1576
1576
|
|
|
1577
|
-
const debug = process.
|
|
1577
|
+
const debug = process.argv.includes('--debug');
|
|
1578
1578
|
|
|
1579
1579
|
if (parsedUrl && parsedUrl.hostname === 'github.com') {
|
|
1580
1580
|
if (!tools.isGithubPathname(parsedUrl.pathname)) {
|
package/lib/setup/setupUpload.js
CHANGED
|
@@ -90,10 +90,10 @@ function Upload(options) {
|
|
|
90
90
|
|
|
91
91
|
if (adapterConf.common.restartAdapters.length && adapterConf.common.restartAdapters[0]) {
|
|
92
92
|
const instances = await tools.getAllInstances(adapterConf.common.restartAdapters, objects);
|
|
93
|
-
if (instances &&
|
|
94
|
-
for (
|
|
93
|
+
if (instances && instances.length) {
|
|
94
|
+
for (const instance of instances) {
|
|
95
95
|
try {
|
|
96
|
-
const obj = await objects.getObjectAsync(
|
|
96
|
+
const obj = await objects.getObjectAsync(instance);
|
|
97
97
|
// if instance is enabled
|
|
98
98
|
if (obj && obj.common && obj.common.enabled) {
|
|
99
99
|
obj.common.enabled = false; // disable instance
|
|
@@ -101,7 +101,7 @@ function Upload(options) {
|
|
|
101
101
|
obj.from = `system.host.${tools.getHostName()}.cli`;
|
|
102
102
|
obj.ts = Date.now();
|
|
103
103
|
|
|
104
|
-
await objects.setObjectAsync(obj._id);
|
|
104
|
+
await objects.setObjectAsync(obj._id, obj);
|
|
105
105
|
|
|
106
106
|
obj.common.enabled = true; // enable instance
|
|
107
107
|
obj.ts = Date.now();
|
|
@@ -110,7 +110,7 @@ function Upload(options) {
|
|
|
110
110
|
console.log(`Adapter "${obj._id}" restarted.`);
|
|
111
111
|
}
|
|
112
112
|
} catch (err) {
|
|
113
|
-
console.error(`Cannot restart adapter "${
|
|
113
|
+
console.error(`Cannot restart adapter "${instance}": ${err.message}`);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
package/main.js
CHANGED
|
@@ -408,8 +408,10 @@ function createStates(onConnect) {
|
|
|
408
408
|
);
|
|
409
409
|
obj.from = hostObjectPrefix;
|
|
410
410
|
obj.ts = Date.now();
|
|
411
|
-
objects.setObject(
|
|
412
|
-
|
|
411
|
+
objects.setObject(
|
|
412
|
+
obj._id,
|
|
413
|
+
obj,
|
|
414
|
+
err => err && logger.error(`${hostLogPrefix} Cannot set object: ${err}`)
|
|
413
415
|
);
|
|
414
416
|
}
|
|
415
417
|
}
|
|
@@ -1464,6 +1466,8 @@ function setIPs(ipList) {
|
|
|
1464
1466
|
!err &&
|
|
1465
1467
|
oldObj &&
|
|
1466
1468
|
oldObj.common &&
|
|
1469
|
+
oldObj.native &&
|
|
1470
|
+
oldObj.native.hardware &&
|
|
1467
1471
|
(!isDeepStrictEqual(oldObj.native.hardware.networkInterfaces, networkInterfaces) ||
|
|
1468
1472
|
!isDeepStrictEqual(oldObj.common.address, _ipList))
|
|
1469
1473
|
) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.js-controller",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.20",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@alcalzone/esbuild-register": "^2.5.1-1",
|
|
20
|
-
"@iobroker/db-objects-file": "4.0.
|
|
21
|
-
"@iobroker/db-objects-jsonl": "4.0.
|
|
22
|
-
"@iobroker/db-objects-redis": "4.0.
|
|
23
|
-
"@iobroker/db-states-file": "4.0.
|
|
24
|
-
"@iobroker/db-states-jsonl": "4.0.
|
|
25
|
-
"@iobroker/db-states-redis": "4.0.
|
|
26
|
-
"@iobroker/js-controller-adapter": "4.0.
|
|
27
|
-
"@iobroker/js-controller-cli": "4.0.
|
|
28
|
-
"@iobroker/js-controller-common": "4.0.
|
|
29
|
-
"@iobroker/js-controller-common-db": "4.0.
|
|
20
|
+
"@iobroker/db-objects-file": "4.0.20",
|
|
21
|
+
"@iobroker/db-objects-jsonl": "4.0.20",
|
|
22
|
+
"@iobroker/db-objects-redis": "4.0.20",
|
|
23
|
+
"@iobroker/db-states-file": "4.0.20",
|
|
24
|
+
"@iobroker/db-states-jsonl": "4.0.20",
|
|
25
|
+
"@iobroker/db-states-redis": "4.0.20",
|
|
26
|
+
"@iobroker/js-controller-adapter": "4.0.20",
|
|
27
|
+
"@iobroker/js-controller-cli": "4.0.20",
|
|
28
|
+
"@iobroker/js-controller-common": "4.0.20",
|
|
29
|
+
"@iobroker/js-controller-common-db": "4.0.20",
|
|
30
30
|
"@iobroker/plugin-base": "~1.2.1",
|
|
31
31
|
"@iobroker/plugin-sentry": "~1.2.0",
|
|
32
32
|
"axios": "^0.24.0",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"iobroker.js",
|
|
113
113
|
"main.js"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "0606f3e50755e0e963678dbeecfa11084538b009"
|
|
116
116
|
}
|