iobroker.device-watcher 2.9.6 → 2.9.8
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 +11 -0
- package/admin/i18n/en/translations.json +5 -5
- package/admin/jsonConfig.json5 +19 -0
- package/admin/words.js +5 -5
- package/io-package.json +29 -27
- package/lib/arrApart.js +12 -0
- package/main.js +69 -47
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
**Tests:** </br>
|
|
20
20
|

|
|
21
21
|
[](https://github.com/ciddi89/ioBroker.device-watcher/actions/workflows/codeql.yml)
|
|
22
|
+
[](https://snyk.io/test/github/ciddi89/ioBroker.device-watcher)
|
|
22
23
|
|
|
23
24
|
## Sentry
|
|
24
25
|
|
|
@@ -188,6 +189,16 @@ It's possible to select:
|
|
|
188
189
|
Placeholder for the next version (at the beginning of the line):
|
|
189
190
|
### **WORK IN PROGRESS**
|
|
190
191
|
-->
|
|
192
|
+
### 2.9.8 (2023-11-26)
|
|
193
|
+
|
|
194
|
+
- (ciddi89) Fixed: Added additional check for instance states [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)
|
|
195
|
+
- (ciddi89) Fixed: Execute adapter even if no device adapter is selected
|
|
196
|
+
|
|
197
|
+
### 2.9.7 (2023-11-23)
|
|
198
|
+
|
|
199
|
+
- (ciddi89) Added: Support for Wifilight
|
|
200
|
+
- (ciddi89) Fixed: Multiple messages if Sonoff devices reachable [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)
|
|
201
|
+
|
|
191
202
|
### 2.9.6 (2023-11-12)
|
|
192
203
|
|
|
193
204
|
- (ciddi89) Fixed: Admin jsonConfig schema
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"Get daily an overview with all offline devices": "Get daily an overview with all offline devices",
|
|
29
29
|
"Get message if an device has low battery": "Get message if an device has low battery",
|
|
30
30
|
"Get message if an device is not reachable": "Get message if an device is not reachable",
|
|
31
|
-
"Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the datapoint lastNotification will be filled.": "Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the
|
|
32
|
-
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter ' 0 '.": "Here you can define the offline times of each adapter. If you want to use the
|
|
33
|
-
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter '-1'.": "Here you can define the offline times of each adapter. If you want to use the
|
|
34
|
-
"Here you can define the update interval of the datapoints/lists. For performance reasons, it is not recommended to select a poll value that is too low. Lower than two seconds is not selectable.": "Here you can define the update interval of the
|
|
31
|
+
"Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the datapoint lastNotification will be filled.": "Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the state lastNotification will be filled.",
|
|
32
|
+
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter ' 0 '.": "Here you can define the offline times of each adapter. If you want to use the states of the devices (online, available, reachable etc.) directly to determine the status, enter ' 0 '.",
|
|
33
|
+
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter '-1'.": "Here you can define the offline times of each adapter. If you want to use the states of the devices (online, available, reachable etc.) directly to determine the status, enter '-1'.",
|
|
34
|
+
"Here you can define the update interval of the datapoints/lists. For performance reasons, it is not recommended to select a poll value that is too low. Lower than two seconds is not selectable.": "Here you can define the update interval of the states/lists. For performance reasons, it is not recommended to select a poll value that is too low. Lower than two seconds is not selectable.",
|
|
35
35
|
"High Priority": "High Priority",
|
|
36
36
|
"If you like to have for every Adapter an own folder with own data": "If you like to have for every Adapter an own folder with own data",
|
|
37
37
|
"Ignor in lists": "Ignor in lists",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"Get a message with an overview all devices with update": "Get a message with an overview of all devices with update",
|
|
91
91
|
"Choose the day(s) where you want to get the overview of update devices:": "Choose the day(s) where you want to get the overview of update devices:",
|
|
92
92
|
"Other Notification Settings": "Other Notification Settings",
|
|
93
|
-
"Update datapoints directly": "Update
|
|
93
|
+
"Update datapoints directly": "Update states directly",
|
|
94
94
|
"Update lists & counts which each statechange of devices": "Update lists & counts which each statechange of devices",
|
|
95
95
|
"Update lists & counts directly with each statechange of devices": "Update lists & counts directly with each statechange of devices",
|
|
96
96
|
"Overview of low battery devices": "Overview of low battery devices",
|
package/admin/jsonConfig.json5
CHANGED
|
@@ -380,6 +380,13 @@
|
|
|
380
380
|
lg: 3,
|
|
381
381
|
label: 'Viessmann',
|
|
382
382
|
},
|
|
383
|
+
wifilightDevices: {
|
|
384
|
+
type: 'checkbox',
|
|
385
|
+
sm: 6,
|
|
386
|
+
md: 6,
|
|
387
|
+
lg: 3,
|
|
388
|
+
label: 'Wifilight',
|
|
389
|
+
},
|
|
383
390
|
wledDevices: {
|
|
384
391
|
type: 'checkbox',
|
|
385
392
|
sm: 6,
|
|
@@ -2320,6 +2327,18 @@
|
|
|
2320
2327
|
hidden: '!data.viessmannDevices',
|
|
2321
2328
|
hideOnlyControl: false,
|
|
2322
2329
|
},
|
|
2330
|
+
wifilightMaxMinutes: {
|
|
2331
|
+
type: 'number',
|
|
2332
|
+
min: -1,
|
|
2333
|
+
max: 100000,
|
|
2334
|
+
sm: 6,
|
|
2335
|
+
md: 6,
|
|
2336
|
+
lg: 3,
|
|
2337
|
+
label: 'Wifilight',
|
|
2338
|
+
help: 'in minutes',
|
|
2339
|
+
hidden: '!data.wifilightDevices',
|
|
2340
|
+
hideOnlyControl: false,
|
|
2341
|
+
},
|
|
2323
2342
|
wledMaxMinutes: {
|
|
2324
2343
|
type: 'number',
|
|
2325
2344
|
min: -1,
|
package/admin/words.js
CHANGED
|
@@ -37,10 +37,10 @@ systemDictionary = {
|
|
|
37
37
|
"Get daily an overview with all offline devices": {"en": "Get daily an overview with all offline devices", "de": "Erhalte täglich einen Übersicht mit allen Offline-Geräten", "ru": "Получайте ежедневный обзор всех автономных устройств", "pt": "Obtenha diariamente uma visão geral com todos os dispositivos offline", "nl": "Krijg dagelijks een overzicht met alle offline apparaten", "fr": "Obtenez quotidiennement un aperçu de tous les appareils hors ligne", "it": "Ottieni quotidianamente una panoramica di tutti i dispositivi offline", "es": "Obtenga diariamente una descripción general con todos los dispositivos fuera de línea", "pl": "Otrzymuj codziennie przegląd wszystkich urządzeń offline", "uk": "Отримуйте щоденний огляд усіх офлайн-пристроїв", "zh-cn": "每天获取所有离线设备的概览"},
|
|
38
38
|
"Get message if an device has low battery": { "en": "Get message if an device has low battery", "de": "Erhalte eine Nachricht, wenn die Batterie eines Geräts schwach ist", "ru": "Получить сообщение, если на устройстве разряжена батарея", "pt": "Receber mensagem se um dispositivo estiver com bateria fraca", "nl": "Ontvang een bericht als de batterij van een apparaat bijna leeg is", "fr": "Recevoir un message si un appareil a une batterie faible", "it": "Ricevi un messaggio se un dispositivo ha la batteria scarica", "es": "Recibe un mensaje si un dispositivo tiene poca batería", "pl": "Otrzymuj wiadomość, jeśli urządzenie ma niski poziom naładowania baterii", "uk": "Отримувати повідомлення, якщо пристрій розрядився", "zh-cn": "如果设备电池电量不足,则获取消息"},
|
|
39
39
|
"Get message if an device is not reachable": { "en": "Get message if an device is not reachable", "de": "Erhalte eine Nachricht, wenn ein Gerät nicht erreichbar ist", "ru": "Получить сообщение, если устройство недоступно", "pt": "Receber mensagem se um dispositivo não estiver acessível", "nl": "Ontvang een bericht als een apparaat niet bereikbaar is", "fr": "Recevoir un message si un appareil n'est pas accessible", "it": "Ricevi un messaggio se un dispositivo non è raggiungibile", "es": "Recibir un mensaje si no se puede acceder a un dispositivo", "pl": "Otrzymuj wiadomość, jeśli urządzenie jest nieosiągalne", "uk": "Отримати повідомлення, якщо пристрій недоступний", "zh-cn": "如果设备无法访问,则获取消息"},
|
|
40
|
-
"Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the datapoint lastNotification will be filled.": {"en": "Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the
|
|
41
|
-
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter ' 0 '.": {"en": "Here you can define the offline times of each adapter. If you want to use the
|
|
42
|
-
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter '-1'.": {"en": "Here you can define the offline times of each adapter. If you want to use the
|
|
43
|
-
"Here you can define the update interval of the datapoints/lists. For performance reasons, it is not recommended to select a poll value that is too low. Lower than two seconds is not selectable.": {"en": "Here you can define the update interval of the
|
|
40
|
+
"Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the datapoint lastNotification will be filled.": {"en": "Here you can choose your notification service, you can use more than one service, but you can also leave all blank, then only the state lastNotification will be filled.", "de": "Hier können der Benachrichtigungsdienst auswählt werden. Es kann mehr als einen Dienst verwendet werden. Man kann auch alle leer lassen, dann wird nur der Datenpunkt lastNotification gefüllt.", "ru": "Здесь вы можете выбрать службу уведомлений, вы можете использовать более одной службы, но вы также можете оставить все пустым, тогда будет заполнена только точка данных lastNotification.", "pt": "Aqui você pode escolher seu serviço de notificação, você pode usar mais de um serviço, mas também pode deixar todos em branco, então apenas o datapoint lastNotification será preenchido.", "nl": "Hier kunt u uw meldingsservice kiezen, u kunt meer dan één service gebruiken, maar u kunt ook alles leeg laten, dan wordt alleen het datapunt lastNotification gevuld.", "fr": "Ici, vous pouvez choisir votre service de notification, vous pouvez utiliser plus d'un service, mais vous pouvez également tout laisser vide, alors seul le point de données lastNotification sera rempli.", "it": "Qui puoi scegliere il tuo servizio di notifica, puoi utilizzare più di un servizio, ma puoi anche lasciare tutto vuoto, quindi verrà riempito solo il datapoint lastNotification.", "es": "Aquí puede elegir su servicio de notificación, puede usar más de un servicio, pero también puede dejar todo en blanco, luego solo se completará el punto de datos lastNotification.", "pl": "Tutaj możesz wybrać usługę powiadamiania, możesz korzystać z więcej niż jednej usługi, ale możesz również pozostawić wszystko puste, wtedy zostanie wypełniony tylko punkt danych lastNotification.", "uk": "Тут ви можете вибрати свою службу сповіщень, ви можете використовувати більше однієї служби, але ви також можете залишити всі порожніми, тоді буде заповнено лише точку даних lastNotification.", "zh-cn": "在这里你可以选择你的通知服务,你可以使用多个服务,但你也可以全部留空,那么只会填写数据点lastNotification。"},
|
|
41
|
+
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter ' 0 '.": {"en": "Here you can define the offline times of each adapter. If you want to use the states of the devices (online, available, reachable etc.) directly to determine the status, enter ' 0 '.", "de": "Hier kann man die Offline-Zeiten jedes Adapters definieren. Wenn die Datenpunkte der Geräte (online, verfügbar, erreichbar etc.) direkt zur Statusermittlung genutzt werden sollen, bitte '0' eingeben.", "ru": "Здесь вы можете определить время автономной работы каждого адаптера. Если вы хотите использовать точки данных устройств (в сети, доступны, доступны и т. д.) непосредственно для определения статуса, введите «0».", "pt": "Aqui você pode definir os tempos offline de cada adaptador. Se você quiser usar os pontos de dados dos dispositivos (online, disponíveis, alcançáveis etc.) diretamente para determinar o status, digite ' 0 '.", "nl": "Hier kunt u de offline tijden van elke adapter definiëren. Wil je de datapunten van de apparaten (online, beschikbaar, bereikbaar etc.) direct gebruiken om de status te bepalen, vul dan '0' in.", "fr": "Ici, vous pouvez définir les heures hors ligne de chaque adaptateur. Si vous souhaitez utiliser directement les points de données des appareils (en ligne, disponibles, joignables, etc.) pour déterminer l'état, entrez ' 0 '.", "it": "Qui puoi definire i tempi offline di ciascun adattatore. Se si desidera utilizzare direttamente i punti dati dei dispositivi (online, disponibili, raggiungibili ecc.) per determinarne lo stato, immettere ' 0 '.", "es": "Aquí puede definir los tiempos fuera de línea de cada adaptador. Si desea utilizar los puntos de datos de los dispositivos (en línea, disponibles, accesibles, etc.) directamente para determinar el estado, ingrese ' 0 '.", "pl": "Tutaj możesz zdefiniować czasy offline każdego adaptera. Jeśli chcesz wykorzystać punkty danych urządzeń (online, dostępne, osiągalne itp.) bezpośrednio do określenia stanu, wpisz „0”.", "uk": "Тут ви можете визначити час автономної роботи кожного адаптера. Якщо ви хочете використовувати точки даних пристроїв (онлайн, доступний, доступний тощо) безпосередньо для визначення статусу, введіть «0».", "zh-cn": "您可以在此处定义每个适配器的离线时间。如果要直接使用设备的数据点(在线、可用、可达等)来确定状态,请输入“0”。"},
|
|
42
|
+
"Here you can define the offline times of each adapter. If you want to use the data points of the devices (online, available, reachable etc.) directly to determine the status, enter '-1'.": {"en": "Here you can define the offline times of each adapter. If you want to use the states of the devices (online, available, reachable etc.) directly to determine the status, enter '-1'.", "de": "Hier gebenkann man die Offline-Zeiten jedes Adapters definieren. Wenn die Datenpunkte der Geräte (online, verfügbar, erreichbar etc.) direkt zur Statusermittlung verwendet werden sollen, '-1' ein.", "ru": "Здесь вы можете определить время автономной работы каждого адаптера. Если вы хотите использовать точки данных устройств (в сети, доступны, доступны и т. д.) непосредственно для определения статуса, введите «-1».", "pt": "Aqui você pode definir os tempos offline de cada adaptador. Se você quiser usar os pontos de dados dos dispositivos (online, disponíveis, alcançáveis etc.) diretamente para determinar o status, digite '-1'.", "nl": "Hier kunt u de offline tijden van elke adapter definiëren. Wil je de datapunten van de apparaten (online, beschikbaar, bereikbaar etc.) direct gebruiken om de status te bepalen, vul dan '-1' in.", "fr": "Ici, vous pouvez définir les heures hors ligne de chaque adaptateur. Si vous souhaitez utiliser directement les points de données des appareils (en ligne, disponibles, joignables, etc.) pour déterminer l'état, entrez '-1'.", "it": "Qui puoi definire i tempi offline di ciascun adattatore. Se si desidera utilizzare direttamente i punti dati dei dispositivi (online, disponibili, raggiungibili ecc.) per determinare lo stato, immettere '-1'.", "es": "Aquí puede definir los tiempos fuera de línea de cada adaptador. Si desea utilizar los puntos de datos de los dispositivos (en línea, disponibles, accesibles, etc.) directamente para determinar el estado, ingrese '-1'.", "pl": "Tutaj możesz zdefiniować czasy offline każdego adaptera. Jeśli chcesz wykorzystać punkty danych urządzeń (online, dostępne, osiągalne itp.) bezpośrednio do określenia stanu, wpisz „-1”.", "uk": "Тут ви можете визначити час автономної роботи кожного адаптера. Якщо ви хочете використовувати точки даних пристроїв (онлайн, доступний, доступний тощо) безпосередньо для визначення статусу, введіть «-1».", "zh-cn": "您可以在此处定义每个适配器的离线时间。如果您想直接使用设备的数据点(在线、可用、可达等)来确定状态,请输入“-1”。"},
|
|
43
|
+
"Here you can define the update interval of the datapoints/lists. For performance reasons, it is not recommended to select a poll value that is too low. Lower than two seconds is not selectable.": {"en": "Here you can define the update interval of the states/lists. For performance reasons, it is not recommended to select a poll value that is too low. Lower than two seconds is not selectable.", "de": "Hier kann man das Aktualisierungsintervall der Datenpunkte/Listen festlegen. Aus Performance-Gründen wird davon abgeraten, einen zu niedrigen Poll-Wert zu wählen. Weniger als zwei Sekunden sind nicht wählbar.", "ru": "Здесь вы можете определить интервал обновления точек данных/списков. Из соображений производительности не рекомендуется выбирать слишком низкое значение опроса. Меньше двух секунд выбрать нельзя.", "pt": "Aqui você pode definir o intervalo de atualização dos pontos de dados/listas. Por motivos de desempenho, não é recomendável selecionar um valor de sondagem muito baixo. Inferior a dois segundos não é selecionável.", "nl": "Hier kunt u het update-interval van de datapunten/lijsten definiëren. Om prestatieredenen wordt het niet aanbevolen om een te lage poll-waarde te selecteren. Lager dan twee seconden kan niet worden geselecteerd.", "fr": "Ici, vous pouvez définir l'intervalle de mise à jour des points de données/listes. Pour des raisons de performances, il est déconseillé de sélectionner une valeur d'interrogation trop faible. Inférieur à deux secondes n'est pas sélectionnable.", "it": "Qui è possibile definire l'intervallo di aggiornamento dei punti dati/elenchi. Per motivi di prestazioni, non è consigliabile selezionare un valore di polling troppo basso. Meno di due secondi non è selezionabile.", "es": "Aquí puede definir el intervalo de actualización de los puntos de datos/listas. Por motivos de rendimiento, no se recomienda seleccionar un valor de sondeo demasiado bajo. Menos de dos segundos no es seleccionable.", "pl": "Tutaj możesz zdefiniować interwał aktualizacji punktów danych/list. Ze względu na wydajność nie zaleca się wybierania zbyt niskiej wartości sondy. Nie można wybrać mniej niż dwie sekundy.", "uk": "Тут ви можете визначити інтервал оновлення точок даних/списків. З міркувань продуктивності не рекомендується вибирати занадто низьке значення опитування. Менше двох секунд вибрати неможливо.", "zh-cn": "您可以在此处定义数据点/列表的更新间隔。出于性能原因,不建议选择太低的轮询值。低于两秒是不可选的。"},
|
|
44
44
|
"High Priority": { "en": "High Priority", "de": "Hohe Priorität", "ru": "Высокий приоритет", "pt": "Prioridade máxima", "nl": "Hoge prioriteit", "fr": "Haute priorité", "it": "Priorità alta", "es": "Alta prioridad", "pl": "Wysoki priorytet", "uk": "Високий пріоритет", "zh-cn": "高优先级"},
|
|
45
45
|
"If you like to have for every Adapter an own folder with own data": {"en": "If you like to have for every Adapter an own folder with own data", "de": "Wenn gewünscht, kann für jeden Adapter ein eigener Ordner mit eigenen Daten verwendet werden.", "ru": "Если вы хотите иметь для каждого адаптера собственную папку с собственными данными", "pt": "Se você gosta de ter para cada adaptador uma pasta própria com dados próprios", "nl": "Als je voor elke Adapter een eigen map met eigen gegevens wilt hebben", "fr": "Si vous souhaitez avoir pour chaque adaptateur un dossier avec ses propres données", "it": "Se ti piace avere per ogni Adapter una propria cartella con i propri dati", "es": "Si desea tener para cada adaptador una carpeta propia con datos propios", "pl": "Jeśli chcesz mieć dla każdego adaptera własny folder z własnymi danymi", "uk": "Якщо ви хочете мати для кожного адаптера власну папку з власними даними", "zh-cn": "如果您希望每个适配器都有一个包含自己数据的文件夹"},
|
|
46
46
|
"Ignor in lists": { "en": "Ignor in lists", "de": "In Listen ignorieren", "ru": "Игнорировать в списках", "pt": "Ignorar nas listas", "nl": "Negeren in lijsten", "fr": "Ignorer dans les listes", "it": "Ignora nelle liste", "es": "Ignorar en listas", "pl": "Ignoruj na listach", "uk": "Ігнорувати в списках", "zh-cn": "在列表中忽略"},
|
|
@@ -104,7 +104,7 @@ systemDictionary = {
|
|
|
104
104
|
"Other Notification Settings": { "en": "Other Notification Settings", "de": "Andere Benachrichtigungseinstellungen", "ru": "Другие настройки уведомлений", "pt": "Outras configurações de notificação", "nl": "Andere meldingsinstellingen", "fr": "Autres paramètres de notification", "it": "Altre impostazioni di notifica", "es": "Otras configuraciones de notificación", "pl": "Inne ustawienia powiadomień", "uk": "Інші налаштування сповіщень", "zh-cn": "其他通知设置"},
|
|
105
105
|
"Update the datapoints directly": { "en": "", "de": "Aktualisieren Sie die Datenpunkte direkt", "ru": "Обновляйте точки данных напрямую", "pt": "Atualize os pontos de dados diretamente", "nl": "Werk de datapunten direct bij", "fr": "Mettre à jour les points de données directement", "it": "Aggiorna direttamente i datapoint", "es": "Actualizar los puntos de datos directamente", "pl": "Bezpośrednio aktualizuj punkty danych", "uk": "Оновіть точки даних безпосередньо", "zh-cn": "直接更新数据点"},
|
|
106
106
|
"Update lists & counts which each statechange of devices": {"en": "Update lists & counts which each statechange of devices", "de": "Aktualisiere Listen und Zählungen, die sich bei jedem Statuswechsel von Geräten ändern", "ru": "Обновление списков и подсчетов при каждом изменении состояния устройств.", "pt": "Listas de atualização e conta qual cada mudança de estado dos dispositivos", "nl": "Update lijsten & tellingen die elke statusverandering van apparaten", "fr": "Mettre à jour les listes et compter chaque changement d'état des appareils", "it": "Aggiorna elenchi e conteggi che ogni stato cambia di dispositivi", "es": "Actualizar listas y recuentos en los que cada estado cambia de dispositivos", "pl": "Aktualizuj listy i liczniki, które powodują każdą zmianę stanu urządzeń", "uk": "Оновлення списків і підрахунок кожної зміни стану пристроїв", "zh-cn": "更新设备每次状态变化的列表和计数"},
|
|
107
|
-
"Update datapoints directly": { "en": "Update
|
|
107
|
+
"Update datapoints directly": { "en": "Update states directly", "de": "Datenpunkte direkt aktualisieren", "ru": "Обновляйте точки данных напрямую", "pt": "Atualizar pontos de dados diretamente", "nl": "Update datapunten direct", "fr": "Mettre à jour directement les points de données", "it": "Aggiorna direttamente i datapoint", "es": "Actualizar puntos de datos directamente", "pl": "Aktualizuj punkty danych bezpośrednio", "uk": "Оновіть точки даних безпосередньо", "zh-cn": "直接更新数据点"},
|
|
108
108
|
"Update lists & counts directly with each statechange of devices": {"en": "Update lists & counts directly with each statechange of devices", "de": "Aktualisieren Sie Listen und Zählungen direkt bei jedem Zustandswechsel von Geräten", "ru": "Обновляйте списки и счетчики непосредственно при каждом изменении состояния устройств.", "pt": "Atualiza listas e contagens diretamente com cada mudança de estado dos dispositivos", "nl": "Update lijsten en tellingen direct bij elke statusverandering van apparaten", "fr": "Mettre à jour les listes et les décomptes directement à chaque changement d'état des appareils", "it": "Aggiorna elenchi e conteggi direttamente con ogni cambio di stato dei dispositivi", "es": "Actualice listas y conteos directamente con cada cambio de estado de los dispositivos", "pl": "Aktualizuj listy i liczniki bezpośrednio przy każdej zmianie stanu urządzeń", "uk": "Оновлюйте списки та підрахунки безпосередньо з кожною зміною стану пристроїв", "zh-cn": "每次设备状态变化时直接更新列表和计数"},
|
|
109
109
|
"Overview of low battery devices": { "en": "Overview of low battery devices", "de": "Übersicht über schwache Batteriegeräte", "ru": "Обзор устройств с низким зарядом батареи", "pt": "Visão geral de dispositivos com bateria fraca", "nl": "Overzicht apparaten met bijna lege batterij", "fr": "Aperçu des appareils à batterie faible", "it": "Panoramica dei dispositivi con batteria scarica", "es": "Descripción general de los dispositivos con batería baja", "pl": "Przegląd urządzeń o niskim poziomie naładowania baterii", "uk": "Огляд розряджених пристроїв", "zh-cn": "低电量设备概述"},
|
|
110
110
|
"Get a regular message with an overview all low battery devices": {"en": "Get a regular message with an overview all low battery devices", "de": "Erhalten Sie eine regelmäßige Nachricht mit einer Übersicht aller schwachen Batteriegeräte", "ru": "Получайте регулярное сообщение с обзором всех устройств с низким зарядом батареи", "pt": "Receba uma mensagem regular com uma visão geral de todos os dispositivos com bateria fraca", "nl": "Ontvang regelmatig een bericht met een overzicht van alle bijna lege apparaten", "fr": "Recevez un message régulier avec un aperçu de tous les appareils à batterie faible", "it": "Ricevi un messaggio regolare con una panoramica di tutti i dispositivi con batteria scarica", "es": "Reciba un mensaje regular con una descripción general de todos los dispositivos con batería baja", "pl": "Otrzymuj regularne wiadomości z przeglądem wszystkich urządzeń o niskim poziomie baterii", "uk": "Отримуйте регулярне повідомлення з оглядом усіх пристроїв із розрядженим акумулятором", "zh-cn": "获取包含所有低电量设备概览的常规消息"},
|
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.8",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.9.8": {
|
|
7
|
+
"en": "Fixed: Added additional check for instance states [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nFixed: Execute adapter even if no device adapter is selected",
|
|
8
|
+
"de": "Behoben: Zusätzliche Überprüfung der Instanz Zustände [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nFix: Adapter ausführen, auch wenn keine Geräte/Services gewählt wurde",
|
|
9
|
+
"ru": "Исправлено: Добавлена дополнительная проверка для штатов [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nИсправлено: Выполнить адаптер, даже если не выбран адаптер устройства",
|
|
10
|
+
"pt": "Corrigido: Adicionado check adicional para estados de instância [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nCorrigido: Executar adaptador mesmo que nenhum adaptador de dispositivo seja selecionado",
|
|
11
|
+
"nl": "Vertaling:\nExecute adapter zelfs als er geen apparaat wordt geselecteerd",
|
|
12
|
+
"fr": "Correction : Ajout d ' un contrôle supplémentaire par exemple : [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nFixé: Adaptateur execute même si aucun adaptateur de dispositif n'est sélectionné",
|
|
13
|
+
"it": "Fisso: Aggiunto il controllo supplementare per gli stati di esempio [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nFisso: Esegui l'adattatore anche se non viene selezionato nessun adattatore del dispositivo",
|
|
14
|
+
"es": "Fijación: Agregado cheque adicional por ejemplo estados [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nFijo: Ejecutar adaptador incluso si no se selecciona un adaptador de dispositivo",
|
|
15
|
+
"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",
|
|
16
|
+
"uk": "Виправлено: Додана додаткова перевірка станів екземпляра [#262](https://github.com/ciddi89/ioBroker.device-watcher/issues/262)\nВиправлено: Виконувати адаптер навіть якщо пристрій не вибрано",
|
|
17
|
+
"zh-cn": "固定地点:添加更多检查,例如[第262](http://github.com/ciddi89/ioBroker.device-watcher/issues/262)\n固定:假肢变器,即使没有装置的配件被选用"
|
|
18
|
+
},
|
|
19
|
+
"2.9.7": {
|
|
20
|
+
"en": "Added: Support for Wifilight\nFixed: Multiple messages if Sonoff devices reachable [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
21
|
+
"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)",
|
|
22
|
+
"ru": "Добавлена: Поддержка Wifilight\nИсправлено: Несколько сообщений, если устройства Sonoff доступны [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
23
|
+
"pt": "Adicionado: Suporte para Wifilight\nCorrigido: Múltiplas mensagens se os dispositivos Sonoff atingirem [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
24
|
+
"nl": "Vertaling:\nVertaling:",
|
|
25
|
+
"fr": "Ajouté: Support pour Wifi\nCorrection : Messages multiples si les appareils Sonoff sont accessibles [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
26
|
+
"it": "Aggiunto: Supporto per Wifilight\nFisso: Messaggi multipli se dispositivi Sonoff raggiungibili [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
27
|
+
"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)",
|
|
28
|
+
"pl": "Wspieranie Wifilight\nFixed: Multiple messages, jeśli urządzenia Sonoff docierają do miejsca #244 (https:/github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
29
|
+
"uk": "Доданий: Підтримка Wifilight\nВиправлено: Кілька повідомлень, якщо пристрої Sonoff досягаються [#244](https://github.com/ciddi89/ioBroker.device-watcher/issues/244)",
|
|
30
|
+
"zh-cn": "增 编:支持光明\nFixed:Sonoff装置可达到[第244](http://github.com/ciddi89/ioBroker.device-watcher/issues/244)"
|
|
31
|
+
},
|
|
6
32
|
"2.9.6": {
|
|
7
33
|
"en": "Fixed: Admin jsonConfig schema\nChanged: Admin jsonConfig to json5\nAdded: Support for Tuya devices with online state\nOthers: cleaned up files",
|
|
8
34
|
"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",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Fixed: Instance in schedule notifications for faulty instances (ang.)\nFix: Ignore null value in updated datapoints (ang.)\nZastrzeżenie: Zależność",
|
|
68
94
|
"uk": "Виправлено: Ім'я користувача в розкладі повідомлень для несправних екземплярів\nВиправлено: значення Ignore null в оновленні точок даних пристроїв\nОновлено: Залежності",
|
|
69
95
|
"zh-cn": "固定:在通知过失事件时的名称\nFixed: Ignore在更新装置数据点时丧失价值\n更新:属地"
|
|
70
|
-
},
|
|
71
|
-
"2.9.1": {
|
|
72
|
-
"en": "Removed: Function for error handling (not neccessary)",
|
|
73
|
-
"de": "Entfernt: Funktion zur Fehlerbehandlung (nicht erforderlich)",
|
|
74
|
-
"ru": "Удалено: функция обработки ошибок (не обязательно)",
|
|
75
|
-
"pt": "Removido: Função para manipulação de erros (não necessário)",
|
|
76
|
-
"nl": "Verwijderd: Functie voor fouten omgaan met (niet negatief)",
|
|
77
|
-
"fr": "Supprimé : Fonction pour la manipulation d'erreurs (pas neccessaire)",
|
|
78
|
-
"it": "Rimosso: Funzione per la gestione degli errori (non neccessario)",
|
|
79
|
-
"es": "Retirado: Función para el manejo de errores (no es necesario)",
|
|
80
|
-
"pl": "Removed: Funkcje służące do obsługi błędów (nie wymagania)",
|
|
81
|
-
"uk": "Видалити: Функція для обробки помилок (необхідний)",
|
|
82
|
-
"zh-cn": "删除:处理错误(未作必要说明)的职能"
|
|
83
|
-
},
|
|
84
|
-
"2.9.0": {
|
|
85
|
-
"en": "Fixed: Deactivated instances were not displayed in the daily message about deactivated instances\nAdded: Viessmann devices, Homekit-Controller devices\nImprovements: Text of overview messages",
|
|
86
|
-
"de": "Behoben: Deaktivierte Instanzen wurden nicht in den Übersichtnachrichten über deaktivierte Instanzen angezeigt\nHinzugefügt: Viessmann Geräte, Homekit-Controller Geräte\nVerbesserungen: Text der Übersichtsnachrichten",
|
|
87
|
-
"ru": "Исправлено: Отключенные экземпляры не отображались в ежедневном сообщении о деактивированных инстанциях\nДобавлены: Viessmann устройства, Homekit-Controller устройства\nУлучшения: Текст обзорных сообщений",
|
|
88
|
-
"pt": "Corrigido: As instâncias desativadas não foram exibidas na mensagem diária sobre instâncias desativadas\nAdicionado: dispositivos Viessmann, dispositivos Homekit-Controller\nMelhorias: Texto de mensagens de visão geral",
|
|
89
|
-
"nl": "Gedeactiveerde instanties werden niet getoond in de dagelijkse boodschap over gedeactiveerde instanties\nVertaling:\nImprovementen: Text of overzicht berichten",
|
|
90
|
-
"fr": "Correction : Les instances désactivées n'ont pas été affichées dans le message quotidien concernant les instances désactivées\nAjouté: Appareils Viessmann, Dispositifs Homekit-Controller\nAméliorations : Texte des messages d ' aperçu",
|
|
91
|
-
"it": "Risolto: Le istanze disattivate non sono state visualizzate nel messaggio quotidiano sulle istanze disattivate\nAggiunto: dispositivi Viessmann, dispositivi Homekit-Controller\nMiglioramenti: Testo dei messaggi di panoramica",
|
|
92
|
-
"es": "Fijo: No se mostraron casos desactivados en el mensaje diario sobre casos desactivados\nAñadido: dispositivos Viessmann, dispositivos Homekit-Controller\nMejoras: Texto de los mensajes de visión general",
|
|
93
|
-
"pl": "Na przykładzie uaktywniono: Zdeaktywowane instancje nie były wyświetlane w codziennym wiadomości o deaktywowanych instancjach\nAdded: urządzenia Viessmanna\nPoprawa: Tekst overview",
|
|
94
|
-
"uk": "Виправлено: Деактивовані екземпляри не відображалися в щоденному повідомленні про деактивовані екземпляри\nДодано: пристрої Viessmann, пристрої Homekit-Controller\nУдосконалення: Текст повідомлення",
|
|
95
|
-
"zh-cn": "Fixed:Deactiving cases的每日信息未显示有关违犯事件的报道。\n增 编:维斯曼装置、家里克特-Controller装置\n改进: 总讯案文"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -303,6 +303,8 @@
|
|
|
303
303
|
"unifiMaxMinutes": 0,
|
|
304
304
|
"viessmannDevices": false,
|
|
305
305
|
"viessmannMaxMinutes": 0,
|
|
306
|
+
"wifilightDevices": false,
|
|
307
|
+
"wifilightMaxMinutes": 0,
|
|
306
308
|
"wledDevices": false,
|
|
307
309
|
"wledMaxMinutes": 0,
|
|
308
310
|
"yeelightDevices": false,
|
package/lib/arrApart.js
CHANGED
|
@@ -576,6 +576,18 @@ const arrApart = {
|
|
|
576
576
|
id: 'none',
|
|
577
577
|
upgrade: 'none',
|
|
578
578
|
},
|
|
579
|
+
wifilight: {
|
|
580
|
+
Selektor: 'wifilight.*.reachable',
|
|
581
|
+
timeSelector: '.reachable',
|
|
582
|
+
adapterID: 'wifilight',
|
|
583
|
+
adapter: 'Wifilight',
|
|
584
|
+
rssiState: 'none',
|
|
585
|
+
battery: 'none',
|
|
586
|
+
reach: '.reachable',
|
|
587
|
+
isLowBat: 'none',
|
|
588
|
+
id: 'none',
|
|
589
|
+
upgrade: 'none',
|
|
590
|
+
},
|
|
579
591
|
wled: {
|
|
580
592
|
Selektor: 'wled.*._online',
|
|
581
593
|
timeSelector: '._online',
|
package/main.js
CHANGED
|
@@ -150,6 +150,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
150
150
|
tuya: this.config.tuyaDevices,
|
|
151
151
|
unifi: this.config.unifiDevices,
|
|
152
152
|
viessmann: this.config.viessmannDevices,
|
|
153
|
+
wifilight: this.config.wifilightDevices,
|
|
153
154
|
wled: this.config.wledDevices,
|
|
154
155
|
yeelight: this.config.yeelightDevices,
|
|
155
156
|
zigbee: this.config.zigbeeDevices,
|
|
@@ -210,6 +211,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
210
211
|
tuya: this.config.tuyaMaxMinutes,
|
|
211
212
|
unifi: this.config.unifiMaxMinutes,
|
|
212
213
|
viessmann: this.config.viessmannMaxMinutes,
|
|
214
|
+
wifilight: this.config.wifilightMaxMinutes,
|
|
213
215
|
wled: this.config.wledMaxMinutes,
|
|
214
216
|
yeelight: this.config.yeelightMaxMinutes,
|
|
215
217
|
zigbee: this.config.zigbeeMaxMinutes,
|
|
@@ -225,17 +227,6 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
225
227
|
}
|
|
226
228
|
}
|
|
227
229
|
|
|
228
|
-
//Check if an Adapter is selected.
|
|
229
|
-
if (this.adapterSelected.length >= 1) {
|
|
230
|
-
// show list in debug log
|
|
231
|
-
this.log.debug(JSON.stringify(this.selAdapter));
|
|
232
|
-
|
|
233
|
-
this.log.info(`Number of selected adapters: ${this.adapterSelected.length}. Loading data from: ${this.adapterSelected.join(', ')} ...`);
|
|
234
|
-
} else {
|
|
235
|
-
this.log.warn(`No adapter selected. Please check the instance configuration!`);
|
|
236
|
-
return; // cancel run if no adapter is selected
|
|
237
|
-
}
|
|
238
|
-
|
|
239
230
|
//create Blacklist
|
|
240
231
|
await this.createBlacklist();
|
|
241
232
|
|
|
@@ -370,7 +361,6 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
370
361
|
* @param {ioBroker.State | null | undefined} state
|
|
371
362
|
*/
|
|
372
363
|
async onStateChange(id, state) {
|
|
373
|
-
// Admin JSON for Adapter updates
|
|
374
364
|
if (state) {
|
|
375
365
|
// this.log.debug(`State changed: ${id} changed ${state.val}`);
|
|
376
366
|
let batteryData;
|
|
@@ -381,7 +371,6 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
381
371
|
let isLowBatValue;
|
|
382
372
|
let instanceStatusRaw;
|
|
383
373
|
let oldAdapterUpdatesCounts;
|
|
384
|
-
let oldIsHealthyValue;
|
|
385
374
|
|
|
386
375
|
try {
|
|
387
376
|
// adapter updates
|
|
@@ -405,30 +394,49 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
405
394
|
|
|
406
395
|
// instances
|
|
407
396
|
for (const [instanceID, instanceData] of this.listInstanceRaw) {
|
|
397
|
+
const checkInstance = async (instanceID, instanceData) => {
|
|
398
|
+
if (!instanceData.checkIsRunning) {
|
|
399
|
+
instanceData.checkIsRunning = true;
|
|
400
|
+
instanceStatusRaw = await this.setInstanceStatus(instanceData.instanceMode, instanceData.schedule, instanceID);
|
|
401
|
+
instanceData.isAlive = instanceStatusRaw[0];
|
|
402
|
+
instanceData.isHealthy = instanceStatusRaw[1];
|
|
403
|
+
instanceData.status = instanceStatusRaw[2];
|
|
404
|
+
instanceData.checkIsRunning = false;
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
408
|
switch (id) {
|
|
409
409
|
case `system.adapter.${instanceID}.alive`:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
if (!instanceData.checkIsRunning) {
|
|
413
|
-
instanceData.checkIsRunning = true;
|
|
414
|
-
oldIsHealthyValue = instanceData.isHealthy;
|
|
415
|
-
instanceStatusRaw = await this.setInstanceStatus(instanceData.instanceMode, instanceData.schedule, instanceID);
|
|
416
|
-
instanceData.isAlive = instanceStatusRaw[0];
|
|
417
|
-
instanceData.isHealthy = instanceStatusRaw[1];
|
|
418
|
-
instanceData.status = instanceStatusRaw[2];
|
|
419
|
-
instanceData.checkIsRunning = false;
|
|
420
|
-
if (oldIsHealthyValue === instanceData.isHealthy) continue;
|
|
410
|
+
if (state.val !== instanceData.isAlive) {
|
|
411
|
+
await checkInstance(instanceID, instanceData);
|
|
421
412
|
// send message when instance was deactivated
|
|
422
413
|
if (this.config.checkSendInstanceDeactivatedMsg && !instanceData.isAlive) {
|
|
423
414
|
if (this.blacklistInstancesNotify.includes(instanceID)) continue;
|
|
424
415
|
await this.sendStateNotifications('deactivatedInstance', instanceID);
|
|
425
416
|
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
break;
|
|
420
|
+
case `system.adapter.${instanceID}.connected`:
|
|
421
|
+
if (state.val !== instanceData.isConnectedHost && instanceData.isAlive) {
|
|
422
|
+
await checkInstance(instanceID, instanceData);
|
|
423
|
+
// send message when instance has an error
|
|
424
|
+
if (this.config.checkSendInstanceFailedMsg && !instanceData.isHealthy && instanceData.isAlive) {
|
|
425
|
+
if (this.blacklistInstancesNotify.includes(instanceID)) continue;
|
|
426
|
+
await this.sendStateNotifications('errorInstance', instanceID);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
break;
|
|
430
|
+
case `${instanceID}.info.connection`:
|
|
431
|
+
if (state.val !== instanceData.isConnectedDevice && instanceData.isAlive) {
|
|
432
|
+
await checkInstance(instanceID, instanceData);
|
|
426
433
|
// send message when instance has an error
|
|
427
|
-
if (this.config.checkSendInstanceFailedMsg && instanceData.
|
|
434
|
+
if (this.config.checkSendInstanceFailedMsg && !instanceData.isHealthy && instanceData.isAlive) {
|
|
428
435
|
if (this.blacklistInstancesNotify.includes(instanceID)) continue;
|
|
429
436
|
await this.sendStateNotifications('errorInstance', instanceID);
|
|
430
437
|
}
|
|
431
438
|
}
|
|
439
|
+
|
|
432
440
|
break;
|
|
433
441
|
}
|
|
434
442
|
}
|
|
@@ -526,30 +534,32 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
526
534
|
|
|
527
535
|
// device unreach
|
|
528
536
|
case deviceData.UnreachDP:
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
if (
|
|
547
|
-
|
|
548
|
-
|
|
537
|
+
if (deviceData.UnreachState !== state.val) {
|
|
538
|
+
oldStatus = deviceData.Status;
|
|
539
|
+
deviceData.UnreachState = state.val;
|
|
540
|
+
contactData = await this.getOnlineState(
|
|
541
|
+
deviceData.timeSelector,
|
|
542
|
+
deviceData.adapterID,
|
|
543
|
+
deviceData.UnreachDP,
|
|
544
|
+
deviceData.SignalStrength,
|
|
545
|
+
deviceData.UnreachState,
|
|
546
|
+
deviceData.DeviceStateSelectorDP,
|
|
547
|
+
deviceData.rssiPeerSelectorDP,
|
|
548
|
+
);
|
|
549
|
+
if (contactData !== undefined) {
|
|
550
|
+
deviceData.LastContact = contactData[0];
|
|
551
|
+
deviceData.Status = contactData[1];
|
|
552
|
+
deviceData.SignalStrength = contactData[2];
|
|
553
|
+
}
|
|
554
|
+
if (this.config.checkSendOfflineMsg && oldStatus !== deviceData.Status && !this.blacklistNotify.includes(deviceData.Path)) {
|
|
555
|
+
if (deviceData.instanceDeviceConnectionDP.val !== undefined) {
|
|
556
|
+
// check if the generally deviceData connected state is for a while true
|
|
557
|
+
if (await this.getTimestampConnectionDP(deviceData.instanceDeviceConnectionDP, 20000)) {
|
|
558
|
+
await this.sendStateNotifications('onlineStateDevice', device);
|
|
559
|
+
}
|
|
560
|
+
} else {
|
|
549
561
|
await this.sendStateNotifications('onlineStateDevice', device);
|
|
550
562
|
}
|
|
551
|
-
} else {
|
|
552
|
-
await this.sendStateNotifications('onlineStateDevice', device);
|
|
553
563
|
}
|
|
554
564
|
}
|
|
555
565
|
break;
|
|
@@ -658,6 +668,17 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
658
668
|
async main() {
|
|
659
669
|
this.log.debug(`Function started: ${this.main.name}`);
|
|
660
670
|
|
|
671
|
+
//Check if an Adapter is selected.
|
|
672
|
+
if (this.adapterSelected.length >= 1) {
|
|
673
|
+
// show list in debug log
|
|
674
|
+
this.log.debug(JSON.stringify(this.selAdapter));
|
|
675
|
+
|
|
676
|
+
this.log.info(`Number of selected adapters: ${this.adapterSelected.length}. Loading data from: ${this.adapterSelected.join(', ')} ...`);
|
|
677
|
+
} else {
|
|
678
|
+
this.log.info(`No adapter selected. Please check the instance configuration!`);
|
|
679
|
+
return; // cancel run if no adapter is selected
|
|
680
|
+
}
|
|
681
|
+
|
|
661
682
|
// fill counts and lists of all selected adapter
|
|
662
683
|
try {
|
|
663
684
|
for (let i = 0; i < this.selAdapter.length; i++) {
|
|
@@ -1141,6 +1162,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1141
1162
|
|
|
1142
1163
|
//Get ID of foldername
|
|
1143
1164
|
case 'tado':
|
|
1165
|
+
case 'wifilight':
|
|
1144
1166
|
deviceName = currDeviceString.slice(currDeviceString.lastIndexOf('.') + 1);
|
|
1145
1167
|
break;
|
|
1146
1168
|
|