iobroker.device-watcher 2.10.2 → 2.10.3
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 +4 -0
- package/admin/jsonConfig.json5 +12 -0
- package/io-package.json +14 -14
- package/main.js +72 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,6 +189,10 @@ 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.10.3 (2024-01-27)
|
|
193
|
+
|
|
194
|
+
- (ciddi89) Fixed [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): blacklisted devices was shown in html-list
|
|
195
|
+
|
|
192
196
|
### 2.10.2 (2024-01-20)
|
|
193
197
|
|
|
194
198
|
- (ciddi89) Fixed: typeError for available adapter update messages
|
package/admin/jsonConfig.json5
CHANGED
|
@@ -524,6 +524,8 @@
|
|
|
524
524
|
newLine: true,
|
|
525
525
|
type: 'text',
|
|
526
526
|
help: 'Format hh:mm',
|
|
527
|
+
validator: 'const timePattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/; const value = data.checkSendAdapterUpdateTime; if(timePattern.test(value)) return true;return false;',
|
|
528
|
+
validatorNoSaveOnError: true,
|
|
527
529
|
},
|
|
528
530
|
},
|
|
529
531
|
},
|
|
@@ -622,6 +624,8 @@
|
|
|
622
624
|
newLine: true,
|
|
623
625
|
type: 'text',
|
|
624
626
|
help: 'Format hh:mm',
|
|
627
|
+
validator: 'const timePattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/; const value = data.checkSendInstanceDeactivatedTime; if(timePattern.test(value)) return true;return false;',
|
|
628
|
+
validatorNoSaveOnError: true,
|
|
625
629
|
},
|
|
626
630
|
},
|
|
627
631
|
},
|
|
@@ -720,6 +724,8 @@
|
|
|
720
724
|
newLine: true,
|
|
721
725
|
type: 'text',
|
|
722
726
|
help: 'Format hh:mm',
|
|
727
|
+
validator: 'const timePattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/; const value = data.checkSendInstanceFailedTime; if(timePattern.test(value)) return true;return false;',
|
|
728
|
+
validatorNoSaveOnError: true,
|
|
723
729
|
},
|
|
724
730
|
},
|
|
725
731
|
},
|
|
@@ -812,6 +818,8 @@
|
|
|
812
818
|
newLine: true,
|
|
813
819
|
type: 'text',
|
|
814
820
|
help: 'Format hh:mm',
|
|
821
|
+
validator: 'const timePattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/; const value = data.checkSendOfflineTime; if(timePattern.test(value)) return true;return false;',
|
|
822
|
+
validatorNoSaveOnError: true,
|
|
815
823
|
},
|
|
816
824
|
},
|
|
817
825
|
},
|
|
@@ -904,6 +912,8 @@
|
|
|
904
912
|
newLine: true,
|
|
905
913
|
type: 'text',
|
|
906
914
|
help: 'Format hh:mm',
|
|
915
|
+
validator: 'const timePattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/; const value = data.checkSendBatteryTime; if(timePattern.test(value)) return true;return false;',
|
|
916
|
+
validatorNoSaveOnError: true,
|
|
907
917
|
},
|
|
908
918
|
},
|
|
909
919
|
},
|
|
@@ -996,6 +1006,8 @@
|
|
|
996
1006
|
newLine: true,
|
|
997
1007
|
type: 'text',
|
|
998
1008
|
help: 'Format hh:mm',
|
|
1009
|
+
validator: 'const timePattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/; const value = data.checkSendUpgradeTime; if(timePattern.test(value)) return true;return false;',
|
|
1010
|
+
validatorNoSaveOnError: true,
|
|
999
1011
|
},
|
|
1000
1012
|
},
|
|
1001
1013
|
},
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "device-watcher",
|
|
4
|
-
"version": "2.10.
|
|
4
|
+
"version": "2.10.3",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.10.3": {
|
|
7
|
+
"en": "Fixed [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): blacklisted devices was shown in html-list",
|
|
8
|
+
"de": "Behoben [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): In der Blacklist aufgeführte Geräte wurden in html-list angezeigt",
|
|
9
|
+
"ru": "Fixed [#299] (http://github.com/ciddi89/ioBroker.device-watcher/issues/299): blacklisted devices was shown in html-list",
|
|
10
|
+
"pt": "Corrigido [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): dispositivos listados em pretos foram mostrados em html-list",
|
|
11
|
+
"nl": "Fixed [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): blacklisted devices werd getoond in html-list",
|
|
12
|
+
"fr": "Correction [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): les appareils sur liste noire sont affichés dans la liste html",
|
|
13
|
+
"it": "Fisso [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): la lista nera è stata mostrata nella lista html",
|
|
14
|
+
"es": "Fixed [#299](https://github.com/ciddi89/ioBroker.device-watcher/issues/299): blacklisted devices was shown in html-list",
|
|
15
|
+
"pl": "Poprawiono [# 299] (https: / / github.com / ciddi89 / ioBroker.device- watcher / issues / 299): na liście html- pokazano na czarnej liście urządzenia",
|
|
16
|
+
"uk": "Виправлено [#299](https://github.com/ciddi89/ioBroker.device-watcher/products/299): Чорнелистові пристрої були показані в html-list",
|
|
17
|
+
"zh-cn": "固定 [299] (https://github.com/ciddi89/ioBroker.device-watcher/issues/299):列入黑名单的设备在html列表中显示"
|
|
18
|
+
},
|
|
6
19
|
"2.10.2": {
|
|
7
20
|
"en": "Fixed: typeError for available adapter update messages\nFixed: Lists for updatable adapter",
|
|
8
21
|
"de": "Behoben: Type-Fehler bei verfügbaren Adapter-Update-Nachrichten\nBehoben: Fehler bei Listen für Updatable Adapter",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Fixed: Changed handling for state changes and subscriptions #283(https:/github.com/ciddi89/ioBroker.device-watcher/issues/283) (ang.)",
|
|
81
94
|
"uk": "Виправлено: Змінене поводження з державними змінами та підписками [#283](https://github.com/ciddi89/ioBroker.device-watcher/issues/283)",
|
|
82
95
|
"zh-cn": "固定:国家变化和订阅的改变(第283号)"
|
|
83
|
-
},
|
|
84
|
-
"2.9.11": {
|
|
85
|
-
"en": "Fixed: Fullybroswer >v3 use id not common name",
|
|
86
|
-
"de": "Behoben: Fullybroswer >v3 verwende den ID Namen",
|
|
87
|
-
"ru": "Исправлено: Fullybroswer >v3 использовать id не общее имя",
|
|
88
|
-
"pt": "Corrigido: Fullybroswer >v3 use id não nome comum",
|
|
89
|
-
"nl": "Quality over Quantity (QoQ) Releases Vertaling:",
|
|
90
|
-
"fr": "Correction : Fullybroswer phylv3 utiliser le nom usuel",
|
|
91
|
-
"it": "Fisso: Fullybroswer >v3 uso id nome non comune",
|
|
92
|
-
"es": "Fijo: Fullybroswer >v3 use id no nombre común",
|
|
93
|
-
"pl": "Fixed: Fullybroswer >v3 wykorzystuje niepospolitą nazwę",
|
|
94
|
-
"uk": "Виправлено: Fullybroswer >v3 використовувати id не загальна назва",
|
|
95
|
-
"zh-cn": "固定名称:全盘罗维塔 >v3"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/main.js
CHANGED
|
@@ -394,7 +394,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
394
394
|
*/
|
|
395
395
|
async onStateChange(id, state) {
|
|
396
396
|
if (state) {
|
|
397
|
-
|
|
397
|
+
this.log.debug(`State changed: ${id} changed ${state.val}`);
|
|
398
398
|
|
|
399
399
|
try {
|
|
400
400
|
/*=============================================
|
|
@@ -627,7 +627,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
627
627
|
this.log.error(`[createBlacklist] - ${error}`);
|
|
628
628
|
}
|
|
629
629
|
if (this.blacklistLists.length >= 1) this.log.info(`Found devices/services on blacklist for lists: ${this.blacklistLists}`);
|
|
630
|
-
if (this.blacklistAdapterLists.length >= 1) this.log.info(`Found devices/services on blacklist for lists: ${this.blacklistAdapterLists}`);
|
|
630
|
+
if (this.blacklistAdapterLists.length >= 1) this.log.info(`Found devices/services on blacklist for own adapter lists: ${this.blacklistAdapterLists}`);
|
|
631
631
|
if (this.blacklistNotify.length >= 1) this.log.info(`Found devices/services on blacklist for notifications: ${this.blacklistNotify}`);
|
|
632
632
|
}
|
|
633
633
|
}
|
|
@@ -1436,7 +1436,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1436
1436
|
deviceData.linkQuality = contactData[2];
|
|
1437
1437
|
}
|
|
1438
1438
|
if (this.config.checkSendOfflineMsg && oldContactState !== deviceData.Status && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1439
|
-
await this.sendStateNotifications('onlineStateDevice', device);
|
|
1439
|
+
await this.sendStateNotifications('Devices', 'onlineStateDevice', device);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
@@ -1812,7 +1812,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1812
1812
|
ack: true,
|
|
1813
1813
|
});
|
|
1814
1814
|
await this.setStateChangedAsync(`devices.${dpSubFolder}offlineListHTML`, {
|
|
1815
|
-
val: await this.createListHTML('offlineList', this.
|
|
1815
|
+
val: await this.createListHTML('offlineList', this.offlineDevices, this.offlineDevicesCount, null),
|
|
1816
1816
|
ack: true,
|
|
1817
1817
|
});
|
|
1818
1818
|
await this.setStateChangedAsync(`devices.${dpSubFolder}batteryListHTML`, {
|
|
@@ -1825,23 +1825,23 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1825
1825
|
});
|
|
1826
1826
|
if (this.config.checkAdapterInstances) {
|
|
1827
1827
|
await this.setStateChangedAsync(`adapterAndInstances.HTML_Lists.listAllInstancesHTML`, {
|
|
1828
|
-
val: await this.createListHTMLInstances('allInstancesList', this.
|
|
1828
|
+
val: await this.createListHTMLInstances('allInstancesList', this.listAllInstances, this.countAllInstances),
|
|
1829
1829
|
ack: true,
|
|
1830
1830
|
});
|
|
1831
1831
|
await this.setStateChangedAsync(`adapterAndInstances.HTML_Lists.listAllActiveInstancesHTML`, {
|
|
1832
|
-
val: await this.createListHTMLInstances('allActiveInstancesList', this.
|
|
1832
|
+
val: await this.createListHTMLInstances('allActiveInstancesList', this.listAllActiveInstances, this.countAllActiveInstances),
|
|
1833
1833
|
ack: true,
|
|
1834
1834
|
});
|
|
1835
1835
|
await this.setStateChangedAsync(`adapterAndInstances.HTML_Lists.listInstancesErrorHTML`, {
|
|
1836
|
-
val: await this.createListHTMLInstances('errorInstanceList', this.
|
|
1836
|
+
val: await this.createListHTMLInstances('errorInstanceList', this.listErrorInstance, this.countErrorInstance),
|
|
1837
1837
|
ack: true,
|
|
1838
1838
|
});
|
|
1839
1839
|
await this.setStateChangedAsync(`adapterAndInstances.HTML_Lists.listDeactivatedInstancesHTML`, {
|
|
1840
|
-
val: await this.createListHTMLInstances('deactivatedInstanceList', this.
|
|
1840
|
+
val: await this.createListHTMLInstances('deactivatedInstanceList', this.listDeactivatedInstances, this.countDeactivatedInstances),
|
|
1841
1841
|
ack: true,
|
|
1842
1842
|
});
|
|
1843
1843
|
await this.setStateChangedAsync(`adapterAndInstances.HTML_Lists.listAdapterUpdatesHTML`, {
|
|
1844
|
-
val: await this.createListHTMLInstances('updateAdapterList', this.
|
|
1844
|
+
val: await this.createListHTMLInstances('updateAdapterList', this.listAdapterUpdates, this.countAdapterUpdates),
|
|
1845
1845
|
ack: true,
|
|
1846
1846
|
});
|
|
1847
1847
|
}
|
|
@@ -1887,7 +1887,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1887
1887
|
deviceData.Upgradable = await this.checkDeviceUpdate(deviceData.adapterID, state.val);
|
|
1888
1888
|
if (deviceData.Upgradable === true) {
|
|
1889
1889
|
if (this.config.checkSendDeviceUpgrade && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1890
|
-
await this.sendStateNotifications('updateDevice', deviceID);
|
|
1890
|
+
await this.sendStateNotifications('Devices', 'updateDevice', deviceID);
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
@@ -1919,7 +1919,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1919
1919
|
|
|
1920
1920
|
if (deviceData.LowBat && oldLowBatState !== deviceData.LowBat) {
|
|
1921
1921
|
if (this.config.checkSendBatteryMsg && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1922
|
-
await this.sendStateNotifications('lowBatDevice', deviceID);
|
|
1922
|
+
await this.sendStateNotifications('Devices', 'lowBatDevice', deviceID);
|
|
1923
1923
|
}
|
|
1924
1924
|
}
|
|
1925
1925
|
}
|
|
@@ -1937,7 +1937,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1937
1937
|
|
|
1938
1938
|
if (deviceData.LowBat && oldLowBatState !== deviceData.LowBat) {
|
|
1939
1939
|
if (this.config.checkSendBatteryMsg && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1940
|
-
await this.sendStateNotifications('lowBatDevice', deviceID);
|
|
1940
|
+
await this.sendStateNotifications('Devices', 'lowBatDevice', deviceID);
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
@@ -1956,7 +1956,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1956
1956
|
|
|
1957
1957
|
if (deviceData.LowBat && oldLowBatState !== deviceData.LowBat) {
|
|
1958
1958
|
if (this.config.checkSendBatteryMsg && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1959
|
-
await this.sendStateNotifications('lowBatDevice', deviceID);
|
|
1959
|
+
await this.sendStateNotifications('Devices', 'lowBatDevice', deviceID);
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
@@ -1987,10 +1987,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1987
1987
|
if (deviceData.instanceDeviceConnectionDP.val !== undefined) {
|
|
1988
1988
|
// check if the generally deviceData connected state is for a while true
|
|
1989
1989
|
if (await this.getTimestampConnectionDP(deviceData.instanceDeviceConnectionDP, 20000)) {
|
|
1990
|
-
await this.sendStateNotifications('onlineStateDevice', deviceID);
|
|
1990
|
+
await this.sendStateNotifications('Devices', 'onlineStateDevice', deviceID);
|
|
1991
1991
|
}
|
|
1992
1992
|
} else {
|
|
1993
|
-
await this.sendStateNotifications('onlineStateDevice', deviceID);
|
|
1993
|
+
await this.sendStateNotifications('Devices', 'onlineStateDevice', deviceID);
|
|
1994
1994
|
}
|
|
1995
1995
|
}
|
|
1996
1996
|
}
|
|
@@ -2499,7 +2499,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2499
2499
|
|
|
2500
2500
|
// Check and send update notification if required
|
|
2501
2501
|
if (this.config.checkSendAdapterUpdateMsg && this.countAdapterUpdates > previousAdapterUpdatesCount) {
|
|
2502
|
-
await this.sendStateNotifications('updateAdapter', null);
|
|
2502
|
+
await this.sendStateNotifications('AdapterUpdates', 'updateAdapter', null);
|
|
2503
2503
|
}
|
|
2504
2504
|
|
|
2505
2505
|
// Update instances with available adapter updates
|
|
@@ -2542,7 +2542,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2542
2542
|
// send message when instance was deactivated
|
|
2543
2543
|
if (this.config.checkSendInstanceDeactivatedMsg && !instanceData.isAlive) {
|
|
2544
2544
|
if (this.blacklistInstancesNotify.includes(instanceID)) return;
|
|
2545
|
-
await this.sendStateNotifications('deactivatedInstance', instanceID);
|
|
2545
|
+
await this.sendStateNotifications('Instances', 'deactivatedInstance', instanceID);
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
2548
|
break;
|
|
@@ -2553,7 +2553,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2553
2553
|
// send message when instance has an error
|
|
2554
2554
|
if (this.config.checkSendInstanceFailedMsg && !instanceData.isHealthy && instanceData.isAlive) {
|
|
2555
2555
|
if (this.blacklistInstancesNotify.includes(instanceID)) return;
|
|
2556
|
-
await this.sendStateNotifications('errorInstance', instanceID);
|
|
2556
|
+
await this.sendStateNotifications('Instances', 'errorInstance', instanceID);
|
|
2557
2557
|
}
|
|
2558
2558
|
}
|
|
2559
2559
|
break;
|
|
@@ -2564,7 +2564,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2564
2564
|
// send message when instance has an error
|
|
2565
2565
|
if (this.config.checkSendInstanceFailedMsg && !instanceData.isHealthy && instanceData.isAlive) {
|
|
2566
2566
|
if (this.blacklistInstancesNotify.includes(instanceID)) return;
|
|
2567
|
-
await this.sendStateNotifications('errorInstance', instanceID);
|
|
2567
|
+
await this.sendStateNotifications('Instances', 'errorInstance', instanceID);
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
2570
|
break;
|
|
@@ -3052,22 +3052,26 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3052
3052
|
/*---------- Notifications ----------*/
|
|
3053
3053
|
/**
|
|
3054
3054
|
* Notifications on state changes
|
|
3055
|
+
* @param {string} mainType
|
|
3055
3056
|
* @param {string} type
|
|
3056
3057
|
* @param {object} id
|
|
3057
3058
|
*/
|
|
3058
|
-
async sendStateNotifications(type, id) {
|
|
3059
|
+
async sendStateNotifications(mainType, type, id) {
|
|
3059
3060
|
if (isUnloaded) return;
|
|
3060
3061
|
let objectData;
|
|
3061
3062
|
let adapterName;
|
|
3063
|
+
let list = '';
|
|
3064
|
+
let message = '';
|
|
3062
3065
|
|
|
3063
3066
|
if (id !== null) {
|
|
3064
|
-
|
|
3065
|
-
|
|
3067
|
+
if (mainType === 'Devices') {
|
|
3068
|
+
objectData = this.listAllDevicesRaw.get(id);
|
|
3069
|
+
adapterName = this.config.showAdapterNameinMsg ? `${objectData.Adapter}: ` : '';
|
|
3070
|
+
} else if (mainType === 'Instances') {
|
|
3071
|
+
objectData = this.listInstanceRaw.get(id);
|
|
3072
|
+
}
|
|
3066
3073
|
}
|
|
3067
3074
|
|
|
3068
|
-
let list = '';
|
|
3069
|
-
let message = '';
|
|
3070
|
-
|
|
3071
3075
|
const setMessage = async (message) => {
|
|
3072
3076
|
this.log.info(message);
|
|
3073
3077
|
await this.setStateAsync('lastNotification', message, true);
|
|
@@ -3114,7 +3118,6 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3114
3118
|
|
|
3115
3119
|
case 'errorInstance':
|
|
3116
3120
|
case 'deactivatedInstance':
|
|
3117
|
-
objectData = this.listInstanceRaw.get(id);
|
|
3118
3121
|
message = `${translations.Instance_Watchdog[this.userSystemLanguage]}:\n${id}: ${objectData.status}`;
|
|
3119
3122
|
await setMessage(message);
|
|
3120
3123
|
break;
|
|
@@ -3336,9 +3339,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3336
3339
|
|
|
3337
3340
|
for (const device of devices) {
|
|
3338
3341
|
html += `<tr>
|
|
3339
|
-
<td><font>${device.Device}</font></td>
|
|
3340
|
-
<td align=center><font>${device.Adapter}</font></td>
|
|
3341
|
-
<td align=center><font color=orange>${device.
|
|
3342
|
+
<td><font>${device[translations.Device[this.userSystemLanguage]]}</font></td>
|
|
3343
|
+
<td align=center><font>${device[translations.Adapter[this.userSystemLanguage]]}</font></td>
|
|
3344
|
+
<td align=center><font color=orange>${device[translations.Last_Contact[this.userSystemLanguage]]}</font></td>
|
|
3342
3345
|
</tr>`;
|
|
3343
3346
|
}
|
|
3344
3347
|
|
|
@@ -3393,6 +3396,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3393
3396
|
let html;
|
|
3394
3397
|
switch (type) {
|
|
3395
3398
|
case 'allInstancesList':
|
|
3399
|
+
instances = instances.sort((a, b) => {
|
|
3400
|
+
a = a.Instance || '';
|
|
3401
|
+
b = b.Instance || '';
|
|
3402
|
+
return a.localeCompare(b);
|
|
3403
|
+
});
|
|
3396
3404
|
html = `<center>
|
|
3397
3405
|
<b>${[translations.All_Instances[this.userSystemLanguage]]}:<font> ${instancesCount}</b><small></small></font>
|
|
3398
3406
|
<p></p>
|
|
@@ -3407,11 +3415,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3407
3415
|
<td colspan="5"><hr></td>
|
|
3408
3416
|
</tr>`;
|
|
3409
3417
|
|
|
3410
|
-
for (const
|
|
3418
|
+
for (const instanceData of instances) {
|
|
3411
3419
|
html += `<tr>
|
|
3412
|
-
<td><font>${instanceData.Adapter}</font></td>
|
|
3413
|
-
<td align=center><font>${
|
|
3414
|
-
<td align=center><font>${instanceData.
|
|
3420
|
+
<td><font>${instanceData[translations.Adapter[this.userSystemLanguage]]}</font></td>
|
|
3421
|
+
<td align=center><font>${instanceData[translations.Instance[this.userSystemLanguage]]}</font></td>
|
|
3422
|
+
<td align=center><font>${instanceData[translations.Status[this.userSystemLanguage]]}</font></td>
|
|
3415
3423
|
</tr>`;
|
|
3416
3424
|
}
|
|
3417
3425
|
|
|
@@ -3419,6 +3427,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3419
3427
|
break;
|
|
3420
3428
|
|
|
3421
3429
|
case 'allActiveInstancesList':
|
|
3430
|
+
instances = instances.sort((a, b) => {
|
|
3431
|
+
a = a.Instance || '';
|
|
3432
|
+
b = b.Instances || '';
|
|
3433
|
+
return a.localeCompare(b);
|
|
3434
|
+
});
|
|
3422
3435
|
html = `<center>
|
|
3423
3436
|
<b>${[translations.Active_Instances[this.userSystemLanguage]]}: <font> ${instancesCount}</b><small></small></font>
|
|
3424
3437
|
<p></p>
|
|
@@ -3433,20 +3446,23 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3433
3446
|
<td colspan="5"><hr></td>
|
|
3434
3447
|
</tr>`;
|
|
3435
3448
|
|
|
3436
|
-
for (const
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
<td><font>${instanceData.
|
|
3440
|
-
<td align=center><font>${
|
|
3441
|
-
<td align=center><font color=orange>${instanceData.status}</font></td>
|
|
3449
|
+
for (const instanceData of instances) {
|
|
3450
|
+
html += `<tr>
|
|
3451
|
+
<td><font>${instanceData[translations.Adapter[this.userSystemLanguage]]}</font></td>
|
|
3452
|
+
<td align=center><font>${instanceData[translations.Instance[this.userSystemLanguage]]}</font></td>
|
|
3453
|
+
<td align=center><font color=orange>${instanceData[translations.Status[this.userSystemLanguage]]}</font></td>
|
|
3442
3454
|
</tr>`;
|
|
3443
|
-
}
|
|
3444
3455
|
}
|
|
3445
3456
|
|
|
3446
3457
|
html += '</table>';
|
|
3447
3458
|
break;
|
|
3448
3459
|
|
|
3449
3460
|
case 'errorInstanceList':
|
|
3461
|
+
instances = instances.sort((a, b) => {
|
|
3462
|
+
a = a.Instance || '';
|
|
3463
|
+
b = b.Instances || '';
|
|
3464
|
+
return a.localeCompare(b);
|
|
3465
|
+
});
|
|
3450
3466
|
html = `<center>
|
|
3451
3467
|
<b>${[translations.Error_Instances[this.userSystemLanguage]]}: <font color=${instancesCount === 0 ? '#3bcf0e' : 'orange'}>${instancesCount}</b><small></small></font>
|
|
3452
3468
|
<p></p>
|
|
@@ -3461,11 +3477,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3461
3477
|
<td colspan="5"><hr></td>
|
|
3462
3478
|
</tr>`;
|
|
3463
3479
|
|
|
3464
|
-
for (const
|
|
3480
|
+
for (const instanceData of instances) {
|
|
3465
3481
|
html += `<tr>
|
|
3466
|
-
<td><font>${
|
|
3467
|
-
<td align=center><font>${
|
|
3468
|
-
<td align=center><font color=orange>${
|
|
3482
|
+
<td><font>${instanceData[translations.Adapter[this.userSystemLanguage]]}</font></td>
|
|
3483
|
+
<td align=center><font>${instanceData[translations.Instance[this.userSystemLanguage]]}</font></td>
|
|
3484
|
+
<td align=center><font color=orange>${instanceData[translations.Status[this.userSystemLanguage]]}</font></td>
|
|
3469
3485
|
</tr>`;
|
|
3470
3486
|
}
|
|
3471
3487
|
|
|
@@ -3473,6 +3489,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3473
3489
|
break;
|
|
3474
3490
|
|
|
3475
3491
|
case 'deactivatedInstanceList':
|
|
3492
|
+
instances = instances.sort((a, b) => {
|
|
3493
|
+
a = a.Instance || '';
|
|
3494
|
+
b = b.Instances || '';
|
|
3495
|
+
return a.localeCompare(b);
|
|
3496
|
+
});
|
|
3476
3497
|
html = `<center>
|
|
3477
3498
|
<b>${[translations.Deactivated_Instances[this.userSystemLanguage]]}: <font color=${instancesCount === 0 ? '#3bcf0e' : 'orange'}>${instancesCount}</b><small></small></font>
|
|
3478
3499
|
<p></p>
|
|
@@ -3487,12 +3508,12 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3487
3508
|
<td colspan="5"><hr></td>
|
|
3488
3509
|
</tr>`;
|
|
3489
3510
|
|
|
3490
|
-
for (const
|
|
3511
|
+
for (const instanceData of instances) {
|
|
3491
3512
|
if (!instanceData.isAlive) {
|
|
3492
3513
|
html += `<tr>
|
|
3493
|
-
<td><font>${instanceData.Adapter}</font></td>
|
|
3494
|
-
<td align=center><font>${
|
|
3495
|
-
<td align=center><font color=orange>${instanceData.
|
|
3514
|
+
<td><font>${instanceData[translations.Adapter[this.userSystemLanguage]]}</font></td>
|
|
3515
|
+
<td align=center><font>${instanceData[translations.Instance[this.userSystemLanguage]]}</font></td>
|
|
3516
|
+
<td align=center><font color=orange>${instanceData[translations.Status[this.userSystemLanguage]]}</font></td>
|
|
3496
3517
|
</tr>`;
|
|
3497
3518
|
}
|
|
3498
3519
|
}
|
|
@@ -3518,9 +3539,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3518
3539
|
for (const instanceData of instances.values()) {
|
|
3519
3540
|
if (instanceData.updateAvailable !== ' - ') {
|
|
3520
3541
|
html += `<tr>
|
|
3521
|
-
<td><font>${instanceData.Adapter}</font></td>
|
|
3522
|
-
<td align=center><font>${instanceData.
|
|
3523
|
-
<td align=center><font color=orange>${instanceData.
|
|
3542
|
+
<td><font>${instanceData[translations.Adapter[this.userSystemLanguage]]}</font></td>
|
|
3543
|
+
<td align=center><font>${instanceData[translations.Installed_Version[this.userSystemLanguage]]}</font></td>
|
|
3544
|
+
<td align=center><font color=orange>${instanceData[translations.Available_Version[this.userSystemLanguage]]}</font></td>
|
|
3524
3545
|
</tr>`;
|
|
3525
3546
|
}
|
|
3526
3547
|
}
|