iobroker.device-watcher 2.10.3 → 2.10.4
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 +6 -0
- package/admin/i18n/de/translations.json +2 -1
- package/admin/i18n/en/translations.json +168 -167
- package/admin/i18n/es/translations.json +2 -1
- package/admin/i18n/fr/translations.json +2 -1
- package/admin/i18n/it/translations.json +2 -1
- package/admin/i18n/nl/translations.json +2 -1
- package/admin/i18n/pl/translations.json +2 -1
- package/admin/i18n/pt/translations.json +2 -1
- package/admin/i18n/ru/translations.json +2 -1
- package/admin/i18n/uk/translations.json +2 -1
- package/admin/i18n/zh-cn/translations.json +2 -1
- package/admin/jsonConfig.json5 +24 -0
- package/io-package.json +861 -838
- package/main.js +179 -170
- package/package.json +9 -9
package/main.js
CHANGED
|
@@ -83,9 +83,6 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
83
83
|
// Check if main function is running
|
|
84
84
|
this.mainRunning = false;
|
|
85
85
|
|
|
86
|
-
// System anguage
|
|
87
|
-
this.userSystemLanguage;
|
|
88
|
-
|
|
89
86
|
this.on('ready', this.onReady.bind(this));
|
|
90
87
|
this.on('stateChange', this.onStateChange.bind(this));
|
|
91
88
|
this.on('objectChange', this.onObjectChange.bind(this));
|
|
@@ -100,11 +97,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
100
97
|
this.log.debug(`Adapter ${adapterName} was started`);
|
|
101
98
|
|
|
102
99
|
// set user language
|
|
103
|
-
if (this.
|
|
104
|
-
this.
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
if (this.config.userSelectedLanguage === '') {
|
|
101
|
+
if (this.language !== undefined && this.language !== null) {
|
|
102
|
+
this.config.userSelectedLanguage = this.language;
|
|
103
|
+
} else {
|
|
104
|
+
this.config.userSelectedLanguage = 'de';
|
|
105
|
+
}
|
|
107
106
|
}
|
|
107
|
+
this.log.debug(`Set language to ${this.config.userSelectedLanguage}`);
|
|
108
108
|
|
|
109
109
|
this.configCreateInstanceList = this.config.checkAdapterInstances;
|
|
110
110
|
this.configListOnlyBattery = this.config.listOnlyBattery;
|
|
@@ -394,8 +394,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
394
394
|
*/
|
|
395
395
|
async onStateChange(id, state) {
|
|
396
396
|
if (state) {
|
|
397
|
-
this.log.debug(`State changed: ${id} changed ${state.val}`);
|
|
398
|
-
|
|
397
|
+
// this.log.debug(`State changed: ${id} changed ${state.val}`);
|
|
399
398
|
try {
|
|
400
399
|
/*=============================================
|
|
401
400
|
= Instances / Adapter =
|
|
@@ -1223,10 +1222,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1223
1222
|
|
|
1224
1223
|
lastContactString = `${this.formatDate(new Date(selector), 'hh:mm')}`;
|
|
1225
1224
|
if (Math.round(lastContact) > 100) {
|
|
1226
|
-
lastContactString = `${Math.round(lastContact / 60)} ${translations.hours[this.
|
|
1225
|
+
lastContactString = `${Math.round(lastContact / 60)} ${translations.hours[this.config.userSelectedLanguage]}`;
|
|
1227
1226
|
}
|
|
1228
1227
|
if (Math.round(lastContact / 60) > 48) {
|
|
1229
|
-
lastContactString = `${Math.round(lastContact / 60 / 24)} ${translations.days[this.
|
|
1228
|
+
lastContactString = `${Math.round(lastContact / 60 / 24)} ${translations.days[this.config.userSelectedLanguage]}`;
|
|
1230
1229
|
}
|
|
1231
1230
|
return lastContactString;
|
|
1232
1231
|
}
|
|
@@ -1417,7 +1416,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1417
1416
|
* when was last contact of device
|
|
1418
1417
|
*/
|
|
1419
1418
|
async checkLastContact() {
|
|
1420
|
-
for (const [
|
|
1419
|
+
for (const [deviceID, deviceData] of this.listAllDevicesRaw.entries()) {
|
|
1421
1420
|
if (deviceData.instancedeviceConnected !== false) {
|
|
1422
1421
|
const oldContactState = deviceData.Status;
|
|
1423
1422
|
deviceData.UnreachState = await this.getInitValue(deviceData.UnreachDP);
|
|
@@ -1436,7 +1435,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1436
1435
|
deviceData.linkQuality = contactData[2];
|
|
1437
1436
|
}
|
|
1438
1437
|
if (this.config.checkSendOfflineMsg && oldContactState !== deviceData.Status && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1439
|
-
|
|
1438
|
+
// check if the generally deviceData connected state is for a while true
|
|
1439
|
+
if (await this.getTimestampConnectionDP(deviceData.instanceDeviceConnectionDP, 50000)) {
|
|
1440
|
+
await this.sendStateNotifications('Devices', 'onlineStateDevice', deviceID);
|
|
1441
|
+
}
|
|
1440
1442
|
}
|
|
1441
1443
|
}
|
|
1442
1444
|
}
|
|
@@ -1559,56 +1561,56 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1559
1561
|
|
|
1560
1562
|
// List with all devices
|
|
1561
1563
|
this.listAllDevices.push({
|
|
1562
|
-
[translations.Device[this.
|
|
1563
|
-
[translations.Adapter[this.
|
|
1564
|
-
[translations.Battery[this.
|
|
1565
|
-
[translations.Signal_strength[this.
|
|
1566
|
-
[translations.Last_Contact[this.
|
|
1567
|
-
[translations.Status[this.
|
|
1564
|
+
[translations.Device[this.config.userSelectedLanguage]]: device.Device,
|
|
1565
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: device.Adapter,
|
|
1566
|
+
[translations.Battery[this.config.userSelectedLanguage]]: device.Battery,
|
|
1567
|
+
[translations.Signal_strength[this.config.userSelectedLanguage]]: device.SignalStrength,
|
|
1568
|
+
[translations.Last_Contact[this.config.userSelectedLanguage]]: device.LastContact,
|
|
1569
|
+
[translations.Status[this.config.userSelectedLanguage]]: device.Status,
|
|
1568
1570
|
});
|
|
1569
1571
|
|
|
1570
1572
|
// LinkQuality lists
|
|
1571
1573
|
if (device.SignalStrength != ' - ') {
|
|
1572
1574
|
this.linkQualityDevices.push({
|
|
1573
|
-
[translations.Device[this.
|
|
1574
|
-
[translations.Adapter[this.
|
|
1575
|
-
[translations.Signal_strength[this.
|
|
1575
|
+
[translations.Device[this.config.userSelectedLanguage]]: device.Device,
|
|
1576
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: device.Adapter,
|
|
1577
|
+
[translations.Signal_strength[this.config.userSelectedLanguage]]: device.SignalStrength,
|
|
1576
1578
|
});
|
|
1577
1579
|
}
|
|
1578
1580
|
|
|
1579
1581
|
// Battery lists
|
|
1580
1582
|
if (device.isBatteryDevice) {
|
|
1581
1583
|
this.batteryPowered.push({
|
|
1582
|
-
[translations.Device[this.
|
|
1583
|
-
[translations.Adapter[this.
|
|
1584
|
-
[translations.Battery[this.
|
|
1585
|
-
[translations.Status[this.
|
|
1584
|
+
[translations.Device[this.config.userSelectedLanguage]]: device.Device,
|
|
1585
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: device.Adapter,
|
|
1586
|
+
[translations.Battery[this.config.userSelectedLanguage]]: device.Battery,
|
|
1587
|
+
[translations.Status[this.config.userSelectedLanguage]]: device.Status,
|
|
1586
1588
|
});
|
|
1587
1589
|
}
|
|
1588
1590
|
|
|
1589
1591
|
// Low Bat lists
|
|
1590
1592
|
if (device.LowBat && device.Status !== 'Offline') {
|
|
1591
1593
|
this.batteryLowPowered.push({
|
|
1592
|
-
[translations.Device[this.
|
|
1593
|
-
[translations.Adapter[this.
|
|
1594
|
-
[translations.Battery[this.
|
|
1594
|
+
[translations.Device[this.config.userSelectedLanguage]]: device.Device,
|
|
1595
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: device.Adapter,
|
|
1596
|
+
[translations.Battery[this.config.userSelectedLanguage]]: device.Battery,
|
|
1595
1597
|
});
|
|
1596
1598
|
}
|
|
1597
1599
|
|
|
1598
1600
|
// Offline List
|
|
1599
1601
|
if (device.Status === 'Offline') {
|
|
1600
1602
|
this.offlineDevices.push({
|
|
1601
|
-
[translations.Device[this.
|
|
1602
|
-
[translations.Adapter[this.
|
|
1603
|
-
[translations.Last_Contact[this.
|
|
1603
|
+
[translations.Device[this.config.userSelectedLanguage]]: device.Device,
|
|
1604
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: device.Adapter,
|
|
1605
|
+
[translations.Last_Contact[this.config.userSelectedLanguage]]: device.LastContact,
|
|
1604
1606
|
});
|
|
1605
1607
|
}
|
|
1606
1608
|
|
|
1607
1609
|
// Device update List
|
|
1608
1610
|
if (device.Upgradable === true || device.Upgradable === 1) {
|
|
1609
1611
|
this.upgradableList.push({
|
|
1610
|
-
[translations.Device[this.
|
|
1611
|
-
[translations.Adapter[this.
|
|
1612
|
+
[translations.Device[this.config.userSelectedLanguage]]: device.Device,
|
|
1613
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: device.Adapter,
|
|
1612
1614
|
});
|
|
1613
1615
|
}
|
|
1614
1616
|
}
|
|
@@ -1663,12 +1665,12 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1663
1665
|
// if no device is count, write the JSON List with default value
|
|
1664
1666
|
this.listAllDevices = [
|
|
1665
1667
|
{
|
|
1666
|
-
[translations.Device[this.
|
|
1667
|
-
[translations.Adapter[this.
|
|
1668
|
-
[translations.Battery[this.
|
|
1669
|
-
[translations.Signal_strength[this.
|
|
1670
|
-
[translations.Last_Contact[this.
|
|
1671
|
-
[translations.Status[this.
|
|
1668
|
+
[translations.Device[this.config.userSelectedLanguage]]: '--none--',
|
|
1669
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '',
|
|
1670
|
+
[translations.Battery[this.config.userSelectedLanguage]]: '',
|
|
1671
|
+
[translations.Signal_strength[this.config.userSelectedLanguage]]: '',
|
|
1672
|
+
[translations.Last_Contact[this.config.userSelectedLanguage]]: '',
|
|
1673
|
+
[translations.Status[this.config.userSelectedLanguage]]: '',
|
|
1672
1674
|
},
|
|
1673
1675
|
];
|
|
1674
1676
|
this.listAllDevicesUserRaw = [
|
|
@@ -1696,9 +1698,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1696
1698
|
// if no device is count, write the JSON List with default value
|
|
1697
1699
|
this.linkQualityDevices = [
|
|
1698
1700
|
{
|
|
1699
|
-
[translations.Device[this.
|
|
1700
|
-
[translations.Adapter[this.
|
|
1701
|
-
[translations.Signal_strength[this.
|
|
1701
|
+
[translations.Device[this.config.userSelectedLanguage]]: '--none--',
|
|
1702
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '',
|
|
1703
|
+
[translations.Signal_strength[this.config.userSelectedLanguage]]: '',
|
|
1702
1704
|
},
|
|
1703
1705
|
];
|
|
1704
1706
|
}
|
|
@@ -1713,9 +1715,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1713
1715
|
// if no device is count, write the JSON List with default value
|
|
1714
1716
|
this.offlineDevices = [
|
|
1715
1717
|
{
|
|
1716
|
-
[translations.Device[this.
|
|
1717
|
-
[translations.Adapter[this.
|
|
1718
|
-
[translations.Last_Contact[this.
|
|
1718
|
+
[translations.Device[this.config.userSelectedLanguage]]: '--none--',
|
|
1719
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '',
|
|
1720
|
+
[translations.Last_Contact[this.config.userSelectedLanguage]]: '',
|
|
1719
1721
|
},
|
|
1720
1722
|
];
|
|
1721
1723
|
}
|
|
@@ -1730,9 +1732,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1730
1732
|
// if no device is count, write the JSON List with default value
|
|
1731
1733
|
this.upgradableList = [
|
|
1732
1734
|
{
|
|
1733
|
-
[translations.Device[this.
|
|
1734
|
-
[translations.Adapter[this.
|
|
1735
|
-
[translations.Last_Contact[this.
|
|
1735
|
+
[translations.Device[this.config.userSelectedLanguage]]: '--none--',
|
|
1736
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '',
|
|
1737
|
+
[translations.Last_Contact[this.config.userSelectedLanguage]]: '',
|
|
1736
1738
|
},
|
|
1737
1739
|
];
|
|
1738
1740
|
}
|
|
@@ -1746,7 +1748,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1746
1748
|
if (this.batteryPoweredCount === 0) {
|
|
1747
1749
|
// if no device is count, write the JSON List with default value
|
|
1748
1750
|
this.batteryPowered = [
|
|
1749
|
-
{
|
|
1751
|
+
{
|
|
1752
|
+
[translations.Device[this.config.userSelectedLanguage]]: '--none--',
|
|
1753
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '',
|
|
1754
|
+
[translations.Battery[this.config.userSelectedLanguage]]: '',
|
|
1755
|
+
},
|
|
1750
1756
|
];
|
|
1751
1757
|
}
|
|
1752
1758
|
//write JSON list
|
|
@@ -1759,7 +1765,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1759
1765
|
if (this.lowBatteryPoweredCount === 0) {
|
|
1760
1766
|
// if no device is count, write the JSON List with default value
|
|
1761
1767
|
this.batteryLowPowered = [
|
|
1762
|
-
{
|
|
1768
|
+
{
|
|
1769
|
+
[translations.Device[this.config.userSelectedLanguage]]: '--none--',
|
|
1770
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '',
|
|
1771
|
+
[translations.Battery[this.config.userSelectedLanguage]]: '',
|
|
1772
|
+
},
|
|
1763
1773
|
];
|
|
1764
1774
|
}
|
|
1765
1775
|
//write JSON list
|
|
@@ -1964,8 +1974,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1964
1974
|
|
|
1965
1975
|
// device unreach
|
|
1966
1976
|
case deviceData.UnreachDP:
|
|
1967
|
-
if (deviceData.
|
|
1968
|
-
// check if the generally deviceData connected state is for a while true
|
|
1977
|
+
if (deviceData.instancedeviceConnected !== undefined) {
|
|
1969
1978
|
if (deviceData.UnreachState !== state.val) {
|
|
1970
1979
|
oldStatus = deviceData.Status;
|
|
1971
1980
|
deviceData.UnreachState = state.val;
|
|
@@ -1984,12 +1993,8 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1984
1993
|
deviceData.SignalStrength = contactData[2];
|
|
1985
1994
|
}
|
|
1986
1995
|
if (this.config.checkSendOfflineMsg && oldStatus !== deviceData.Status && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
1987
|
-
if
|
|
1988
|
-
|
|
1989
|
-
if (await this.getTimestampConnectionDP(deviceData.instanceDeviceConnectionDP, 20000)) {
|
|
1990
|
-
await this.sendStateNotifications('Devices', 'onlineStateDevice', deviceID);
|
|
1991
|
-
}
|
|
1992
|
-
} else {
|
|
1996
|
+
// check if the generally deviceData connected state is for a while true
|
|
1997
|
+
if (await this.getTimestampConnectionDP(deviceData.instanceDeviceConnectionDP, 50000)) {
|
|
1993
1998
|
await this.sendStateNotifications('Devices', 'onlineStateDevice', deviceID);
|
|
1994
1999
|
}
|
|
1995
2000
|
}
|
|
@@ -1999,6 +2004,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1999
2004
|
}
|
|
2000
2005
|
}
|
|
2001
2006
|
}
|
|
2007
|
+
|
|
2002
2008
|
/**
|
|
2003
2009
|
* get all Instances at start
|
|
2004
2010
|
*/
|
|
@@ -2141,16 +2147,16 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2141
2147
|
}
|
|
2142
2148
|
|
|
2143
2149
|
let isHealthy = false;
|
|
2144
|
-
let instanceStatusString = translations.instance_deactivated[this.
|
|
2150
|
+
let instanceStatusString = translations.instance_deactivated[this.config.userSelectedLanguage];
|
|
2145
2151
|
|
|
2146
2152
|
if (isAlive) {
|
|
2147
2153
|
if (connectedHostState && connectedDeviceState) {
|
|
2148
2154
|
isHealthy = true;
|
|
2149
|
-
instanceStatusString = translations.instance_okay[this.
|
|
2155
|
+
instanceStatusString = translations.instance_okay[this.config.userSelectedLanguage];
|
|
2150
2156
|
} else if (!connectedHostState) {
|
|
2151
|
-
instanceStatusString = translations.not_connected_host[this.
|
|
2157
|
+
instanceStatusString = translations.not_connected_host[this.config.userSelectedLanguage];
|
|
2152
2158
|
} else if (!connectedDeviceState) {
|
|
2153
|
-
instanceStatusString = translations.not_connected_device[this.
|
|
2159
|
+
instanceStatusString = translations.not_connected_device[this.config.userSelectedLanguage];
|
|
2154
2160
|
}
|
|
2155
2161
|
}
|
|
2156
2162
|
|
|
@@ -2166,7 +2172,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2166
2172
|
let isAlive = await this.getInitValue(`system.adapter.${instanceID}.alive`);
|
|
2167
2173
|
let daemonIsAlive;
|
|
2168
2174
|
let isHealthy = false;
|
|
2169
|
-
let instanceStatusString = isAlive ? translations.instance_activated[this.
|
|
2175
|
+
let instanceStatusString = isAlive ? translations.instance_activated[this.config.userSelectedLanguage] : translations.instance_deactivated[this.config.userSelectedLanguage];
|
|
2170
2176
|
|
|
2171
2177
|
if (isAlive) {
|
|
2172
2178
|
daemonIsAlive = await this.checkDaemonIsHealthy(instanceID);
|
|
@@ -2193,7 +2199,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2193
2199
|
let diff;
|
|
2194
2200
|
let isAlive = false;
|
|
2195
2201
|
let isHealthy = false;
|
|
2196
|
-
let instanceStatusString = translations.instance_deactivated[this.
|
|
2202
|
+
let instanceStatusString = translations.instance_deactivated[this.config.userSelectedLanguage];
|
|
2197
2203
|
const isAliveSchedule = await this.getForeignStateAsync(`system.adapter.${instanceID}.alive`);
|
|
2198
2204
|
|
|
2199
2205
|
if (isAliveSchedule) {
|
|
@@ -2206,7 +2212,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2206
2212
|
// if 5 minutes difference exceeded, instance is not alive
|
|
2207
2213
|
isAlive = true;
|
|
2208
2214
|
isHealthy = true;
|
|
2209
|
-
instanceStatusString = translations.instance_okay[this.
|
|
2215
|
+
instanceStatusString = translations.instance_okay[this.config.userSelectedLanguage];
|
|
2210
2216
|
}
|
|
2211
2217
|
}
|
|
2212
2218
|
}
|
|
@@ -2264,7 +2270,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2264
2270
|
|
|
2265
2271
|
let isAlive = false;
|
|
2266
2272
|
let isHealthy = false;
|
|
2267
|
-
let instanceStatusString = translations.instance_deactivated[this.
|
|
2273
|
+
let instanceStatusString = translations.instance_deactivated[this.config.userSelectedLanguage];
|
|
2268
2274
|
|
|
2269
2275
|
switch (instanceMode) {
|
|
2270
2276
|
case 'schedule':
|
|
@@ -2339,9 +2345,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2339
2345
|
|
|
2340
2346
|
for (const [adapter, updateData] of this.adapterUpdatesJsonRaw) {
|
|
2341
2347
|
this.listAdapterUpdates.push({
|
|
2342
|
-
[translations.Adapter[this.
|
|
2343
|
-
[translations.Available_Version[this.
|
|
2344
|
-
[translations.Installed_Version[this.
|
|
2348
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: adapter,
|
|
2349
|
+
[translations.Available_Version[this.config.userSelectedLanguage]]: updateData.newVersion,
|
|
2350
|
+
[translations.Installed_Version[this.config.userSelectedLanguage]]: updateData.oldVersion,
|
|
2345
2351
|
});
|
|
2346
2352
|
}
|
|
2347
2353
|
this.countAdapterUpdates = this.listAdapterUpdates.length;
|
|
@@ -2358,9 +2364,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2358
2364
|
if (this.countAdapterUpdates === 0) {
|
|
2359
2365
|
this.listAdapterUpdates = [
|
|
2360
2366
|
{
|
|
2361
|
-
[translations.Adapter[this.
|
|
2362
|
-
[translations.Available_Version[this.
|
|
2363
|
-
[translations.Installed_Version[this.
|
|
2367
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '--none--',
|
|
2368
|
+
[translations.Available_Version[this.config.userSelectedLanguage]]: '',
|
|
2369
|
+
[translations.Installed_Version[this.config.userSelectedLanguage]]: '',
|
|
2364
2370
|
},
|
|
2365
2371
|
];
|
|
2366
2372
|
}
|
|
@@ -2391,40 +2397,40 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2391
2397
|
if (this.blacklistInstancesLists.includes(instance)) continue;
|
|
2392
2398
|
// all instances
|
|
2393
2399
|
this.listAllInstances.push({
|
|
2394
|
-
[translations.Adapter[this.
|
|
2395
|
-
[translations.Instance[this.
|
|
2396
|
-
[translations.Mode[this.
|
|
2397
|
-
[translations.Schedule[this.
|
|
2398
|
-
[translations.Version[this.
|
|
2399
|
-
[translations.Updateable[this.
|
|
2400
|
-
[translations.Status[this.
|
|
2400
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: instanceData.Adapter,
|
|
2401
|
+
[translations.Instance[this.config.userSelectedLanguage]]: instance,
|
|
2402
|
+
[translations.Mode[this.config.userSelectedLanguage]]: instanceData.instanceMode,
|
|
2403
|
+
[translations.Schedule[this.config.userSelectedLanguage]]: instanceData.schedule,
|
|
2404
|
+
[translations.Version[this.config.userSelectedLanguage]]: instanceData.adapterVersion,
|
|
2405
|
+
[translations.Updateable[this.config.userSelectedLanguage]]: instanceData.updateAvailable,
|
|
2406
|
+
[translations.Status[this.config.userSelectedLanguage]]: instanceData.status,
|
|
2401
2407
|
});
|
|
2402
2408
|
|
|
2403
2409
|
if (!instanceData.isAlive) {
|
|
2404
2410
|
// list with deactivated instances
|
|
2405
2411
|
this.listDeactivatedInstances.push({
|
|
2406
|
-
[translations.Adapter[this.
|
|
2407
|
-
[translations.Instance[this.
|
|
2408
|
-
[translations.Status[this.
|
|
2412
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: instanceData.Adapter,
|
|
2413
|
+
[translations.Instance[this.config.userSelectedLanguage]]: instance,
|
|
2414
|
+
[translations.Status[this.config.userSelectedLanguage]]: instanceData.status,
|
|
2409
2415
|
});
|
|
2410
2416
|
} else {
|
|
2411
2417
|
// list with active instances
|
|
2412
2418
|
this.listAllActiveInstances.push({
|
|
2413
|
-
[translations.Adapter[this.
|
|
2414
|
-
[translations.Instance[this.
|
|
2415
|
-
[translations.Mode[this.
|
|
2416
|
-
[translations.Schedule[this.
|
|
2417
|
-
[translations.Status[this.
|
|
2419
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: instanceData.Adapter,
|
|
2420
|
+
[translations.Instance[this.config.userSelectedLanguage]]: instance,
|
|
2421
|
+
[translations.Mode[this.config.userSelectedLanguage]]: instanceData.instanceMode,
|
|
2422
|
+
[translations.Schedule[this.config.userSelectedLanguage]]: instanceData.schedule,
|
|
2423
|
+
[translations.Status[this.config.userSelectedLanguage]]: instanceData.status,
|
|
2418
2424
|
});
|
|
2419
2425
|
}
|
|
2420
2426
|
|
|
2421
2427
|
// list with error instances
|
|
2422
2428
|
if (instanceData.isAlive && !instanceData.isHealthy) {
|
|
2423
2429
|
this.listErrorInstance.push({
|
|
2424
|
-
[translations.Adapter[this.
|
|
2425
|
-
[translations.Instance[this.
|
|
2426
|
-
[translations.Mode[this.
|
|
2427
|
-
[translations.Status[this.
|
|
2430
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: instanceData.Adapter,
|
|
2431
|
+
[translations.Instance[this.config.userSelectedLanguage]]: instance,
|
|
2432
|
+
[translations.Mode[this.config.userSelectedLanguage]]: instanceData.instanceMode,
|
|
2433
|
+
[translations.Status[this.config.userSelectedLanguage]]: instanceData.status,
|
|
2428
2434
|
});
|
|
2429
2435
|
}
|
|
2430
2436
|
}
|
|
@@ -2462,10 +2468,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2462
2468
|
if (this.countDeactivatedInstances === 0) {
|
|
2463
2469
|
this.listDeactivatedInstances = [
|
|
2464
2470
|
{
|
|
2465
|
-
[translations.Adapter[this.
|
|
2466
|
-
[translations.Instance[this.
|
|
2467
|
-
[translations.Version[this.
|
|
2468
|
-
[translations.Status[this.
|
|
2471
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '--none--',
|
|
2472
|
+
[translations.Instance[this.config.userSelectedLanguage]]: '',
|
|
2473
|
+
[translations.Version[this.config.userSelectedLanguage]]: '',
|
|
2474
|
+
[translations.Status[this.config.userSelectedLanguage]]: '',
|
|
2469
2475
|
},
|
|
2470
2476
|
];
|
|
2471
2477
|
}
|
|
@@ -2476,10 +2482,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2476
2482
|
if (this.countErrorInstance === 0) {
|
|
2477
2483
|
this.listErrorInstance = [
|
|
2478
2484
|
{
|
|
2479
|
-
[translations.Adapter[this.
|
|
2480
|
-
[translations.Instance[this.
|
|
2481
|
-
[translations.Mode[this.
|
|
2482
|
-
[translations.Status[this.
|
|
2485
|
+
[translations.Adapter[this.config.userSelectedLanguage]]: '--none--',
|
|
2486
|
+
[translations.Instance[this.config.userSelectedLanguage]]: '',
|
|
2487
|
+
[translations.Mode[this.config.userSelectedLanguage]]: '',
|
|
2488
|
+
[translations.Status[this.config.userSelectedLanguage]]: '',
|
|
2483
2489
|
},
|
|
2484
2490
|
];
|
|
2485
2491
|
}
|
|
@@ -3080,25 +3086,25 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3080
3086
|
|
|
3081
3087
|
switch (type) {
|
|
3082
3088
|
case 'lowBatDevice':
|
|
3083
|
-
message = `${translations.Device_low_bat_detected[this.
|
|
3089
|
+
message = `${translations.Device_low_bat_detected[this.config.userSelectedLanguage]}: \n${adapterName} ${objectData.Device} (${objectData.Battery})`;
|
|
3084
3090
|
await setMessage(message);
|
|
3085
3091
|
break;
|
|
3086
3092
|
|
|
3087
3093
|
case 'onlineStateDevice':
|
|
3088
3094
|
switch (objectData.Status) {
|
|
3089
3095
|
case 'Online':
|
|
3090
|
-
message = `${translations.Device_available_again[this.
|
|
3096
|
+
message = `${translations.Device_available_again[this.config.userSelectedLanguage]}: \n${adapterName} ${objectData.Device} (${objectData.LastContact})`;
|
|
3091
3097
|
break;
|
|
3092
3098
|
|
|
3093
3099
|
case 'Offline':
|
|
3094
|
-
message = `${translations.Device_not_reachable[this.
|
|
3100
|
+
message = `${translations.Device_not_reachable[this.config.userSelectedLanguage]}: \n${adapterName} ${objectData.Device} (${objectData.LastContact})`;
|
|
3095
3101
|
break;
|
|
3096
3102
|
}
|
|
3097
3103
|
await setMessage(message);
|
|
3098
3104
|
break;
|
|
3099
3105
|
|
|
3100
3106
|
case 'updateDevice':
|
|
3101
|
-
message = `${translations.Device_new_updates[this.
|
|
3107
|
+
message = `${translations.Device_new_updates[this.config.userSelectedLanguage]}: \n${adapterName} ${objectData.Device}`;
|
|
3102
3108
|
await setMessage(message);
|
|
3103
3109
|
break;
|
|
3104
3110
|
|
|
@@ -3109,16 +3115,16 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3109
3115
|
list = '';
|
|
3110
3116
|
|
|
3111
3117
|
for (const id of objectData) {
|
|
3112
|
-
list = `${list}\n${id[translations.Adapter[this.
|
|
3118
|
+
list = `${list}\n${id[translations.Adapter[this.config.userSelectedLanguage]]}: v${id[translations.Available_Version[this.config.userSelectedLanguage]]}`;
|
|
3113
3119
|
}
|
|
3114
3120
|
|
|
3115
|
-
message = `${translations.Adapter_new_updates[this.
|
|
3121
|
+
message = `${translations.Adapter_new_updates[this.config.userSelectedLanguage]}: ${list}`;
|
|
3116
3122
|
await setMessage(message);
|
|
3117
3123
|
break;
|
|
3118
3124
|
|
|
3119
3125
|
case 'errorInstance':
|
|
3120
3126
|
case 'deactivatedInstance':
|
|
3121
|
-
message = `${translations.Instance_Watchdog[this.
|
|
3127
|
+
message = `${translations.Instance_Watchdog[this.config.userSelectedLanguage]}:\n${id}: ${objectData.status}`;
|
|
3122
3128
|
await setMessage(message);
|
|
3123
3129
|
break;
|
|
3124
3130
|
}
|
|
@@ -3143,6 +3149,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3143
3149
|
};
|
|
3144
3150
|
|
|
3145
3151
|
const processDeviceList = (deviceList, property1, property2) => {
|
|
3152
|
+
list = '';
|
|
3146
3153
|
for (const id of deviceList) {
|
|
3147
3154
|
if (this.blacklistNotify.includes(id.Path)) continue;
|
|
3148
3155
|
list += `\n${!this.config.showAdapterNameinMsg ? '' : id.Adapter + ': '}${id[property1]}${property2 ? ` (${id[property2]})` : ''}`;
|
|
@@ -3150,9 +3157,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3150
3157
|
};
|
|
3151
3158
|
|
|
3152
3159
|
const processInstanceList = (instanceList, property) => {
|
|
3160
|
+
list = '';
|
|
3153
3161
|
for (const id of instanceList) {
|
|
3154
|
-
if (this.blacklistInstancesNotify.includes(id[translations['Instance'][this.
|
|
3155
|
-
list += `\n${id[translations['Instance'][this.
|
|
3162
|
+
if (this.blacklistInstancesNotify.includes(id[translations['Instance'][this.config.userSelectedLanguage]])) continue;
|
|
3163
|
+
list += `\n${id[translations['Instance'][this.config.userSelectedLanguage]]}${property ? `: ${id[property]}` : ''}`;
|
|
3156
3164
|
}
|
|
3157
3165
|
};
|
|
3158
3166
|
|
|
@@ -3161,13 +3169,13 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3161
3169
|
|
|
3162
3170
|
switch (checkDays.length) {
|
|
3163
3171
|
case 1:
|
|
3164
|
-
message = `${translations.Weekly_overview[this.
|
|
3172
|
+
message = `${translations.Weekly_overview[this.config.userSelectedLanguage]} ${translations[messageType][this.config.userSelectedLanguage]}: ${list}`;
|
|
3165
3173
|
break;
|
|
3166
3174
|
case 7:
|
|
3167
|
-
message = `${translations.Daily_overview[this.
|
|
3175
|
+
message = `${translations.Daily_overview[this.config.userSelectedLanguage]} ${translations[messageType][this.config.userSelectedLanguage]}: ${list}`;
|
|
3168
3176
|
break;
|
|
3169
3177
|
default:
|
|
3170
|
-
message = `${translations.Overview_of[this.
|
|
3178
|
+
message = `${translations.Overview_of[this.config.userSelectedLanguage]} ${translations[messageType][this.config.userSelectedLanguage]}: ${list}`;
|
|
3171
3179
|
break;
|
|
3172
3180
|
}
|
|
3173
3181
|
|
|
@@ -3233,8 +3241,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3233
3241
|
this.log.debug(`Number of selected days for daily adapter update message: ${checkDays.length}. Send Message on: ${checkDays.join(', ')} ...`);
|
|
3234
3242
|
|
|
3235
3243
|
schedule.scheduleJob(`4 ${this.config.checkSendAdapterUpdateTime.split(':').reverse().join(' ')} * * ${checkDays.join(',')}`, async () => {
|
|
3244
|
+
list = '';
|
|
3236
3245
|
for (const id of this.listAdapterUpdates) {
|
|
3237
|
-
list = `${list}\n${id[translations.Adapter[this.
|
|
3246
|
+
list = `${list}\n${id[translations.Adapter[this.config.userSelectedLanguage]]}: v${id[translations.Available_Version[this.config.userSelectedLanguage]]}`;
|
|
3238
3247
|
}
|
|
3239
3248
|
await processNotification(list, 'available_adapter_updates');
|
|
3240
3249
|
});
|
|
@@ -3293,14 +3302,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3293
3302
|
return a.localeCompare(b);
|
|
3294
3303
|
});
|
|
3295
3304
|
html = `<center>
|
|
3296
|
-
<b>${[translations.Link_quality_devices[this.
|
|
3305
|
+
<b>${[translations.Link_quality_devices[this.config.userSelectedLanguage]]}:<font> ${deviceCount}</b><small></small></font>
|
|
3297
3306
|
<p></p>
|
|
3298
3307
|
</center>
|
|
3299
3308
|
<table width=100%>
|
|
3300
3309
|
<tr>
|
|
3301
|
-
<th align=left>${[translations.Device[this.
|
|
3302
|
-
<th align=center width=120>${[translations.Adapter[this.
|
|
3303
|
-
<th align=right>${[translations.Signal_strength[this.
|
|
3310
|
+
<th align=left>${[translations.Device[this.config.userSelectedLanguage]]}</th>
|
|
3311
|
+
<th align=center width=120>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3312
|
+
<th align=right>${[translations.Signal_strength[this.config.userSelectedLanguage]]}</th>
|
|
3304
3313
|
</tr>
|
|
3305
3314
|
<tr>
|
|
3306
3315
|
<td colspan="5"><hr></td>
|
|
@@ -3308,9 +3317,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3308
3317
|
|
|
3309
3318
|
for (const device of devices) {
|
|
3310
3319
|
html += `<tr>
|
|
3311
|
-
<td><font>${device[translations.Device[this.
|
|
3312
|
-
<td align=center><font>${device[translations.Adapter[this.
|
|
3313
|
-
<td align=right><font>${device[translations.Signal_strength[this.
|
|
3320
|
+
<td><font>${device[translations.Device[this.config.userSelectedLanguage]]}</font></td>
|
|
3321
|
+
<td align=center><font>${device[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3322
|
+
<td align=right><font>${device[translations.Signal_strength[this.config.userSelectedLanguage]]}</font></td>
|
|
3314
3323
|
</tr>`;
|
|
3315
3324
|
}
|
|
3316
3325
|
|
|
@@ -3324,14 +3333,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3324
3333
|
return a.localeCompare(b);
|
|
3325
3334
|
});
|
|
3326
3335
|
html = `<center>
|
|
3327
|
-
<b>${[translations.offline_devices[this.
|
|
3336
|
+
<b>${[translations.offline_devices[this.config.userSelectedLanguage]]}: <font color=${deviceCount === 0 ? '#3bcf0e' : 'orange'}>${deviceCount}</b><small></small></font>
|
|
3328
3337
|
<p></p>
|
|
3329
3338
|
</center>
|
|
3330
3339
|
<table width=100%>
|
|
3331
3340
|
<tr>
|
|
3332
|
-
<th align=left>${[translations.Device[this.
|
|
3333
|
-
<th align=center width=120>${[translations.Adapter[this.
|
|
3334
|
-
<th align=center>${[translations.Last_Contact[this.
|
|
3341
|
+
<th align=left>${[translations.Device[this.config.userSelectedLanguage]]}</th>
|
|
3342
|
+
<th align=center width=120>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3343
|
+
<th align=center>${[translations.Last_Contact[this.config.userSelectedLanguage]]}</th>
|
|
3335
3344
|
</tr>
|
|
3336
3345
|
<tr>
|
|
3337
3346
|
<td colspan="5"><hr></td>
|
|
@@ -3339,9 +3348,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3339
3348
|
|
|
3340
3349
|
for (const device of devices) {
|
|
3341
3350
|
html += `<tr>
|
|
3342
|
-
<td><font>${device[translations.Device[this.
|
|
3343
|
-
<td align=center><font>${device[translations.Adapter[this.
|
|
3344
|
-
<td align=center><font color=orange>${device[translations.Last_Contact[this.
|
|
3351
|
+
<td><font>${device[translations.Device[this.config.userSelectedLanguage]]}</font></td>
|
|
3352
|
+
<td align=center><font>${device[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3353
|
+
<td align=center><font color=orange>${device[translations.Last_Contact[this.config.userSelectedLanguage]]}</font></td>
|
|
3345
3354
|
</tr>`;
|
|
3346
3355
|
}
|
|
3347
3356
|
|
|
@@ -3355,28 +3364,28 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3355
3364
|
return a.localeCompare(b);
|
|
3356
3365
|
});
|
|
3357
3366
|
html = `<center>
|
|
3358
|
-
<b>${isLowBatteryList === true ? `${[translations.low[this.
|
|
3367
|
+
<b>${isLowBatteryList === true ? `${[translations.low[this.config.userSelectedLanguage]]} ` : ''}${[translations.battery_devices[this.config.userSelectedLanguage]]}:
|
|
3359
3368
|
<font color=${isLowBatteryList === true ? (deviceCount > 0 ? 'orange' : '#3bcf0e') : ''}>${deviceCount}</b></font>
|
|
3360
3369
|
<p></p>
|
|
3361
3370
|
</center>
|
|
3362
3371
|
<table width=100%>
|
|
3363
3372
|
<tr>
|
|
3364
|
-
<th align=left>${[translations.Device[this.
|
|
3365
|
-
<th align=center width=120>${[translations.Adapter[this.
|
|
3366
|
-
<th align=${isLowBatteryList ? 'center' : 'right'}>${[translations.Battery[this.
|
|
3373
|
+
<th align=left>${[translations.Device[this.config.userSelectedLanguage]]}</th>
|
|
3374
|
+
<th align=center width=120>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3375
|
+
<th align=${isLowBatteryList ? 'center' : 'right'}>${[translations.Battery[this.config.userSelectedLanguage]]}</th>
|
|
3367
3376
|
</tr>
|
|
3368
3377
|
<tr>
|
|
3369
3378
|
<td colspan="5"><hr></td>
|
|
3370
3379
|
</tr>`;
|
|
3371
3380
|
for (const device of devices) {
|
|
3372
3381
|
html += `<tr>
|
|
3373
|
-
<td><font>${device[translations.Device[this.
|
|
3374
|
-
<td align=center><font>${device[translations.Adapter[this.
|
|
3382
|
+
<td><font>${device[translations.Device[this.config.userSelectedLanguage]]}</font></td>
|
|
3383
|
+
<td align=center><font>${device[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>`;
|
|
3375
3384
|
|
|
3376
3385
|
if (isLowBatteryList) {
|
|
3377
|
-
html += `<td align=center><font color=orange>${device[translations.Battery[this.
|
|
3386
|
+
html += `<td align=center><font color=orange>${device[translations.Battery[this.config.userSelectedLanguage]]}</font></td>`;
|
|
3378
3387
|
} else {
|
|
3379
|
-
html += `<td align=right><font color=#3bcf0e>${device[translations.Battery[this.
|
|
3388
|
+
html += `<td align=right><font color=#3bcf0e>${device[translations.Battery[this.config.userSelectedLanguage]]}</font></td>`;
|
|
3380
3389
|
}
|
|
3381
3390
|
html += `</tr>`;
|
|
3382
3391
|
}
|
|
@@ -3402,14 +3411,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3402
3411
|
return a.localeCompare(b);
|
|
3403
3412
|
});
|
|
3404
3413
|
html = `<center>
|
|
3405
|
-
<b>${[translations.All_Instances[this.
|
|
3414
|
+
<b>${[translations.All_Instances[this.config.userSelectedLanguage]]}:<font> ${instancesCount}</b><small></small></font>
|
|
3406
3415
|
<p></p>
|
|
3407
3416
|
</center>
|
|
3408
3417
|
<table width=100%>
|
|
3409
3418
|
<tr>
|
|
3410
|
-
<th align=left>${[translations.Adapter[this.
|
|
3411
|
-
<th align=center>${[translations.Instance[this.
|
|
3412
|
-
<th align=center width=180>${[translations.Status[this.
|
|
3419
|
+
<th align=left>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3420
|
+
<th align=center>${[translations.Instance[this.config.userSelectedLanguage]]}</th>
|
|
3421
|
+
<th align=center width=180>${[translations.Status[this.config.userSelectedLanguage]]}</th>
|
|
3413
3422
|
</tr>
|
|
3414
3423
|
<tr>
|
|
3415
3424
|
<td colspan="5"><hr></td>
|
|
@@ -3417,9 +3426,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3417
3426
|
|
|
3418
3427
|
for (const instanceData of instances) {
|
|
3419
3428
|
html += `<tr>
|
|
3420
|
-
<td><font>${instanceData[translations.Adapter[this.
|
|
3421
|
-
<td align=center><font>${instanceData[translations.Instance[this.
|
|
3422
|
-
<td align=center><font>${instanceData[translations.Status[this.
|
|
3429
|
+
<td><font>${instanceData[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3430
|
+
<td align=center><font>${instanceData[translations.Instance[this.config.userSelectedLanguage]]}</font></td>
|
|
3431
|
+
<td align=center><font>${instanceData[translations.Status[this.config.userSelectedLanguage]]}</font></td>
|
|
3423
3432
|
</tr>`;
|
|
3424
3433
|
}
|
|
3425
3434
|
|
|
@@ -3433,14 +3442,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3433
3442
|
return a.localeCompare(b);
|
|
3434
3443
|
});
|
|
3435
3444
|
html = `<center>
|
|
3436
|
-
<b>${[translations.Active_Instances[this.
|
|
3445
|
+
<b>${[translations.Active_Instances[this.config.userSelectedLanguage]]}: <font> ${instancesCount}</b><small></small></font>
|
|
3437
3446
|
<p></p>
|
|
3438
3447
|
</center>
|
|
3439
3448
|
<table width=100%>
|
|
3440
3449
|
<tr>
|
|
3441
|
-
<th align=left>${[translations.Adapter[this.
|
|
3442
|
-
<th align=center>${[translations.Instance[this.
|
|
3443
|
-
<th align=center width=180>${[translations.Status[this.
|
|
3450
|
+
<th align=left>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3451
|
+
<th align=center>${[translations.Instance[this.config.userSelectedLanguage]]}</th>
|
|
3452
|
+
<th align=center width=180>${[translations.Status[this.config.userSelectedLanguage]]}</th>
|
|
3444
3453
|
</tr>
|
|
3445
3454
|
<tr>
|
|
3446
3455
|
<td colspan="5"><hr></td>
|
|
@@ -3448,9 +3457,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3448
3457
|
|
|
3449
3458
|
for (const instanceData of instances) {
|
|
3450
3459
|
html += `<tr>
|
|
3451
|
-
<td><font>${instanceData[translations.Adapter[this.
|
|
3452
|
-
<td align=center><font>${instanceData[translations.Instance[this.
|
|
3453
|
-
<td align=center><font color=orange>${instanceData[translations.Status[this.
|
|
3460
|
+
<td><font>${instanceData[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3461
|
+
<td align=center><font>${instanceData[translations.Instance[this.config.userSelectedLanguage]]}</font></td>
|
|
3462
|
+
<td align=center><font color=orange>${instanceData[translations.Status[this.config.userSelectedLanguage]]}</font></td>
|
|
3454
3463
|
</tr>`;
|
|
3455
3464
|
}
|
|
3456
3465
|
|
|
@@ -3464,14 +3473,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3464
3473
|
return a.localeCompare(b);
|
|
3465
3474
|
});
|
|
3466
3475
|
html = `<center>
|
|
3467
|
-
<b>${[translations.Error_Instances[this.
|
|
3476
|
+
<b>${[translations.Error_Instances[this.config.userSelectedLanguage]]}: <font color=${instancesCount === 0 ? '#3bcf0e' : 'orange'}>${instancesCount}</b><small></small></font>
|
|
3468
3477
|
<p></p>
|
|
3469
3478
|
</center>
|
|
3470
3479
|
<table width=100%>
|
|
3471
3480
|
<tr>
|
|
3472
|
-
<th align=left>${[translations.Adapter[this.
|
|
3473
|
-
<th align=center>${[translations.Instance[this.
|
|
3474
|
-
<th align=center width=180>${[translations.Status[this.
|
|
3481
|
+
<th align=left>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3482
|
+
<th align=center>${[translations.Instance[this.config.userSelectedLanguage]]}</th>
|
|
3483
|
+
<th align=center width=180>${[translations.Status[this.config.userSelectedLanguage]]}</th>
|
|
3475
3484
|
</tr>
|
|
3476
3485
|
<tr>
|
|
3477
3486
|
<td colspan="5"><hr></td>
|
|
@@ -3479,9 +3488,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3479
3488
|
|
|
3480
3489
|
for (const instanceData of instances) {
|
|
3481
3490
|
html += `<tr>
|
|
3482
|
-
<td><font>${instanceData[translations.Adapter[this.
|
|
3483
|
-
<td align=center><font>${instanceData[translations.Instance[this.
|
|
3484
|
-
<td align=center><font color=orange>${instanceData[translations.Status[this.
|
|
3491
|
+
<td><font>${instanceData[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3492
|
+
<td align=center><font>${instanceData[translations.Instance[this.config.userSelectedLanguage]]}</font></td>
|
|
3493
|
+
<td align=center><font color=orange>${instanceData[translations.Status[this.config.userSelectedLanguage]]}</font></td>
|
|
3485
3494
|
</tr>`;
|
|
3486
3495
|
}
|
|
3487
3496
|
|
|
@@ -3495,14 +3504,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3495
3504
|
return a.localeCompare(b);
|
|
3496
3505
|
});
|
|
3497
3506
|
html = `<center>
|
|
3498
|
-
<b>${[translations.Deactivated_Instances[this.
|
|
3507
|
+
<b>${[translations.Deactivated_Instances[this.config.userSelectedLanguage]]}: <font color=${instancesCount === 0 ? '#3bcf0e' : 'orange'}>${instancesCount}</b><small></small></font>
|
|
3499
3508
|
<p></p>
|
|
3500
3509
|
</center>
|
|
3501
3510
|
<table width=100%>
|
|
3502
3511
|
<tr>
|
|
3503
|
-
<th align=left>${[translations.Adapter[this.
|
|
3504
|
-
<th align=center>${[translations.Instance[this.
|
|
3505
|
-
<th align=center width=180>${[translations.Status[this.
|
|
3512
|
+
<th align=left>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3513
|
+
<th align=center>${[translations.Instance[this.config.userSelectedLanguage]]}</th>
|
|
3514
|
+
<th align=center width=180>${[translations.Status[this.config.userSelectedLanguage]]}</th>
|
|
3506
3515
|
</tr>
|
|
3507
3516
|
<tr>
|
|
3508
3517
|
<td colspan="5"><hr></td>
|
|
@@ -3511,9 +3520,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3511
3520
|
for (const instanceData of instances) {
|
|
3512
3521
|
if (!instanceData.isAlive) {
|
|
3513
3522
|
html += `<tr>
|
|
3514
|
-
<td><font>${instanceData[translations.Adapter[this.
|
|
3515
|
-
<td align=center><font>${instanceData[translations.Instance[this.
|
|
3516
|
-
<td align=center><font color=orange>${instanceData[translations.Status[this.
|
|
3523
|
+
<td><font>${instanceData[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3524
|
+
<td align=center><font>${instanceData[translations.Instance[this.config.userSelectedLanguage]]}</font></td>
|
|
3525
|
+
<td align=center><font color=orange>${instanceData[translations.Status[this.config.userSelectedLanguage]]}</font></td>
|
|
3517
3526
|
</tr>`;
|
|
3518
3527
|
}
|
|
3519
3528
|
}
|
|
@@ -3523,14 +3532,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3523
3532
|
|
|
3524
3533
|
case 'updateAdapterList':
|
|
3525
3534
|
html = `<center>
|
|
3526
|
-
<b>${[translations.Updatable_adapters[this.
|
|
3535
|
+
<b>${[translations.Updatable_adapters[this.config.userSelectedLanguage]]}: <font color=${instancesCount === 0 ? '#3bcf0e' : 'orange'}>${instancesCount}</b><small></small></font>
|
|
3527
3536
|
<p></p>
|
|
3528
3537
|
</center>
|
|
3529
3538
|
<table width=100%>
|
|
3530
3539
|
<tr>
|
|
3531
|
-
<th align=left>${[translations.Adapter[this.
|
|
3532
|
-
<th align=center>${[translations.Installed_Version[this.
|
|
3533
|
-
<th align=center>${[translations.Available_Version[this.
|
|
3540
|
+
<th align=left>${[translations.Adapter[this.config.userSelectedLanguage]]}</th>
|
|
3541
|
+
<th align=center>${[translations.Installed_Version[this.config.userSelectedLanguage]]}</th>
|
|
3542
|
+
<th align=center>${[translations.Available_Version[this.config.userSelectedLanguage]]}</th>
|
|
3534
3543
|
</tr>
|
|
3535
3544
|
<tr>
|
|
3536
3545
|
<td colspan="5"><hr></td>
|
|
@@ -3539,9 +3548,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3539
3548
|
for (const instanceData of instances.values()) {
|
|
3540
3549
|
if (instanceData.updateAvailable !== ' - ') {
|
|
3541
3550
|
html += `<tr>
|
|
3542
|
-
<td><font>${instanceData[translations.Adapter[this.
|
|
3543
|
-
<td align=center><font>${instanceData[translations.Installed_Version[this.
|
|
3544
|
-
<td align=center><font color=orange>${instanceData[translations.Available_Version[this.
|
|
3551
|
+
<td><font>${instanceData[translations.Adapter[this.config.userSelectedLanguage]]}</font></td>
|
|
3552
|
+
<td align=center><font>${instanceData[translations.Installed_Version[this.config.userSelectedLanguage]]}</font></td>
|
|
3553
|
+
<td align=center><font color=orange>${instanceData[translations.Available_Version[this.config.userSelectedLanguage]]}</font></td>
|
|
3545
3554
|
</tr>`;
|
|
3546
3555
|
}
|
|
3547
3556
|
}
|