iobroker.device-watcher 2.9.12 → 2.9.14
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/README.md +9 -0
- package/io-package.json +27 -27
- package/main.js +66 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,6 +189,15 @@ It's possible to select:
|
|
|
189
189
|
Placeholder for the next version (at the beginning of the line):
|
|
190
190
|
### **WORK IN PROGRESS**
|
|
191
191
|
-->
|
|
192
|
+
### 2.9.14 (2024-01-04)
|
|
193
|
+
|
|
194
|
+
- (ciddi89) Fixed: This schould fixed the bugs with high cpu and ram load, finally. Sorry about the last two buggy versions.
|
|
195
|
+
|
|
196
|
+
### 2.9.13 (2024-01-03)
|
|
197
|
+
|
|
198
|
+
- (ciddi89) Fixed: Issues from v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)
|
|
199
|
+
- (ciddi89) Fixed: High CPU usage at object and state changes [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)
|
|
200
|
+
|
|
192
201
|
### 2.9.12 (2024-01-02)
|
|
193
202
|
|
|
194
203
|
- (ciddi89) Fixed: Changed handling for state changes and subscriptions [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "device-watcher",
|
|
4
|
-
"version": "2.9.
|
|
4
|
+
"version": "2.9.14",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.9.14": {
|
|
7
|
+
"en": "Fixed: This schould fixed the bugs with high cpu and ram load, finally. Sorry about the last two buggy versions.",
|
|
8
|
+
"de": "Behoben: Damit sollten die Fehler mit hoher CPU- und Ram-Last endlich behoben sein. Entschuldigung für die letzten beiden fehlerhaften Versionen.",
|
|
9
|
+
"ru": "Исправлено: Этот щит исправил ошибки с высокой загрузкой cpu и ram, наконец. Извините за последние две версии buggy.",
|
|
10
|
+
"pt": "Corrigido: Este schould corrigiu os insetos com alta carga cpu e ram, finalmente. Lamento as duas últimas versões.",
|
|
11
|
+
"nl": "Gerepareerd: Deze schould heeft de insecten gemaakt met hoge cpu en ramlading, eindelijk. Sorry voor de laatste twee rotversieën.",
|
|
12
|
+
"fr": "Correction : Ce schould a réparé les bogues avec une charge de cpu et de bélier élevée, enfin. Désolé pour les deux dernières versions de buggy.",
|
|
13
|
+
"it": "Risolto: Questa schould ha fissato i bug con un alto carico di cpu e raggi, finalmente. Mi dispiace per le ultime due versioni buggy.",
|
|
14
|
+
"es": "Arreglado: Esto podría arreglar los bichos con alta carga de cpu y carnero, finalmente. Siento lo de las últimas dos versiones.",
|
|
15
|
+
"pl": "Fixed: Ten schemat mógł naprawić błędy o wysokim cpu i załadowaniu ramy, w końcu. O ostatnich dwóch wersjach.",
|
|
16
|
+
"uk": "Виправлено: Цей schould зафіксував помилки з високою cpu і ram навантаження, нарешті. Про нас.",
|
|
17
|
+
"zh-cn": "固定: 最终,这就将固定在高棉和泥石头。 关于最后两个走私版本。."
|
|
18
|
+
},
|
|
19
|
+
"2.9.13": {
|
|
20
|
+
"en": "Fixed: Issues from v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nFixed: High CPU usage at object and state changes [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
21
|
+
"de": "Behoben: Fehler von v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nBehoben: Hohe CPU-Nutzung bei Objekt- und Zustandsänderungen [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
22
|
+
"ru": "Исправлено: Вопросы от v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nИсправлено: Высокое использование процессора на объектах и государственных изменениях [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
23
|
+
"pt": "Corrigido: Questões do v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nCorrigido: Uso de alta CPU em alterações de objeto e estado [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
24
|
+
"nl": "Quality over Quantity (QoQ) Releases Vertaling:\nQuality over Quantity (QoQ) Releases Vertaling:",
|
|
25
|
+
"fr": "Correction : Questions renvoyées à l ' adresse v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nFixed: High CPU use at object and state changes [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
26
|
+
"it": "Risolto: Problemi da v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nRisolto: alto uso della CPU a oggetto e cambiamenti di stato [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
27
|
+
"es": "Arreglado: Cuestiones de v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nFijo: Alto uso de la CPU en los cambios de objeto y estado [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
28
|
+
"pl": "Fixed: Issues from v2.9.12 #283(https:/github.com/ciddi89/ioBroker,device-watcher/issues/283) (ang.)\n(Użycie procesora) w obiektach i stanach zmienia liczbę #283 (https:/github.com/ciddi89/ioBroker,device-watcher/issues/283)",
|
|
29
|
+
"uk": "Виправлено: Випуски від v2.9.12 [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)\nВиправлено: Високий рівень використання процесора при об'єктах та змінах стану [#283] (https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
30
|
+
"zh-cn": "Fixed: Issues from v2.9.12[#283] (http://github.com/ciddi89/ioBroker.device-watcher/issues/283)\n九. 固定:在物体和州变化中使用高频单位[第283](http://github.com/ciddi89/ioBroker.device-watcher/issues/283)"
|
|
31
|
+
},
|
|
6
32
|
"2.9.12": {
|
|
7
33
|
"en": "Fixed: Changed handling for state changes and subscriptions [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
8
34
|
"de": "Behoben: Handhabung für Zustandsänderungen und Abonnements geändert [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Fixed: Added additional check for example states #262(https:/github.com/ciddi89/ioBroker,device-watcher/issues/262)\nFixed: Dostosowanie Execute nawet jeśli nie doda się adapter urządzenia",
|
|
68
94
|
"uk": "Виправлено: Додана додаткова перевірка станів екземпляра [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nВиправлено: Виконувати адаптер навіть якщо пристрій не вибрано",
|
|
69
95
|
"zh-cn": "固定地点:添加更多检查,例如[第262](http://github.com/ciddi89/ioBroker.device-watcher/issues/262)\n固定:假肢变器,即使没有装置的配件被选用"
|
|
70
|
-
},
|
|
71
|
-
"2.9.7": {
|
|
72
|
-
"en": "Added: Support for Wifilight\nFixed: Multiple messages if Sonoff devices reachable [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
73
|
-
"de": "Hinzugefügt: Unterstützung für Wifilight\nBehoben: Mehrere Meldungen, wenn Sonoff-Geräte erreichbar sind [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
74
|
-
"ru": "Добавлена: Поддержка Wifilight\nИсправлено: Несколько сообщений, если устройства Sonoff доступны [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
75
|
-
"pt": "Adicionado: Suporte para Wifilight\nCorrigido: Múltiplas mensagens se os dispositivos Sonoff atingirem [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
76
|
-
"nl": "Vertaling:\nVertaling:",
|
|
77
|
-
"fr": "Ajouté: Support pour Wifi\nCorrection : Messages multiples si les appareils Sonoff sont accessibles [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
78
|
-
"it": "Aggiunto: Supporto per Wifilight\nFisso: Messaggi multipli se dispositivi Sonoff raggiungibili [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
79
|
-
"es": "Añadido: Soporte para Wifilight\nCorregido: Múltiples mensajes si los dispositivos Sonoff pueden llegar a ser [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
80
|
-
"pl": "Wspieranie Wifilight\nFixed: Multiple messages, jeśli urządzenia Sonoff docierają do miejsca #244 (https:/github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
81
|
-
"uk": "Доданий: Підтримка Wifilight\nВиправлено: Кілька повідомлень, якщо пристрої Sonoff досягаються [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
82
|
-
"zh-cn": "增 编:支持光明\nFixed:Sonoff装置可达到[第244](http://github.com/ciddi89/ioBroker.device-watcher/issues/244)"
|
|
83
|
-
},
|
|
84
|
-
"2.9.6": {
|
|
85
|
-
"en": "Fixed: Admin jsonConfig schema\nChanged: Admin jsonConfig to json5\nAdded: Support for Tuya devices with online state\nOthers: cleaned up files",
|
|
86
|
-
"de": "Behoben: Admin jsonConfig Schema\nGeändert: Admin jsonConfig zu json5\nHinzugefügt: Unterstützung für Tuya-Geräte mit Online-Zustand\nAnderes: Dateien aufgeräumt",
|
|
87
|
-
"ru": "Исправлено: Admin jsonConfig schema\nИзменено: Admin jsonConfig в json5\nДобавлена: Поддержка устройств Tuya с онлайн состоянием\nДругое: очищенные файлы",
|
|
88
|
-
"pt": "Corrigido: Admin jsonConfig schema\nAlterado: Admin jsonConfig to json5\nAdicionado: Suporte para dispositivos Tuya com estado on-line\nOutros: limpe arquivos",
|
|
89
|
-
"nl": "Admin jsonConfig schema\nAdministratie JsonConfig aan Json5\nVersterking voor Tuya apparaten met online staat\nVertaling:",
|
|
90
|
-
"fr": "Correction : Admin jsonConfig schema\nChanged: Admin jsonConfig to json5\nAjouté: Support pour les appareils Tuya avec l'état en ligne\nAutre: nettoyer les fichiers",
|
|
91
|
-
"it": "Fisso: Schema Admin jsonConfig\nModificato: Admin jsonConfig a json5\nAggiunto: Supporto per dispositivi Tuya con stato online\nAltro: file ripuliti",
|
|
92
|
-
"es": "Arreglado: Amin jsonConfig schema\nCambios: Admin jsonConfig a json5\nAñadido: Soporte para dispositivos Tuya con estado en línea\nOtros: limpiar archivos",
|
|
93
|
-
"pl": "Admin jsonConfig schema\nZmiana: Admin jsonConfig to json5\nWstęp: Wsparcie dla urządzeń Tuya z internetowym państwem\nInne: czyste pliki plikowe",
|
|
94
|
-
"uk": "Виправлено: Admin jsonConfig schema\nЗмінено: Admin jsonConfig to json5\nДодано: Підтримка пристроїв Туя з онлайн-державою\nІнше: очищення файлів",
|
|
95
|
-
"zh-cn": "Fix: Admin json Config schema\n修改: Admin json Configg to json5\n增 编:在网上国家支持图亚装置\n其他:清洁档案"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/main.js
CHANGED
|
@@ -79,6 +79,8 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
79
79
|
// Interval timer
|
|
80
80
|
this.refreshDataTimeout = null;
|
|
81
81
|
|
|
82
|
+
this.mainRunning = false;
|
|
83
|
+
|
|
82
84
|
this.on('ready', this.onReady.bind(this));
|
|
83
85
|
this.on('stateChange', this.onStateChange.bind(this));
|
|
84
86
|
this.on('objectChange', this.onObjectChange.bind(this));
|
|
@@ -332,12 +334,19 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
332
334
|
// The object was changed
|
|
333
335
|
//this.log.debug(`object ${id} changed: ${JSON.stringify(obj)}`);
|
|
334
336
|
|
|
335
|
-
if (id.startsWith('system.adapter.')) {
|
|
337
|
+
if (this.config.checkAdapterInstances && id.startsWith('system.adapter.')) {
|
|
336
338
|
//read new instance data and add it to the lists
|
|
337
339
|
await this.getInstanceData(id);
|
|
338
340
|
} else {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
+
if (Array.from(this.listAllDevicesRaw.values()).some((obj) => obj.mainSelector === id)) {
|
|
342
|
+
if (!this.mainRunning) {
|
|
343
|
+
await this.main();
|
|
344
|
+
} else {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
} else {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
341
350
|
}
|
|
342
351
|
} catch (error) {
|
|
343
352
|
this.log.error(`Issue at object change: ${error}`);
|
|
@@ -498,6 +507,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
498
507
|
*/
|
|
499
508
|
async main() {
|
|
500
509
|
this.log.debug(`Function started: ${this.main.name}`);
|
|
510
|
+
this.mainRunning = true;
|
|
501
511
|
|
|
502
512
|
// cancel run if no adapter is selected
|
|
503
513
|
if (this.adapterSelected.length === 0) return;
|
|
@@ -532,7 +542,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
532
542
|
this.log.error(`[main - create and fill datapoints for each adapter] - ${error}`);
|
|
533
543
|
}
|
|
534
544
|
}
|
|
535
|
-
|
|
545
|
+
this.mainRunning = false;
|
|
536
546
|
this.log.debug(`Function finished: ${this.main.name}`);
|
|
537
547
|
} //<--End of main function
|
|
538
548
|
|
|
@@ -668,6 +678,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
668
678
|
/*---------- Start of loop ----------*/
|
|
669
679
|
for (const [id] of Object.entries(devices)) {
|
|
670
680
|
if (id.endsWith('.')) continue;
|
|
681
|
+
const mainSelector = id;
|
|
671
682
|
|
|
672
683
|
/*=============================================
|
|
673
684
|
= get Instanz =
|
|
@@ -676,9 +687,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
676
687
|
|
|
677
688
|
const instanceDeviceConnectionDP = `${instance}.info.connection`;
|
|
678
689
|
const instancedeviceConnected = await this.getInitValue(instanceDeviceConnectionDP);
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
this.subscribeForeignObjects('*');
|
|
690
|
+
this.subscribeForeignStates(instanceDeviceConnectionDP);
|
|
691
|
+
this.subscribeForeignObjects(`${this.selAdapter[i].Selektor}`);
|
|
692
|
+
// this.subscribeForeignObjects('*');
|
|
693
|
+
//this.subscribeForeignStates('*');
|
|
682
694
|
/*=============================================
|
|
683
695
|
= Get device name =
|
|
684
696
|
=============================================*/
|
|
@@ -696,7 +708,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
696
708
|
const shortCurrDeviceString = currDeviceString.slice(0, currDeviceString.lastIndexOf('.') + 1 - 1);
|
|
697
709
|
|
|
698
710
|
// subscribe to object device path
|
|
699
|
-
|
|
711
|
+
this.subscribeForeignStates(currDeviceString);
|
|
700
712
|
|
|
701
713
|
/*=============================================
|
|
702
714
|
= Get signal strength =
|
|
@@ -723,7 +735,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
723
735
|
break;
|
|
724
736
|
}
|
|
725
737
|
//subscribe to states
|
|
726
|
-
|
|
738
|
+
this.subscribeForeignStates(deviceQualityDP);
|
|
727
739
|
|
|
728
740
|
const signalData = await this.calculateSignalStrength(deviceQualityState, adapterID);
|
|
729
741
|
let linkQuality = signalData[0];
|
|
@@ -795,9 +807,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
795
807
|
faultReportingState = await this.getInitValue(faultReportingDP);
|
|
796
808
|
|
|
797
809
|
//subscribe to states
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
810
|
+
this.subscribeForeignStates(deviceBatteryStateDP);
|
|
811
|
+
this.subscribeForeignStates(isLowBatDP);
|
|
812
|
+
this.subscribeForeignStates(faultReportingDP);
|
|
801
813
|
|
|
802
814
|
const batteryData = await this.getBatteryData(deviceBatteryState, deviceLowBatState, faultReportingState, adapterID);
|
|
803
815
|
batteryHealth = batteryData[0];
|
|
@@ -830,10 +842,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
830
842
|
}
|
|
831
843
|
|
|
832
844
|
// subscribe to states
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
845
|
+
this.subscribeForeignStates(timeSelector);
|
|
846
|
+
this.subscribeForeignStates(unreachDP);
|
|
847
|
+
this.subscribeForeignStates(deviceStateSelectorDP);
|
|
848
|
+
this.subscribeForeignStates(rssiPeerSelectorDP);
|
|
837
849
|
|
|
838
850
|
const onlineState = await this.getOnlineState(timeSelector, adapterID, unreachDP, linkQuality, deviceUnreachState, deviceStateSelectorDP, rssiPeerSelectorDP);
|
|
839
851
|
let deviceState;
|
|
@@ -871,8 +883,8 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
871
883
|
}
|
|
872
884
|
|
|
873
885
|
// subscribe to states
|
|
874
|
-
|
|
875
|
-
this.subscribeForeignStates('*');
|
|
886
|
+
this.subscribeForeignStates(deviceUpdateDP);
|
|
887
|
+
// this.subscribeForeignStates('*');
|
|
876
888
|
}
|
|
877
889
|
|
|
878
890
|
/*=============================================
|
|
@@ -881,6 +893,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
881
893
|
const setupList = () => {
|
|
882
894
|
this.listAllDevicesRaw.set(currDeviceString, {
|
|
883
895
|
Path: id,
|
|
896
|
+
mainSelector: mainSelector,
|
|
884
897
|
instanceDeviceConnectionDP: instanceDeviceConnectionDP,
|
|
885
898
|
instancedeviceConnected: instancedeviceConnected,
|
|
886
899
|
instance: instance,
|
|
@@ -1964,31 +1977,34 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1964
1977
|
|
|
1965
1978
|
// device unreach
|
|
1966
1979
|
case deviceData.UnreachDP:
|
|
1967
|
-
if (deviceData.
|
|
1968
|
-
|
|
1969
|
-
deviceData.UnreachState
|
|
1970
|
-
|
|
1971
|
-
deviceData.
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
if (
|
|
1980
|
+
if (deviceData.instanceDeviceConnectionDP.val !== undefined) {
|
|
1981
|
+
// check if the generally deviceData connected state is for a while true
|
|
1982
|
+
if (deviceData.UnreachState !== state.val) {
|
|
1983
|
+
oldStatus = deviceData.Status;
|
|
1984
|
+
deviceData.UnreachState = state.val;
|
|
1985
|
+
contactData = await this.getOnlineState(
|
|
1986
|
+
deviceData.timeSelector,
|
|
1987
|
+
deviceData.adapterID,
|
|
1988
|
+
deviceData.UnreachDP,
|
|
1989
|
+
deviceData.SignalStrength,
|
|
1990
|
+
deviceData.UnreachState,
|
|
1991
|
+
deviceData.DeviceStateSelectorDP,
|
|
1992
|
+
deviceData.rssiPeerSelectorDP,
|
|
1993
|
+
);
|
|
1994
|
+
if (contactData !== undefined) {
|
|
1995
|
+
deviceData.LastContact = contactData[0];
|
|
1996
|
+
deviceData.Status = contactData[1];
|
|
1997
|
+
deviceData.SignalStrength = contactData[2];
|
|
1998
|
+
}
|
|
1999
|
+
if (this.config.checkSendOfflineMsg && oldStatus !== deviceData.Status && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
2000
|
+
if (deviceData.instanceDeviceConnectionDP.val !== undefined) {
|
|
2001
|
+
// check if the generally deviceData connected state is for a while true
|
|
2002
|
+
if (await this.getTimestampConnectionDP(deviceData.instanceDeviceConnectionDP, 20000)) {
|
|
2003
|
+
await this.sendStateNotifications('onlineStateDevice', deviceID);
|
|
2004
|
+
}
|
|
2005
|
+
} else {
|
|
1988
2006
|
await this.sendStateNotifications('onlineStateDevice', deviceID);
|
|
1989
2007
|
}
|
|
1990
|
-
} else {
|
|
1991
|
-
await this.sendStateNotifications('onlineStateDevice', deviceID);
|
|
1992
2008
|
}
|
|
1993
2009
|
}
|
|
1994
2010
|
}
|
|
@@ -2080,12 +2096,12 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2080
2096
|
}
|
|
2081
2097
|
|
|
2082
2098
|
//subscribe to statechanges
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
this.
|
|
2087
|
-
//this.
|
|
2088
|
-
this.subscribeForeignObjects('*');
|
|
2099
|
+
this.subscribeForeignStates(id);
|
|
2100
|
+
this.subscribeForeignStates(instanceConnectedHostDP);
|
|
2101
|
+
this.subscribeForeignStates(instanceConnectedDeviceDP);
|
|
2102
|
+
this.subscribeForeignObjects(`system.adapter.*`);
|
|
2103
|
+
// this.subscribeForeignStates('*');
|
|
2104
|
+
// this.subscribeForeignObjects('*');
|
|
2089
2105
|
|
|
2090
2106
|
// create raw list
|
|
2091
2107
|
this.listInstanceRaw.set(instanceID, {
|
|
@@ -2134,9 +2150,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2134
2150
|
let connectedDeviceState = await this.getInitValue(`${instanceID}.info.connection`);
|
|
2135
2151
|
if (connectedDeviceState === undefined) connectedDeviceState = true;
|
|
2136
2152
|
|
|
2137
|
-
let isAlive =
|
|
2153
|
+
let isAlive = aliveState;
|
|
2138
2154
|
let isHealthy = false;
|
|
2139
|
-
let instanceStatusString = 'Instanz deaktiviert';
|
|
2155
|
+
let instanceStatusString = aliveState ? 'Instanz aktiviert' : 'Instanz deaktiviert';
|
|
2140
2156
|
|
|
2141
2157
|
if (!aliveState) {
|
|
2142
2158
|
isAlive = false;
|
|
@@ -2172,7 +2188,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2172
2188
|
|
|
2173
2189
|
let isAlive = false;
|
|
2174
2190
|
let isHealthy = false;
|
|
2175
|
-
let instanceStatusString = 'Instanz deaktiviert';
|
|
2191
|
+
let instanceStatusString = aliveState ? 'Instanz aktiviert' : 'Instanz deaktiviert';
|
|
2176
2192
|
|
|
2177
2193
|
if (aliveState) {
|
|
2178
2194
|
daemonIsAlive = await this.checkDaemonIsHealthy(instanceID);
|