iobroker.js-controller 4.0.9 → 4.0.12

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.
@@ -33,7 +33,7 @@
33
33
  "meta": "https://raw.githubusercontent.com/weggetor/ioBroker.airconwithme/main/io-package.json",
34
34
  "icon": "https://raw.githubusercontent.com/weggetor/ioBroker.airconwithme/main/admin/airconwithme.png",
35
35
  "type": "climate-control",
36
- "version": "0.0.3"
36
+ "version": "0.0.4"
37
37
  },
38
38
  "airzone": {
39
39
  "meta": "https://raw.githubusercontent.com/SilentPhoenix11/ioBroker.airzone/master/io-package.json",
@@ -45,7 +45,7 @@
45
45
  "meta": "https://raw.githubusercontent.com/misanorot/ioBroker.alarm/master/io-package.json",
46
46
  "icon": "https://raw.githubusercontent.com/misanorot/ioBroker.alarm/master/admin/alarm.png",
47
47
  "type": "alarm",
48
- "version": "2.2.1"
48
+ "version": "3.0.5"
49
49
  },
50
50
  "alexa2": {
51
51
  "meta": "https://raw.githubusercontent.com/Apollon77/ioBroker.alexa2/master/io-package.json",
@@ -137,12 +137,24 @@
137
137
  "type": "misc-data",
138
138
  "version": "1.1.3"
139
139
  },
140
+ "birthdays": {
141
+ "meta": "https://raw.githubusercontent.com/klein0r/ioBroker.birthdays/master/io-package.json",
142
+ "icon": "https://raw.githubusercontent.com/klein0r/ioBroker.birthdays/master/admin/birthdays.png",
143
+ "type": "date-and-time",
144
+ "version": "1.0.0"
145
+ },
140
146
  "ble": {
141
147
  "meta": "https://raw.githubusercontent.com/AlCalzone/ioBroker.ble/master/io-package.json",
142
148
  "icon": "https://raw.githubusercontent.com/AlCalzone/ioBroker.ble/master/admin/ble.png",
143
149
  "type": "hardware",
144
150
  "version": "0.12.0"
145
151
  },
152
+ "blebox": {
153
+ "meta": "https://raw.githubusercontent.com/ka-vaNu/ioBroker.blebox/master/io-package.json",
154
+ "icon": "https://raw.githubusercontent.com/ka-vaNu/ioBroker.blebox/master/admin/blebox.png",
155
+ "type": "iot-systems",
156
+ "version": "1.0.0"
157
+ },
146
158
  "bluelink": {
147
159
  "meta": "https://raw.githubusercontent.com/Newan/ioBroker.bluelink/master/io-package.json",
148
160
  "icon": "https://raw.githubusercontent.com/Newan/ioBroker.bluelink/master/admin/bluelink.png",
@@ -486,8 +498,8 @@
486
498
  "version": "1.10.7"
487
499
  },
488
500
  "followthesun": {
489
- "meta": "https://raw.githubusercontent.com/HGlab01/ioBroker.followthesun/master/io-package.json",
490
- "icon": "https://raw.githubusercontent.com/HGlab01/ioBroker.followthesun/master/admin/followthesun.png",
501
+ "meta": "https://raw.githubusercontent.com/HGlab01/ioBroker.followthesun/main/io-package.json",
502
+ "icon": "https://raw.githubusercontent.com/HGlab01/ioBroker.followthesun/main/admin/followthesun.png",
491
503
  "type": "geoposition",
492
504
  "version": "0.3.8"
493
505
  },
@@ -534,8 +546,8 @@
534
546
  "version": "0.0.10"
535
547
  },
536
548
  "fuelpricemonitor": {
537
- "meta": "https://raw.githubusercontent.com/HGlab01/ioBroker.fuelpricemonitor/master/io-package.json",
538
- "icon": "https://raw.githubusercontent.com/HGlab01/ioBroker.fuelpricemonitor/master/admin/fuelpricemonitor.png",
549
+ "meta": "https://raw.githubusercontent.com/HGlab01/ioBroker.fuelpricemonitor/main/io-package.json",
550
+ "icon": "https://raw.githubusercontent.com/HGlab01/ioBroker.fuelpricemonitor/main/admin/fuelpricemonitor.png",
539
551
  "type": "vehicle",
540
552
  "version": "0.2.9"
541
553
  },
@@ -543,7 +555,7 @@
543
555
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.fullcalendar/master/io-package.json",
544
556
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.fullcalendar/master/admin/fullcalendar.png",
545
557
  "type": "date-and-time",
546
- "version": "1.1.0"
558
+ "version": "1.2.0"
547
559
  },
548
560
  "fullybrowser": {
549
561
  "meta": "https://raw.githubusercontent.com/arteck/ioBroker.fullybrowser/master/io-package.json",
@@ -573,7 +585,7 @@
573
585
  "meta": "https://raw.githubusercontent.com/PLCHome/ioBroker.growatt/master/io-package.json",
574
586
  "icon": "https://raw.githubusercontent.com/PLCHome/ioBroker.growatt/master/admin/growatt.png",
575
587
  "type": "energy",
576
- "version": "1.1.1"
588
+ "version": "1.1.7"
577
589
  },
578
590
  "gruenbeck": {
579
591
  "meta": "https://raw.githubusercontent.com/TA2k/ioBroker.gruenbeck/master/io-package.json",
@@ -663,7 +675,7 @@
663
675
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.history/master/io-package.json",
664
676
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.history/master/admin/history.png",
665
677
  "type": "storage",
666
- "version": "1.9.14"
678
+ "version": "1.10.5"
667
679
  },
668
680
  "hm-rega": {
669
681
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.hm-rega/master/io-package.json",
@@ -699,7 +711,7 @@
699
711
  "meta": "https://raw.githubusercontent.com/Apollon77/ioBroker.homekit-controller/main/io-package.json",
700
712
  "icon": "https://raw.githubusercontent.com/Apollon77/ioBroker.homekit-controller/main/admin/homekit-controller.png",
701
713
  "type": "iot-systems",
702
- "version": "0.3.3"
714
+ "version": "0.4.3"
703
715
  },
704
716
  "homepilot": {
705
717
  "meta": "https://raw.githubusercontent.com/Pix---/ioBroker.homepilot/master/io-package.json",
@@ -731,6 +743,12 @@
731
743
  "type": "lighting",
732
744
  "version": "2.0.0"
733
745
  },
746
+ "huum-sauna": {
747
+ "meta": "https://raw.githubusercontent.com/Chris-1965/ioBroker.huum-sauna/main/package.json",
748
+ "icon": "https://raw.githubusercontent.com/Chris-1965/ioBroker.huum-sauna/main/admin/huum-sauna.png",
749
+ "type": "climate-control",
750
+ "version": "0.3.0"
751
+ },
734
752
  "i2c": {
735
753
  "meta": "https://raw.githubusercontent.com/UncleSamSwiss/ioBroker.i2c/master/io-package.json",
736
754
  "icon": "https://raw.githubusercontent.com/UncleSamSwiss/ioBroker.i2c/master/admin/i2c.png",
@@ -849,7 +867,7 @@
849
867
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.javascript/master/io-package.json",
850
868
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.javascript/master/admin/javascript.png",
851
869
  "type": "logic",
852
- "version": "5.2.13"
870
+ "version": "5.2.21"
853
871
  },
854
872
  "jeelink": {
855
873
  "meta": "https://raw.githubusercontent.com/foxthefox/ioBroker.jeelink/master/io-package.json",
@@ -1040,7 +1058,7 @@
1040
1058
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.material/master/io-package.json",
1041
1059
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.material/master/admin/material.png",
1042
1060
  "type": "visualization",
1043
- "version": "1.0.4"
1061
+ "version": "1.1.2"
1044
1062
  },
1045
1063
  "maveo": {
1046
1064
  "meta": "https://raw.githubusercontent.com/TA2k/ioBroker.maveo/master/io-package.json",
@@ -1112,7 +1130,7 @@
1112
1130
  "meta": "https://raw.githubusercontent.com/Apollon77/ioBroker.meross/master/io-package.json",
1113
1131
  "icon": "https://raw.githubusercontent.com/Apollon77/ioBroker.meross/master/admin/meross.png",
1114
1132
  "type": "iot-systems",
1115
- "version": "1.7.1"
1133
+ "version": "1.10.1"
1116
1134
  },
1117
1135
  "meteoalarm": {
1118
1136
  "meta": "https://raw.githubusercontent.com/jack-blackson/ioBroker.meteoalarm/master/io-package.json",
@@ -1196,7 +1214,7 @@
1196
1214
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.modbus/master/io-package.json",
1197
1215
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.modbus/master/admin/modbus.png",
1198
1216
  "type": "protocols",
1199
- "version": "3.4.14"
1217
+ "version": "3.4.17"
1200
1218
  },
1201
1219
  "moma": {
1202
1220
  "meta": "https://raw.githubusercontent.com/AWhiteKnight/ioBroker.moma/master/io-package.json",
@@ -1214,13 +1232,13 @@
1214
1232
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.mqtt/master/io-package.json",
1215
1233
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.mqtt/master/admin/mqtt.png",
1216
1234
  "type": "protocols",
1217
- "version": "2.4.0"
1235
+ "version": "2.4.1"
1218
1236
  },
1219
1237
  "mqtt-client": {
1220
1238
  "meta": "https://raw.githubusercontent.com/Pmant/ioBroker.mqtt-client/master/io-package.json",
1221
1239
  "icon": "https://raw.githubusercontent.com/Pmant/ioBroker.mqtt-client/master/admin/mqtt-client.png",
1222
1240
  "type": "protocols",
1223
- "version": "1.4.0"
1241
+ "version": "1.5.0"
1224
1242
  },
1225
1243
  "musiccast": {
1226
1244
  "meta": "https://raw.githubusercontent.com/foxthefox/ioBroker.musiccast/master/io-package.json",
@@ -1238,7 +1256,7 @@
1238
1256
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.mysensors/master/io-package.json",
1239
1257
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.mysensors/master/admin/mysensors.png",
1240
1258
  "type": "iot-systems",
1241
- "version": "2.0.1"
1259
+ "version": "2.0.3"
1242
1260
  },
1243
1261
  "mystrom": {
1244
1262
  "meta": "https://raw.githubusercontent.com/TA2k/ioBroker.mystrom/master/io-package.json",
@@ -1270,6 +1288,12 @@
1270
1288
  "type": "weather",
1271
1289
  "version": "0.6.0"
1272
1290
  },
1291
+ "netatmo-energy": {
1292
+ "meta": "https://raw.githubusercontent.com/Homemade-Disaster/ioBroker.netatmo-energy/master/io-package.json",
1293
+ "icon": "https://raw.githubusercontent.com/Homemade-Disaster/ioBroker.netatmo-energy/master/admin/netatmo-energy.png",
1294
+ "type": "climate-control",
1295
+ "version": "0.2.4"
1296
+ },
1273
1297
  "nibeuplink": {
1274
1298
  "meta": "https://raw.githubusercontent.com/sebilm/ioBroker.nibeuplink/master/io-package.json",
1275
1299
  "icon": "https://raw.githubusercontent.com/sebilm/ioBroker.nibeuplink/master/admin/nibeuplink.png",
@@ -1340,7 +1364,7 @@
1340
1364
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.onkyo/master/io-package.json",
1341
1365
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.onkyo/master/admin/onkyo.png",
1342
1366
  "type": "multimedia",
1343
- "version": "2.1.0"
1367
+ "version": "2.1.1"
1344
1368
  },
1345
1369
  "onvif": {
1346
1370
  "meta": "https://raw.githubusercontent.com/Haba1234/ioBroker.onvif/master/io-package.json",
@@ -1592,7 +1616,7 @@
1592
1616
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.s7/master/io-package.json",
1593
1617
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.s7/master/admin/s7.png",
1594
1618
  "type": "iot-systems",
1595
- "version": "1.3.6"
1619
+ "version": "1.3.10"
1596
1620
  },
1597
1621
  "sainlogic": {
1598
1622
  "meta": "https://raw.githubusercontent.com/phifogg/ioBroker.sainlogic/master/io-package.json",
@@ -1678,11 +1702,17 @@
1678
1702
  "type": "climate-control",
1679
1703
  "version": "1.1.1"
1680
1704
  },
1705
+ "signal-cmb": {
1706
+ "meta": "https://raw.githubusercontent.com/necotec/ioBroker.signal-cmb/master/io-package.json",
1707
+ "icon": "https://raw.githubusercontent.com/necotec/ioBroker.signal-cmb/master/admin/signal-cmb.png",
1708
+ "type": "messaging",
1709
+ "version": "0.1.7"
1710
+ },
1681
1711
  "simple-api": {
1682
1712
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.simple-api/master/io-package.json",
1683
1713
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.simple-api/master/admin/simple-api.png",
1684
1714
  "type": "communication",
1685
- "version": "2.6.1"
1715
+ "version": "2.6.2"
1686
1716
  },
1687
1717
  "smappee": {
1688
1718
  "meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.smappee/master/io-package.json",
@@ -1772,13 +1802,13 @@
1772
1802
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.sonoff/master/io-package.json",
1773
1803
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.sonoff/master/admin/sonoff.png",
1774
1804
  "type": "lighting",
1775
- "version": "2.4.5"
1805
+ "version": "2.4.7"
1776
1806
  },
1777
1807
  "sonos": {
1778
1808
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.sonos/master/io-package.json",
1779
1809
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.sonos/master/admin/sonos.png",
1780
1810
  "type": "multimedia",
1781
- "version": "2.1.1"
1811
+ "version": "2.1.7"
1782
1812
  },
1783
1813
  "sony-bravia": {
1784
1814
  "meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.sony-bravia/master/io-package.json",
@@ -1802,7 +1832,7 @@
1802
1832
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.sql/master/io-package.json",
1803
1833
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.sql/master/admin/sql.png",
1804
1834
  "type": "storage",
1805
- "version": "1.15.7"
1835
+ "version": "1.16.1"
1806
1836
  },
1807
1837
  "squeezeboxrpc": {
1808
1838
  "meta": "https://raw.githubusercontent.com/oweitman/ioBroker.squeezeboxrpc/master/io-package.json",
@@ -1874,7 +1904,7 @@
1874
1904
  "meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.telegram/master/io-package.json",
1875
1905
  "icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.telegram/master/admin/telegram.png",
1876
1906
  "type": "messaging",
1877
- "version": "1.10.0"
1907
+ "version": "1.11.1"
1878
1908
  },
1879
1909
  "terminal": {
1880
1910
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.terminal/master/io-package.json",
@@ -1910,7 +1940,7 @@
1910
1940
  "meta": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.tr-064/master/io-package.json",
1911
1941
  "icon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.tr-064/master/admin/tr-064.png",
1912
1942
  "type": "infrastructure",
1913
- "version": "4.2.14"
1943
+ "version": "4.2.15"
1914
1944
  },
1915
1945
  "traccar": {
1916
1946
  "meta": "https://raw.githubusercontent.com/o0shojo0o/ioBroker.traccar/master/io-package.json",
@@ -1946,7 +1976,7 @@
1946
1976
  "meta": "https://raw.githubusercontent.com/Apollon77/ioBroker.tuya/master/io-package.json",
1947
1977
  "icon": "https://raw.githubusercontent.com/Apollon77/ioBroker.tuya/master/admin/tuya.png",
1948
1978
  "type": "iot-systems",
1949
- "version": "3.6.14"
1979
+ "version": "3.6.15"
1950
1980
  },
1951
1981
  "tvprogram": {
1952
1982
  "meta": "https://raw.githubusercontent.com/oweitman/ioBroker.tvprogram/master/io-package.json",
@@ -2060,7 +2090,7 @@
2060
2090
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-google-fonts/master/io-package.json",
2061
2091
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-google-fonts/master/admin/vis-google-fonts.png",
2062
2092
  "type": "visualization-widgets",
2063
- "version": "0.1.0"
2093
+ "version": "1.0.3"
2064
2094
  },
2065
2095
  "vis-history": {
2066
2096
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-history/master/io-package.json",
@@ -2072,7 +2102,7 @@
2072
2102
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-hqwidgets/master/io-package.json",
2073
2103
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-hqwidgets/master/admin/hqwidgets.png",
2074
2104
  "type": "visualization-widgets",
2075
- "version": "1.1.7"
2105
+ "version": "1.1.9"
2076
2106
  },
2077
2107
  "vis-icontwo": {
2078
2108
  "meta": "https://raw.githubusercontent.com/inventwo/ioBroker.vis-icontwo/master/io-package.json",
@@ -2200,6 +2230,12 @@
2200
2230
  "type": "general",
2201
2231
  "version": "3.4.16"
2202
2232
  },
2233
+ "webuntis": {
2234
+ "meta": "https://raw.githubusercontent.com/Newan/ioBroker.webuntis/main/io-package.json",
2235
+ "icon": "https://raw.githubusercontent.com/Newan/ioBroker.webuntis/main/admin/webuntis.png",
2236
+ "type": "date-and-time",
2237
+ "version": "0.3.1"
2238
+ },
2203
2239
  "weishaupt-wem": {
2204
2240
  "meta": "https://raw.githubusercontent.com/TA2k/ioBroker.weishaupt-wem/master/io-package.json",
2205
2241
  "icon": "https://raw.githubusercontent.com/TA2k/ioBroker.weishaupt-wem/master/admin/weishaupt-wem.png",
@@ -2324,7 +2360,7 @@
2324
2360
  "meta": "https://raw.githubusercontent.com/ioBroker/ioBroker.zigbee/master/io-package.json",
2325
2361
  "icon": "https://raw.githubusercontent.com/ioBroker/ioBroker.zigbee/master/admin/zigbee.png",
2326
2362
  "type": "hardware",
2327
- "version": "1.6.6"
2363
+ "version": "1.6.16"
2328
2364
  },
2329
2365
  "zont": {
2330
2366
  "meta": "https://raw.githubusercontent.com/kirovilya/ioBroker.zont/master/io-package.json",
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "js-controller",
4
- "version": "4.0.9",
4
+ "version": "4.0.12",
5
5
  "platform": "Javascript/Node.js",
6
6
  "controller": true,
7
7
  "mode": "daemon",
@@ -19,6 +19,30 @@
19
19
  "zh-cn": "JS控制器"
20
20
  },
21
21
  "news": {
22
+ "4.0.12": {
23
+ "en": "make sure to really end CLI process when they should end in error cases\ncatch error when streaming data to stdout and this is closed already",
24
+ "de": "Stellen Sie sicher, dass der CLI-Prozess wirklich beendet wird, wenn er in Fehlerfällen enden sollte\nFehler beim Streamen von Daten nach stdout abfangen und dieser ist bereits geschlossen",
25
+ "ru": "убедитесь, что процесс CLI действительно завершен, когда он должен заканчиваться в случаях ошибок\nпоймать ошибку при потоковой передаче данных на стандартный вывод, и это уже закрыто",
26
+ "pt": "certifique-se de realmente encerrar o processo CLI quando eles devem terminar em casos de erro\nerro de captura ao transmitir dados para stdout e isso já está fechado",
27
+ "nl": "zorg ervoor dat u het CLI-proces echt beëindigt wanneer ze in foutgevallen zouden moeten eindigen\nvangfout bij het streamen van gegevens naar stdout en dit is al gesloten",
28
+ "fr": "assurez-vous de vraiment mettre fin au processus CLI lorsqu'il devrait se terminer en cas d'erreur\nattraper l'erreur lors de la diffusion de données vers stdout et cela est déjà fermé",
29
+ "it": "assicurati di terminare davvero il processo CLI quando dovrebbero terminare in casi di errore\nerrore di cattura durante lo streaming dei dati su stdout e questo è già chiuso",
30
+ "es": "asegúrese de finalizar realmente el proceso CLI cuando deberían finalizar en casos de error\nerror de captura al transmitir datos a stdout y esto ya está cerrado",
31
+ "pl": "upewnij się, że naprawdę zakończysz proces CLI, kiedy powinien zakończyć się w przypadkach błędów\nZłap błąd podczas przesyłania danych na standardowe wyjście, a to jest już zamknięte",
32
+ "zh-cn": "确保在 CLI 进程应该在错误情况下结束时真正结束\n将数据流式传输到标准输出时捕获错误并且这已经关闭"
33
+ },
34
+ "4.0.10": {
35
+ "en": "Fix module specific rebuild command\nallow null for object.states also for extend calls for now\nenable sets on migration to redis if allowed\nMake sure adapters that are stopped on update are not enabled too early\nOptimize some special cases on adapter start",
36
+ "de": "Modulspezifischen Rebuild-Befehl korrigiert\nnull für object.states auch für Extend-Aufrufe zulassen\nAktivieren Sie Sätze bei der Migration zu Redis, falls zulässig\nStellen Sie sicher, dass Adapter, die beim Update angehalten werden, nicht zu früh aktiviert werden\nEinige Sonderfälle beim Adapterstart optimieren",
37
+ "ru": "Исправить специфичную для модуля команду перестроения\nразрешить null для object.states также для вызовов расширения на данный момент\nвключить наборы при миграции на Redis, если это разрешено\nУбедитесь, что адаптеры, остановленные при обновлении, не включаются слишком рано.\nОптимизированы некоторые особые случаи при запуске адаптера.",
38
+ "pt": "Corrija o comando de reconstrução específico do módulo\npermitir null para object.states também para chamadas estendidas por enquanto\nhabilitar conjuntos na migração para redis, se permitido\nCertifique-se de que os adaptadores parados na atualização não estejam ativados muito cedo\nOtimize alguns casos especiais na inicialização do adaptador",
39
+ "nl": "Modulespecifieke herbouwopdracht repareren\nsta null toe voor object.states ook voor verlengingsaanroepen voor nu\nschakel sets bij migratie in op redis indien toegestaan\nZorg ervoor dat adapters die worden gestopt bij de update niet te vroeg worden ingeschakeld\nOptimaliseer enkele speciale gevallen bij het starten van de adapter",
40
+ "fr": "Correction de la commande de reconstruction spécifique au module\nautoriser null pour object.states également pour les appels étendus pour l'instant\nactiver les ensembles lors de la migration vers redis si autorisé\nAssurez-vous que les adaptateurs arrêtés lors de la mise à jour ne sont pas activés trop tôt\nOptimiser certains cas particuliers au démarrage de l'adaptateur",
41
+ "it": "Risolto il problema con il comando di ricostruzione specifico del modulo\nconsenti null per object.states anche per estendere le chiamate per ora\nabilitare i set durante la migrazione a redis se consentito\nAssicurati che gli adattatori interrotti durante l'aggiornamento non siano abilitati troppo presto\nOttimizza alcuni casi speciali all'avvio dell'adattatore",
42
+ "es": "Arreglar el comando de reconstrucción específico del módulo\npermitir nulo para object.states también para extender llamadas por ahora\nhabilitar conjuntos en la migración a redis si está permitido\nAsegúrese de que los adaptadores que se detienen en la actualización no se habiliten demasiado pronto\nOptimice algunos casos especiales en el inicio del adaptador",
43
+ "pl": "Napraw polecenie przebudowy specyficzne dla modułu\nna razie zezwalaj na null dla object.states również dla połączeń rozszerzonych\nwłącz zestawy dotyczące migracji do redis, jeśli jest to dozwolone\nUpewnij się, że adaptery zatrzymane podczas aktualizacji nie są włączane zbyt wcześnie\nZoptymalizuj niektóre specjalne przypadki podczas uruchamiania adaptera",
44
+ "zh-cn": "修复模块特定的重建命令\n现在允许 object.states 为 null 也用于扩展调用\n如果允许,在迁移到 redis 时启用集合\n确保不会过早启用更新时停止的适配器\n优化适配器启动的一些特殊情况"
45
+ },
22
46
  "4.0.9": {
23
47
  "en": "dependency check on instance deletion: hostname has to be relative to instance if single instance is deleted\nfix setInterval method for adapters\nPrevent db-file-locking issues for jsonl database; the connectTimeout ro databases is now minimum 5s (overrides lower values from configuration)",
24
48
  "de": "Abhängigkeitsprüfung beim Löschen einer Instanz: Hostname muss relativ zur Instanz sein, wenn eine einzelne Instanz gelöscht wird\nsetInterval-Methode für Adapter behoben\nVerhindern Sie Probleme mit der Sperrung von DB-Dateien für die jsonl-Datenbank; Das ConnectTimeout für ro-Datenbanken beträgt jetzt mindestens 5 Sekunden (setzt niedrigere Werte aus der Konfiguration außer Kraft)",
@@ -78,30 +102,6 @@
78
102
  "es": "detenga la base de datos antes de ejecutar la actualización automática; Será efectivo para todas las actualizaciones > 4.0.5\nOptimizar Configurar el manejo de la activación para evitar algún error registrado en la actualización\nCorrija la actualización de la capacidad de Linux para Docker y verifique la bandera de administración\nDetectar otro caso de reconstrucción y permitir la reconstrucción automática\nArreglar la instalación del adaptador con dependencias\nArreglar caso de borde de secuencia\nEvitar varios casos de bloqueo vistos en Sentry",
79
103
  "pl": "zatrzymaj bazę danych przed wykonaniem samodzielnej aktualizacji; Będzie obowiązywać dla wszystkich ulepszeń >4,0,5\nOptymalizuj Ustaw obsługę aktywacji, aby zapobiec błędom zalogowania się podczas aktualizacji\nNapraw aktualizację funkcji Linux dla platformy Docker i sprawdź flagę administratora\nWykryj inny przypadek Rebuild i zezwól na automatyczną odbudowę\nNapraw instalację adaptera z zależnościami\nNapraw przypadek krawędzi na sekwencjach\nZapobiegaj kilku przypadkom awarii w Sentry",
80
104
  "zh-cn": "在执行升级自我之前停止数据库;将对>4.0.5的所有升级有效\n优化设置激活处理,防止一些错误登录升级\n修复 Docker 的 Linux 功能更新并检查 Admin Flag\n检测另一个重建案例并允许自动重建\n使用依赖项修复适配器安装\n修复 seq 边缘情况\n防止在 Sentry 中出现的几个崩溃案例"
81
- },
82
- "4.0.4": {
83
- "en": "Optimize database initialization and destroys\nUpdate winston-syslog to prevent errors\nAllow proper setup first upgrade from 3.3.x",
84
- "de": "Optimieren Sie die Initialisierung und Zerstörung von Datenbanken\nAktualisieren Sie winston-syslog, um Fehler zu vermeiden\nErst-Upgrade von 3.3.x auf ordnungsgemäße Einrichtung zulassen",
85
- "ru": "Оптимизация инициализации и уничтожения базы данных\nОбновите winston-syslog, чтобы предотвратить ошибки\nРазрешить правильную настройку первого обновления с 3.3.x",
86
- "pt": "Otimize a inicialização do banco de dados e destrua\nAtualize o winston-syslog para evitar erros\nPermitir configuração adequada primeiro upgrade de 3.3.x",
87
- "nl": "Optimaliseer database-initialisatie en vernietigt\nUpdate winston-syslog om fouten te voorkomen\nSta de juiste installatie toe, upgrade eerst vanaf 3.3.x",
88
- "fr": "Optimiser l'initialisation et la destruction de la base de données\nMettre à jour winston-syslog pour éviter les erreurs\nAutoriser la configuration appropriée pour la première mise à niveau à partir de la version 3.3.x",
89
- "it": "Ottimizza l'inizializzazione e la distruzione del database\nAggiorna winston-syslog per prevenire errori\nConsenti una corretta configurazione prima dell'aggiornamento da 3.3.x",
90
- "es": "Optimizar la inicialización y destrucción de la base de datos.\nActualice winston-syslog para evitar errores\nPermitir la configuración adecuada primera actualización desde 3.3.x",
91
- "pl": "Zoptymalizuj inicjowanie i niszczenie bazy danych\nZaktualizuj winston-syslog, aby zapobiec błędom\nZezwól na prawidłową konfigurację przy pierwszej aktualizacji z wersji 3.3.x",
92
- "zh-cn": "优化数据库初始化和销毁\n更新 winston-syslog 以防止错误\n允许正确设置首先从 3.3.x 升级"
93
- },
94
- "4.0.3": {
95
- "en": "see CHANGELOG.md",
96
- "de": "siehe CHANGELOG.md",
97
- "ru": "см. CHANGELOG.md",
98
- "pt": "veja CHANGELOG.md",
99
- "nl": "zie WIJZIGING.md",
100
- "fr": "voir CHANGELOG.md",
101
- "it": "vedere CHANGELOG.md",
102
- "es": "ver CHANGELOG.md",
103
- "pl": "zobacz CHANGELOG.md",
104
- "zh-cn": "见 CHANGELOG.md"
105
105
  }
106
106
  },
107
107
  "desc": {
@@ -211,7 +211,7 @@ class BackupRestore {
211
211
  tar.create({ gzip: true, cwd: `${tmpDir}/` }, ['backup']).pipe(f);
212
212
  } catch (err) {
213
213
  console.error(`host.${hostname} Cannot pack directory ${tmpDir}/backup: ${err.message}`);
214
- return this.processExit(EXIT_CODES.CANNOT_GZIP_DIRECTORY);
214
+ return void this.processExit(EXIT_CODES.CANNOT_GZIP_DIRECTORY);
215
215
  }
216
216
  });
217
217
  }
@@ -1011,7 +1011,7 @@ class BackupRestore {
1011
1011
  } else {
1012
1012
  console.warn('No backups found');
1013
1013
  }
1014
- return this.processExit(10);
1014
+ return void this.processExit(10);
1015
1015
  }
1016
1016
 
1017
1017
  if (!this.cleanDatabase) {
@@ -1052,7 +1052,7 @@ class BackupRestore {
1052
1052
  }
1053
1053
  if (!fs.existsSync(name)) {
1054
1054
  console.error(`host.${hostname} Cannot find ${name}`);
1055
- return this.processExit(11);
1055
+ return void this.processExit(11);
1056
1056
  }
1057
1057
  const tar = require('tar');
1058
1058
 
@@ -1067,13 +1067,13 @@ class BackupRestore {
1067
1067
  err => {
1068
1068
  if (err) {
1069
1069
  console.error(`host.${hostname} Cannot extract from file "${name}"`);
1070
- return this.processExit(9);
1070
+ return void this.processExit(9);
1071
1071
  }
1072
1072
  if (!fs.existsSync(`${tmpDir}/backup/backup.json`)) {
1073
1073
  console.error(
1074
1074
  `host.${hostname} Cannot find extracted file from file "${tmpDir}/backup/backup.json"`
1075
1075
  );
1076
- return this.processExit(9);
1076
+ return void this.processExit(9);
1077
1077
  }
1078
1078
  // Stop controller
1079
1079
  const daemon = require('daemonize2').setup({
@@ -68,7 +68,7 @@ function Install(options) {
68
68
  const Upload = require('./setupUpload');
69
69
  const upload = new Upload(options);
70
70
 
71
- async function enableAdapters(adapters, enabled) {
71
+ this.enableAdapters = async function (adapters, enabled) {
72
72
  if (adapters && adapters.length) {
73
73
  const ts = Date.now();
74
74
  for (let i = 0; i < adapters.length; i++) {
@@ -83,7 +83,7 @@ function Install(options) {
83
83
  await objects.extendObjectAsync(adapters[i]._id, updatedObj);
84
84
  }
85
85
  }
86
- }
86
+ };
87
87
 
88
88
  /**
89
89
  * Download given packet
@@ -93,7 +93,7 @@ function Install(options) {
93
93
  * @param {Record<string, any>?} options, { stopDb: true } - will stop the db before upgrade ONLY use it for controller upgrade -
94
94
  * db is gone afterwards, does not work with stoppedList
95
95
  * @param {object[]?} stoppedList
96
- * @return {Promise<void>}
96
+ * @return {Promise<Record<string, any>>}
97
97
  */
98
98
  this.downloadPacket = async function (repoUrl, packetName, options, stoppedList) {
99
99
  let url;
@@ -101,6 +101,8 @@ function Install(options) {
101
101
  options = {};
102
102
  }
103
103
 
104
+ stoppedList = stoppedList || [];
105
+
104
106
  if (!repoUrl || typeof repoUrl !== 'object') {
105
107
  try {
106
108
  repoUrl = await getRepository(repoUrl, params);
@@ -151,8 +153,6 @@ function Install(options) {
151
153
  endkey: `system.adapter.${packetName}.\u9999`
152
154
  });
153
155
 
154
- stoppedList = [];
155
-
156
156
  if (arr) {
157
157
  for (const row of arr.rows) {
158
158
  // stop only started instances on this host
@@ -162,7 +162,7 @@ function Install(options) {
162
162
  }
163
163
  }
164
164
 
165
- await enableAdapters(stoppedList, false);
165
+ await this.enableAdapters(stoppedList, false);
166
166
  }
167
167
 
168
168
  // try to extract the information from local sources-dist.json
@@ -205,8 +205,7 @@ function Install(options) {
205
205
  debug
206
206
  );
207
207
 
208
- await enableAdapters(stoppedList, true);
209
- return packetName;
208
+ return { packetName, stoppedList };
210
209
  } else if (url && url.match(tarballRegex)) {
211
210
  if (options.stopDb) {
212
211
  if (objects && objects.destroy) {
@@ -221,21 +220,20 @@ function Install(options) {
221
220
 
222
221
  // Install node modules
223
222
  await this._npmInstallWithCheck(url, options, debug);
224
- await enableAdapters(stoppedList, true);
225
- return packetName;
223
+ return { packetName, stoppedList };
226
224
  } else if (!url) {
227
225
  // Adapter
228
226
  console.warn(
229
227
  `host.${hostname} Adapter "${packetName}" can be updated only together with ${tools.appName}.js-controller`
230
228
  );
231
- return packetName;
229
+ return { packetName, stoppedList };
232
230
  }
233
231
  }
234
232
 
235
233
  console.error(
236
234
  `host.${hostname} Unknown packetName ${packetName}. Please install packages from outside the repository using npm!`
237
235
  );
238
- processExit(EXIT_CODES.UNKNOWN_PACKET_NAME);
236
+ return processExit(EXIT_CODES.UNKNOWN_PACKET_NAME);
239
237
  };
240
238
 
241
239
  /**
@@ -362,8 +360,7 @@ function Install(options) {
362
360
  } else {
363
361
  // TODO: revisit this - this should not happen
364
362
  console.error(`host.${hostname} Cannot install ${npmUrl}: ${result.exitCode}`);
365
- processExit(EXIT_CODES.CANNOT_INSTALL_NPM_PACKET);
366
- return;
363
+ return processExit(EXIT_CODES.CANNOT_INSTALL_NPM_PACKET);
367
364
  }
368
365
  // create file that indicates, that npm was called there
369
366
  fs.writeFileSync(path.join(installDir, 'iob_npm.done'), ' ');
@@ -371,7 +368,7 @@ function Install(options) {
371
368
  return { _url: npmUrl, installDir: path.dirname(installDir) };
372
369
  } else {
373
370
  console.error(`host.${hostname} Cannot install ${npmUrl}: ${result.exitCode}`);
374
- processExit(EXIT_CODES.CANNOT_INSTALL_NPM_PACKET);
371
+ return processExit(EXIT_CODES.CANNOT_INSTALL_NPM_PACKET);
375
372
  }
376
373
  };
377
374
 
@@ -570,8 +567,9 @@ function Install(options) {
570
567
  }
571
568
  _installCount++;
572
569
 
573
- await this.downloadPacket(repoUrl, fullName);
574
- await this.installAdapter(adapter, null, _installCount);
570
+ const { stoppedList } = await this.downloadPacket(repoUrl, fullName);
571
+ await this.installAdapter(adapter, repoUrl, _installCount);
572
+ await this.enableAdapters(stoppedList, true); // even if unlikely make sure to reenable disabled instances
575
573
  return adapter;
576
574
  }
577
575
  let adapterConf;
@@ -829,7 +827,7 @@ function Install(options) {
829
827
  adapterConf = fs.readJSONSync(`${adapterDir}/io-package.json`);
830
828
  } catch (err) {
831
829
  console.error(`host.${hostname} error: reading io-package.json ${err.message}`);
832
- return void processExit(EXIT_CODES.INVALID_IO_PACKAGE_JSON);
830
+ return processExit(EXIT_CODES.INVALID_IO_PACKAGE_JSON);
833
831
  }
834
832
 
835
833
  adapterConf.instanceObjects = adapterConf.instanceObjects || [];
@@ -135,45 +135,44 @@ function Setup(options) {
135
135
  async function setupReady(systemConfig, callback) {
136
136
  if (!callback) {
137
137
  console.log('database setup done. You can add adapters and start ' + tools.appName + ' now');
138
- processExit(EXIT_CODES.NO_ERROR);
139
- } else {
140
- if (!objects.syncFileDirectory || !objects.dirExists) {
141
- return void informAboutPlugins(systemConfig, callback);
142
- }
143
- // check meta.user
144
- try {
145
- const objExists = await objects.objectExists('meta.user');
146
- if (objExists) {
147
- // check if dir is missing
148
- const dirExists = objects.dirExists('meta.user');
149
- if (!dirExists) {
150
- // create meta.user, so users see them as upload target
151
- await objects.mkdirAsync('meta.user');
152
- console.log('Successfully created "meta.user" directory');
153
- }
138
+ return processExit(EXIT_CODES.NO_ERROR);
139
+ }
140
+ if (!objects.syncFileDirectory || !objects.dirExists) {
141
+ return void informAboutPlugins(systemConfig, callback);
142
+ }
143
+ // check meta.user
144
+ try {
145
+ const objExists = await objects.objectExists('meta.user');
146
+ if (objExists) {
147
+ // check if dir is missing
148
+ const dirExists = objects.dirExists('meta.user');
149
+ if (!dirExists) {
150
+ // create meta.user, so users see them as upload target
151
+ await objects.mkdirAsync('meta.user');
152
+ console.log('Successfully created "meta.user" directory');
154
153
  }
155
- } catch (err) {
156
- console.warn(`Could not create directory "meta.user": ${err.message}`);
157
154
  }
155
+ } catch (err) {
156
+ console.warn(`Could not create directory "meta.user": ${err.message}`);
157
+ }
158
158
 
159
- try {
160
- const { numberSuccess, notifications } = objects.syncFileDirectory();
161
- numberSuccess &&
162
- console.log(
163
- numberSuccess +
164
- ' file(s) successfully synchronized with ioBroker storage.\nPlease DO NOT copy files manually into ioBroker storage directories!'
165
- );
166
- if (notifications.length) {
167
- console.log();
168
- console.log('The following notifications happened during sync: ');
169
- notifications.forEach(el => console.log('- ' + el));
170
- console.log();
171
- }
172
- return void informAboutPlugins(systemConfig, callback);
173
- } catch (err) {
174
- console.error('Error on file directory sync: ' + err.message);
175
- return void informAboutPlugins(systemConfig, callback);
159
+ try {
160
+ const { numberSuccess, notifications } = objects.syncFileDirectory();
161
+ numberSuccess &&
162
+ console.log(
163
+ numberSuccess +
164
+ ' file(s) successfully synchronized with ioBroker storage.\nPlease DO NOT copy files manually into ioBroker storage directories!'
165
+ );
166
+ if (notifications.length) {
167
+ console.log();
168
+ console.log('The following notifications happened during sync: ');
169
+ notifications.forEach(el => console.log('- ' + el));
170
+ console.log();
176
171
  }
172
+ return void informAboutPlugins(systemConfig, callback);
173
+ } catch (err) {
174
+ console.error('Error on file directory sync: ' + err.message);
175
+ return void informAboutPlugins(systemConfig, callback);
177
176
  }
178
177
  }
179
178
 
@@ -240,19 +239,7 @@ function Setup(options) {
240
239
  states = _states;
241
240
  const iopkg = fs.readJsonSync(`${__dirname}/../../io-package.json`);
242
241
 
243
- try {
244
- // if we have a single host system we need to ensure that existing objects are migrated to sets before doing anything else
245
- if (await tools.isSingleHost(objects)) {
246
- await objects.activateSets();
247
- const noMigrated = await objects.migrateToSets();
248
-
249
- if (noMigrated) {
250
- console.log(`Successfully migrated ${noMigrated} objects to Redis Sets`);
251
- }
252
- }
253
- } catch (e) {
254
- console.warn(`Could not migrate objects to corresponding sets: ${e.message}`);
255
- }
242
+ await _maybeMigrateSets();
256
243
 
257
244
  // clean up invalid user group assignments (non-existing user in a group)
258
245
  try {
@@ -548,7 +535,7 @@ function Setup(options) {
548
535
  });
549
536
  console.log('Restore backup ...');
550
537
  console.log(`${COLOR_GREEN}This can take some time ... please be patient!${COLOR_RESET}`);
551
- backup.restoreBackup(filePath, false, true, err => {
538
+ backup.restoreBackup(filePath, false, true, async err => {
552
539
  if (err) {
553
540
  console.log(`Error happened during restore: ${err.message}`);
554
541
  console.log();
@@ -556,6 +543,7 @@ function Setup(options) {
556
543
  fs.writeFileSync(tools.getConfigFileName(), JSON.stringify(oldConfig, null, 2));
557
544
  fs.unlinkSync(tools.getConfigFileName() + '.bak');
558
545
  } else {
546
+ await _maybeMigrateSets();
559
547
  console.log('Backup restored - Migration successful');
560
548
  console.log(COLOR_YELLOW);
561
549
  console.log('Important: If your system consists of multiple hosts please execute ');
@@ -911,6 +899,27 @@ function Setup(options) {
911
899
  migrateObjects(config, originalConfig, rl, callback);
912
900
  };
913
901
 
902
+ /**
903
+ * Checks if single host setup and if so migrates and activates Redis Sets Usage
904
+ * @return {Promise<void>}
905
+ * @private
906
+ */
907
+ async function _maybeMigrateSets() {
908
+ try {
909
+ // if we have a single host system we need to ensure that existing objects are migrated to sets before doing anything else
910
+ if (await tools.isSingleHost(objects)) {
911
+ await objects.activateSets();
912
+ const noMigrated = await objects.migrateToSets();
913
+
914
+ if (noMigrated) {
915
+ console.log(`Successfully migrated ${noMigrated} objects to Redis Sets`);
916
+ }
917
+ }
918
+ } catch (e) {
919
+ console.warn(`Could not migrate objects to corresponding sets: ${e.message}`);
920
+ }
921
+ }
922
+
914
923
  /**
915
924
  * Removes non-existing users from groups
916
925
  *
@@ -299,7 +299,7 @@ function Upgrade(options) {
299
299
  ioPack = fs.readJSONSync(`${adapterDir}/io-package.json`);
300
300
  } catch {
301
301
  console.error(`Cannot find io-package.json in ${adapterDir}`);
302
- processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
302
+ return processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
303
303
  }
304
304
  }
305
305
 
@@ -513,8 +513,12 @@ function Upgrade(options) {
513
513
 
514
514
  console.log(`Update ${adapter} from @${ioInstalled.common.version} to @${targetVersion}`);
515
515
  // Get the adapter from web site
516
- const name = await install.downloadPacket(sources, `${adapter}@${targetVersion}`);
517
- await finishUpgrade(name);
516
+ const { packetName, stoppedList } = await install.downloadPacket(
517
+ sources,
518
+ `${adapter}@${targetVersion}`
519
+ );
520
+ await finishUpgrade(packetName);
521
+ await install.enableAdapters(stoppedList, true);
518
522
  }
519
523
  } else if (repoUrl[adapter].meta) {
520
524
  // Read repository from url or file
@@ -555,8 +559,12 @@ function Upgrade(options) {
555
559
  console.log(`Can not check version information to display upgrade infos: ${err.message}`);
556
560
  }
557
561
  console.log(`Update ${adapter} from @${ioInstalled.common.version} to @${targetVersion}`);
558
- const name = await install.downloadPacket(sources, `${adapter}@${targetVersion}`);
559
- await finishUpgrade(name, ioPack);
562
+ const { packetName, stoppedList } = await install.downloadPacket(
563
+ sources,
564
+ `${adapter}@${targetVersion}`
565
+ );
566
+ await finishUpgrade(packetName, ioPack);
567
+ await install.enableAdapters(stoppedList, true);
560
568
  }
561
569
  } else {
562
570
  if (forceDowngrade) {
@@ -570,8 +578,9 @@ function Upgrade(options) {
570
578
  console.warn(`Unable to get version for "${adapter}". Update anyway.`);
571
579
  console.log(`Update ${adapter} from @${ioInstalled.common.version} to @${version}`);
572
580
  // Get the adapter from web site
573
- const name = await install.downloadPacket(sources, `${adapter}@${version}`);
574
- await finishUpgrade(name);
581
+ const { packetName, stoppedList } = await install.downloadPacket(sources, `${adapter}@${version}`);
582
+ await finishUpgrade(packetName);
583
+ await install.enableAdapters(stoppedList, true);
575
584
  } else {
576
585
  return console.error(`Unable to get version for "${adapter}".`);
577
586
  }
@@ -595,7 +604,7 @@ function Upgrade(options) {
595
604
  }
596
605
  repoUrl = result;
597
606
  } catch (err) {
598
- processExit(err);
607
+ return processExit(err);
599
608
  }
600
609
  }
601
610
 
@@ -236,7 +236,7 @@ function Users(options) {
236
236
  if (result) {
237
237
  if (result.password !== result.repeatPassword) {
238
238
  console.log('Passwords are not identical!');
239
- processExit(EXIT_CODES.INVALID_PASSWORD);
239
+ return void processExit(EXIT_CODES.INVALID_PASSWORD);
240
240
  }
241
241
  //create user
242
242
  that.addUser(user, result.password, err => {
@@ -97,7 +97,7 @@ function VisDebug(options) {
97
97
 
98
98
  if (!adapterDir) {
99
99
  console.error(`Adapter not found. Tried: ${adapterNames2Try.join(', ')}`);
100
- return processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
100
+ return void processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
101
101
  }
102
102
  }
103
103
 
@@ -114,7 +114,7 @@ function VisDebug(options) {
114
114
  visDir = `${__dirname}/../../../${tools.appName.toLowerCase()}.vis`;
115
115
  if (!fs.existsSync(visDir)) {
116
116
  console.error(`Cannot find ${tools.appName}.vis`);
117
- return processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
117
+ return void processExit(EXIT_CODES.MISSING_ADAPTER_FILES);
118
118
  }
119
119
  }
120
120
  }
@@ -226,22 +226,14 @@ FALLBACK:
226
226
  console.log('Upload ' + adapterDir + '/widgets');
227
227
  uploadWidgets(adapterDir + '/widgets', 'vis', 'widgets', () => {
228
228
  if (!--count) {
229
- // timeout to print all messages
230
- setTimeout(() => processExit(), 100);
229
+ processExit();
231
230
  }
232
231
  });
233
232
  });
234
233
  } else {
235
234
  // upload all files into vis
236
235
  console.log('Upload "' + adapterDir + '/widgets' + '"');
237
- uploadWidgets(
238
- adapterDir + '/widgets',
239
- 'vis',
240
- 'widgets',
241
- () =>
242
- // timeout to print all messages
243
- !--count && setTimeout(() => processExit(), 100)
244
- );
236
+ uploadWidgets(adapterDir + '/widgets', 'vis', 'widgets', () => !--count && processExit());
245
237
  }
246
238
  });
247
239
  } else {
package/lib/setup.js CHANGED
@@ -128,7 +128,12 @@ function initYargs() {
128
128
  }
129
129
  })
130
130
  .command(['install <adapter>', 'i <adapter>'], 'Installs a specified adapter', {})
131
- .command('rebuild [<path>]', 'Rebuild all native modules or path', {})
131
+ .command('rebuild [<module>]', 'Rebuild all native modules or path', {
132
+ path: {
133
+ describe: 'Executes rebuild command in given path',
134
+ type: 'string'
135
+ }
136
+ })
132
137
  .command('url <url> [<name>]', 'Install adapter from specified url, e.g. GitHub', {})
133
138
  .command(['del <adapter>', 'delete <adapter>'], 'Remove adapter and all instances from this host', {
134
139
  custom: {
@@ -889,8 +894,9 @@ async function processCommand(command, args, params, callback) {
889
894
 
890
895
  if (!fs.existsSync(adapterDir)) {
891
896
  try {
892
- await install.downloadPacket(repoUrl, installName);
897
+ const { stoppedList } = await install.downloadPacket(repoUrl, installName);
893
898
  await install.installAdapter(installName, repoUrl);
899
+ await install.enableAdapters(stoppedList, true); // even if unlikely make sure to reenable disabled instances
894
900
  if (command !== 'install' && command !== 'i') {
895
901
  await install.createInstance(name, params);
896
902
  }
@@ -923,11 +929,19 @@ async function processCommand(command, args, params, callback) {
923
929
  options.cwd = commandOptions.path;
924
930
  } else {
925
931
  console.log('Path argument needs to be an absolute path!');
926
- return processExit(EXIT_CODES.INVALID_ARGUMENTS);
932
+ return void processExit(EXIT_CODES.INVALID_ARGUMENTS);
927
933
  }
928
934
  }
929
935
 
930
- console.log(`Rebuilding native modules${options.cwd ? ` in ${options.cwd}` : ''} ...`);
936
+ if (commandOptions.module) {
937
+ options.module = commandOptions.module;
938
+ console.log(
939
+ `Rebuilding native module "${commandOptions.module}"${options.cwd ? ` in ${options.cwd}` : ''} ...`
940
+ );
941
+ } else {
942
+ console.log(`Rebuilding native modules${options.cwd ? ` in ${options.cwd}` : ''} ...`);
943
+ }
944
+
931
945
  const result = await tools.rebuildNodeModules(options);
932
946
 
933
947
  if (result.success) {
@@ -935,9 +949,9 @@ async function processCommand(command, args, params, callback) {
935
949
  console.log(`Rebuilding native modules done`);
936
950
  return void callback();
937
951
  } else {
938
- processExit(`Rebuilding native modules failed with exit code ${result.exitCode}`);
952
+ console.error('Rebuilding native modules failed');
953
+ return void processExit(result.exitCode);
939
954
  }
940
- break;
941
955
  }
942
956
 
943
957
  case 'upload':
@@ -1285,10 +1299,10 @@ async function processCommand(command, args, params, callback) {
1285
1299
  try {
1286
1300
  await backup.validateBackup(name);
1287
1301
  console.log('Backup OK');
1288
- processExit(0);
1302
+ return void processExit(0);
1289
1303
  } catch (err) {
1290
1304
  console.log(`Backup check failed: ${err.message}`);
1291
- processExit(1);
1305
+ return void processExit(1);
1292
1306
  }
1293
1307
  });
1294
1308
  break;
@@ -2408,17 +2422,17 @@ async function processCommand(command, args, params, callback) {
2408
2422
  case 'v':
2409
2423
  case 'version': {
2410
2424
  const adapter = args[0];
2411
- let iopckg;
2425
+ let pckg;
2412
2426
  if (adapter) {
2413
2427
  try {
2414
- iopckg = require(tools.appName + '.' + adapter + '/package.json');
2428
+ pckg = require(`${tools.appName}.${adapter}/package.json`);
2415
2429
  } catch {
2416
- iopckg = { version: '"' + adapter + '" not found' };
2430
+ pckg = { version: `"${adapter}" not found` };
2417
2431
  }
2418
2432
  } else {
2419
- iopckg = require('../package.json');
2433
+ pckg = require(`@${tools.appName.toLowerCase()}/js-controller-common/package.json`);
2420
2434
  }
2421
- console.log(iopckg.version);
2435
+ console.log(pckg.version);
2422
2436
 
2423
2437
  return void callback();
2424
2438
  }
@@ -2727,17 +2741,17 @@ async function processCommand(command, args, params, callback) {
2727
2741
 
2728
2742
  default: {
2729
2743
  if (params.v || params.version) {
2730
- let iopckg;
2744
+ let pckg;
2731
2745
  if (command) {
2732
2746
  try {
2733
- iopckg = require(tools.appName + '.' + command + '/package.json');
2747
+ pckg = require(`${tools.appName}.${command}/package.json`);
2734
2748
  } catch {
2735
- iopckg = { version: '"' + command + '" not found' };
2749
+ pckg = { version: `"${command}" not found` };
2736
2750
  }
2737
2751
  } else {
2738
- iopckg = require('../package.json');
2752
+ pckg = require(`@${tools.appName.toLowerCase()}/js-controller-common/package.json`);
2739
2753
  }
2740
- console.log(iopckg.version);
2754
+ console.log(pckg.version);
2741
2755
  } else {
2742
2756
  showHelp();
2743
2757
  return void callback(EXIT_CODES.INVALID_ARGUMENTS);
@@ -2747,7 +2761,12 @@ async function processCommand(command, args, params, callback) {
2747
2761
  }
2748
2762
  }
2749
2763
 
2750
- // Save objects before exit
2764
+ /**
2765
+ * Exits the process and saves objects before exit
2766
+ *
2767
+ * @param {number?} exitCode
2768
+ * @return {Promise<void>} Never resolves
2769
+ */
2751
2770
  async function processExit(exitCode) {
2752
2771
  if (pluginHandler) {
2753
2772
  pluginHandler.destroyAll();
@@ -2759,9 +2778,9 @@ async function processExit(exitCode) {
2759
2778
  if (states && states.destroy) {
2760
2779
  await states.destroy();
2761
2780
  }
2762
- setTimeout(() => {
2763
- process.exit(exitCode);
2764
- }, 1000);
2781
+ return new Promise(() => {
2782
+ setTimeout(() => process.exit(exitCode), 1000);
2783
+ });
2765
2784
  }
2766
2785
 
2767
2786
  const OBJECTS_THAT_CANNOT_BE_DELETED = [
@@ -3135,7 +3154,7 @@ function dbConnect(onlyCheck, params, callback) {
3135
3154
  callback && callback(objects, states, true, config.objects.type, config);
3136
3155
  callback = null;
3137
3156
  } else {
3138
- processExit(EXIT_CODES.NO_CONNECTION_TO_OBJ_DB);
3157
+ return void processExit(EXIT_CODES.NO_CONNECTION_TO_OBJ_DB);
3139
3158
  }
3140
3159
  }
3141
3160
  }
@@ -3191,7 +3210,7 @@ function dbConnect(onlyCheck, params, callback) {
3191
3210
  callback && callback(objects, states, true, config.objects.type, config);
3192
3211
  callback = null;
3193
3212
  } else {
3194
- processExit(EXIT_CODES.NO_CONNECTION_TO_OBJ_DB);
3213
+ return void processExit(EXIT_CODES.NO_CONNECTION_TO_OBJ_DB);
3195
3214
  }
3196
3215
  }
3197
3216
  }
@@ -3207,7 +3226,7 @@ function dbConnect(onlyCheck, params, callback) {
3207
3226
  callback && callback(null, null, true, config.objects.type, config);
3208
3227
  callback = null;
3209
3228
  } else {
3210
- processExit(EXIT_CODES.NO_CONNECTION_TO_OBJ_DB);
3229
+ return void processExit(EXIT_CODES.NO_CONNECTION_TO_OBJ_DB);
3211
3230
  }
3212
3231
  }, (params.timeout || 10000) + config.objects.connectTimeout);
3213
3232
  }, params.timeout || config.objects.connectTimeout * 2);
package/main.js CHANGED
@@ -3646,7 +3646,10 @@ function installAdapters() {
3646
3646
  installArgs.push(name);
3647
3647
  } else if (task.rebuildArgs) {
3648
3648
  installArgs.push(`${task.rebuildArgs.module}@${task.rebuildArgs.version}`);
3649
- installOptions.cwd = task.rebuildArgs.path;
3649
+ if (task.rebuildArgs.path) {
3650
+ installArgs.push('--path');
3651
+ installArgs.push(task.rebuildArgs.path);
3652
+ }
3650
3653
  }
3651
3654
  }
3652
3655
  logger.info(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.js-controller",
3
- "version": "4.0.9",
3
+ "version": "4.0.12",
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.9",
21
- "@iobroker/db-objects-jsonl": "4.0.9",
22
- "@iobroker/db-objects-redis": "4.0.9",
23
- "@iobroker/db-states-file": "4.0.9",
24
- "@iobroker/db-states-jsonl": "4.0.9",
25
- "@iobroker/db-states-redis": "4.0.9",
26
- "@iobroker/js-controller-adapter": "4.0.9",
27
- "@iobroker/js-controller-cli": "4.0.9",
28
- "@iobroker/js-controller-common": "4.0.9",
29
- "@iobroker/js-controller-common-db": "4.0.9",
20
+ "@iobroker/db-objects-file": "4.0.12",
21
+ "@iobroker/db-objects-jsonl": "4.0.12",
22
+ "@iobroker/db-objects-redis": "4.0.12",
23
+ "@iobroker/db-states-file": "4.0.12",
24
+ "@iobroker/db-states-jsonl": "4.0.12",
25
+ "@iobroker/db-states-redis": "4.0.12",
26
+ "@iobroker/js-controller-adapter": "4.0.12",
27
+ "@iobroker/js-controller-cli": "4.0.12",
28
+ "@iobroker/js-controller-common": "4.0.12",
29
+ "@iobroker/js-controller-common-db": "4.0.12",
30
30
  "@iobroker/plugin-base": "~1.2.1",
31
31
  "@iobroker/plugin-sentry": "~1.1.10",
32
32
  "axios": "^0.24.0",
@@ -113,5 +113,5 @@
113
113
  "iobroker.js",
114
114
  "main.js"
115
115
  ],
116
- "gitHead": "2dbcd130e6ea7bf4398e3dc8daa0f43a81f87eaa"
116
+ "gitHead": "8d84f8138adacae4b60d05dd0f34fde8c36546dc"
117
117
  }