iobroker.device-watcher 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/admin/i18n/de/translations.json +9 -1
- package/admin/i18n/en/translations.json +9 -1
- package/admin/i18n/es/translations.json +9 -1
- package/admin/i18n/fr/translations.json +9 -1
- package/admin/i18n/it/translations.json +9 -1
- package/admin/i18n/nl/translations.json +9 -1
- package/admin/i18n/pl/translations.json +9 -1
- package/admin/i18n/pt/translations.json +9 -1
- package/admin/i18n/ru/translations.json +9 -1
- package/admin/i18n/uk/translations.json +9 -1
- package/admin/i18n/zh-cn/translations.json +9 -1
- package/admin/jsonConfig.json +125 -0
- package/io-package.json +27 -14
- package/lib/arrApart.js +10 -0
- package/main.js +113 -47
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -189,6 +189,15 @@ It's possible to select:
|
|
|
189
189
|
Placeholder for the next version (at the beginning of the line):
|
|
190
190
|
### **WORK IN PROGRESS**
|
|
191
191
|
-->
|
|
192
|
+
### 2.8.0 (2023-04-04)
|
|
193
|
+
|
|
194
|
+
- (ciddi89) Added: Support for LOQED Smart Lock
|
|
195
|
+
- (ciddi89) Added: Option to add user/group api key for Pushover
|
|
196
|
+
- (ciddi89) Added: Option to send notification if an instance was stopped
|
|
197
|
+
- (ciddi89) Added: Option to send shedule notifications with overview of stopped instances
|
|
198
|
+
- (ciddi89) Fixed: Issue if notifications was send of stopped instance but the option wasn't choosen
|
|
199
|
+
- (ciddi89) Fixed: Ignore battery values 0% if they were not smaller than 5% before
|
|
200
|
+
|
|
192
201
|
### 2.7.1 (2023-03-26)
|
|
193
202
|
|
|
194
203
|
- (ciddi89) Added: Support for Ecovacs-Deebot
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Fehlerzeit für Instanzen",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Hier können Sie die Fehlerzeit jeder Instanz definieren. Der Standardwert beträgt 20 Sekunden.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Wählen Sie aus, welche Instanzen eine längere Ausfallzeit haben sollen",
|
|
145
|
-
"Time in seconds": "Zeit in Sekunden"
|
|
145
|
+
"Time in seconds": "Zeit in Sekunden",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Wählen Sie Ihr API/KEY-Token für die Push-Nachricht",
|
|
147
|
+
"Instance deactivated message": "Meldung „Instanz deaktiviert“",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Erhalten Sie eine Nachricht, wenn eine Instanz deaktiviert wird",
|
|
149
|
+
"Overview of deactivated instances": "Übersicht der deaktivierten Instanzen",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Erhalten Sie eine Nachricht mit einer Übersicht aller deaktivierten Instanzen",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Wählen Sie die Tage aus, an denen Sie die Übersicht der deaktivierten Instanzen erhalten möchten:",
|
|
152
|
+
"User/Group key (optional)": "Benutzer-/Gruppenschlüssel (optional)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Wählen Sie Ihren Benutzer-/Gruppenschlüssel für die Push-Nachricht"
|
|
146
154
|
}
|
|
@@ -137,5 +137,13 @@
|
|
|
137
137
|
"Error Time for Instances": "Error Time for Instances",
|
|
138
138
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Here you can define the error time of each instance. The standard value is 20 seconds.",
|
|
139
139
|
"Choose which instances should have a longer downtime": "Choose which instances should have a longer downtime",
|
|
140
|
-
"Time in seconds": "Time in seconds"
|
|
140
|
+
"Time in seconds": "Time in seconds",
|
|
141
|
+
"Choose your API/KEY Token for Pushmessage": "Choose your API/KEY Token for Pushmessage",
|
|
142
|
+
"Instance deactivated message": "Instance deactivated message",
|
|
143
|
+
"Receive a message when an instance is deactivated": "Receive a message when an instance is deactivated",
|
|
144
|
+
"Overview of deactivated instances": "Overview of deactivated instances",
|
|
145
|
+
"Get a message with an overview of all deactivated instances": "Get a message with an overview of all deactivated instances",
|
|
146
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Choose the day(s) where you want to get the overview of deactivated instances:",
|
|
147
|
+
"User/Group key (optional)": "User/Group key (optional)",
|
|
148
|
+
"Choose your User/Group key for Pushmessage": "Choose your User/Group key for Pushmessage"
|
|
141
149
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Tiempo de error para instancias",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Aquí puede definir el tiempo de error de cada instancia. El valor estándar es de 20 segundos.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Elija qué instancias deben tener un tiempo de inactividad más largo",
|
|
145
|
-
"Time in seconds": "Tiempo en segundos"
|
|
145
|
+
"Time in seconds": "Tiempo en segundos",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Elija su token API/KEY para Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Mensaje de instancia desactivada",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Recibir un mensaje cuando se desactive una instancia",
|
|
149
|
+
"Overview of deactivated instances": "Resumen de instancias desactivadas",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Recibe un mensaje con una descripción general de todas las instancias desactivadas",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Elija los días en los que desea obtener la descripción general de las instancias desactivadas:",
|
|
152
|
+
"User/Group key (optional)": "Clave de usuario/grupo (opcional)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Elija su clave de usuario/grupo para Pushmessage"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Heure d'erreur pour les instances",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Ici, vous pouvez définir le temps d'erreur de chaque instance. La valeur standard est de 20 secondes.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Choisissez les instances qui doivent avoir un temps d'arrêt plus long",
|
|
145
|
-
"Time in seconds": "Temps en secondes"
|
|
145
|
+
"Time in seconds": "Temps en secondes",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Choisissez votre API/KEY Token pour Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Message de désactivation de l'instance",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Recevoir un message lorsqu'une instance est désactivée",
|
|
149
|
+
"Overview of deactivated instances": "Aperçu des instances désactivées",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Recevez un message avec un aperçu de toutes les instances désactivées",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Choisissez le(s) jour(s) où vous souhaitez obtenir l'aperçu des instances désactivées :",
|
|
152
|
+
"User/Group key (optional)": "Clé utilisateur/groupe (facultatif)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Choisissez votre clé d'utilisateur/groupe pour Pushmessage"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Tempo di errore per le istanze",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Qui puoi definire il tempo di errore di ogni istanza. Il valore standard è 20 secondi.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Scegli quali istanze dovrebbero avere un tempo di inattività più lungo",
|
|
145
|
-
"Time in seconds": "Tempo in secondi"
|
|
145
|
+
"Time in seconds": "Tempo in secondi",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Scegli il tuo token API/KEY per Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Messaggio di istanza disattivata",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Ricevi un messaggio quando un'istanza viene disattivata",
|
|
149
|
+
"Overview of deactivated instances": "Panoramica delle istanze disattivate",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Ricevi un messaggio con una panoramica di tutte le istanze disattivate",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Scegli il giorno o i giorni in cui vuoi ottenere la panoramica delle istanze disattivate:",
|
|
152
|
+
"User/Group key (optional)": "Chiave utente/gruppo (opzionale)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Scegli la tua chiave utente/gruppo per Pushmessage"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Fouttijd voor instanties",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Hier kunt u de fouttijd van elke instantie definiëren. De standaardwaarde is 20 seconden.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Kies welke instanties een langere downtime moeten hebben",
|
|
145
|
-
"Time in seconds": "Tijd in seconden"
|
|
145
|
+
"Time in seconds": "Tijd in seconden",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Kies uw API/KEY-token voor pushberichten",
|
|
147
|
+
"Instance deactivated message": "Instantie gedeactiveerd bericht",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Ontvang een bericht wanneer een instantie wordt gedeactiveerd",
|
|
149
|
+
"Overview of deactivated instances": "Overzicht gedeactiveerde exemplaren",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Krijg een bericht met een overzicht van alle gedeactiveerde instanties",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Kies de dag(en) waarop u het overzicht van gedeactiveerde instanties wilt zien:",
|
|
152
|
+
"User/Group key (optional)": "Gebruikers-/groepssleutel (optioneel)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Kies uw gebruikers-/groepssleutel voor pushberichten"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Czas błędu dla instancji",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Tutaj możesz zdefiniować czas błędu dla każdej instancji. Standardowa wartość to 20 sekund.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Wybierz, które instancje powinny mieć dłuższe przestoje",
|
|
145
|
-
"Time in seconds": "Czas w sekundach"
|
|
145
|
+
"Time in seconds": "Czas w sekundach",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Wybierz swój token API/KEY dla Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Komunikat o dezaktywacji instancji",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Odbierz wiadomość, gdy instancja zostanie dezaktywowana",
|
|
149
|
+
"Overview of deactivated instances": "Przegląd dezaktywowanych instancji",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Otrzymaj wiadomość z przeglądem wszystkich dezaktywowanych instancji",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Wybierz dni, w których chcesz uzyskać przegląd dezaktywowanych instancji:",
|
|
152
|
+
"User/Group key (optional)": "Klucz użytkownika/grupy (opcjonalnie)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Wybierz klucz użytkownika/grupy dla wiadomości Push"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Tempo de erro para instâncias",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Aqui você pode definir o tempo de erro de cada instância. O valor padrão é 20 segundos.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Escolha quais instâncias devem ter um tempo de inatividade mais longo",
|
|
145
|
-
"Time in seconds": "Tempo em segundos"
|
|
145
|
+
"Time in seconds": "Tempo em segundos",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Escolha seu API/KEY Token para Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Mensagem de instância desativada",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Receba uma mensagem quando uma instância for desativada",
|
|
149
|
+
"Overview of deactivated instances": "Visão geral das instâncias desativadas",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Receba uma mensagem com uma visão geral de todas as instâncias desativadas",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Escolha o(s) dia(s) em que deseja obter a visão geral das instâncias desativadas:",
|
|
152
|
+
"User/Group key (optional)": "Tecla Usuário/Grupo (opcional)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Escolha sua chave de usuário/grupo para Pushmessage"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Время ошибки для экземпляров",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Здесь вы можете определить время ошибки каждого экземпляра. Стандартное значение составляет 20 секунд.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Выберите, какие экземпляры должны иметь более длительное время простоя",
|
|
145
|
-
"Time in seconds": "Время в секундах"
|
|
145
|
+
"Time in seconds": "Время в секундах",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Выберите свой токен API/KEY для Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Сообщение об отключении экземпляра",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Получение сообщения, когда экземпляр деактивирован",
|
|
149
|
+
"Overview of deactivated instances": "Обзор деактивированных экземпляров",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Получите сообщение с обзором всех деактивированных экземпляров",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Выберите день (дни), когда вы хотите получить обзор деактивированных экземпляров:",
|
|
152
|
+
"User/Group key (optional)": "Ключ пользователя/группы (необязательно)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Выберите ключ пользователя/группы для Pushmessage"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "Час помилки для екземплярів",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "Тут ви можете визначити час помилки кожного екземпляра. Стандартне значення - 20 секунд.",
|
|
144
144
|
"Choose which instances should have a longer downtime": "Виберіть, які екземпляри повинні мати довший час простою",
|
|
145
|
-
"Time in seconds": "Час у секундах"
|
|
145
|
+
"Time in seconds": "Час у секундах",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "Виберіть маркер API/KEY для Pushmessage",
|
|
147
|
+
"Instance deactivated message": "Повідомлення про деактивацію екземпляра",
|
|
148
|
+
"Receive a message when an instance is deactivated": "Отримувати повідомлення, коли примірник дезактивовано",
|
|
149
|
+
"Overview of deactivated instances": "Огляд деактивованих примірників",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "Отримайте повідомлення з оглядом усіх дезактивованих екземплярів",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "Виберіть день (дні), коли ви хочете отримати огляд дезактивованих екземплярів:",
|
|
152
|
+
"User/Group key (optional)": "Ключ користувача/групи (необов'язково)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "Виберіть ключ користувача/групи для Pushmessage"
|
|
146
154
|
}
|
|
@@ -142,5 +142,13 @@
|
|
|
142
142
|
"Error Time for Instances": "实例的错误时间",
|
|
143
143
|
"Here you can define the error time of each instance. The standard value is 20 seconds.": "您可以在此处定义每个实例的错误时间。标准值为 20 秒。",
|
|
144
144
|
"Choose which instances should have a longer downtime": "选择哪些实例应该有更长的停机时间",
|
|
145
|
-
"Time in seconds": "时间以秒为单位"
|
|
145
|
+
"Time in seconds": "时间以秒为单位",
|
|
146
|
+
"Choose your API/KEY Token for Pushmessage": "为推送消息选择您的 API/KEY 令牌",
|
|
147
|
+
"Instance deactivated message": "实例停用消息",
|
|
148
|
+
"Receive a message when an instance is deactivated": "实例停用时接收消息",
|
|
149
|
+
"Overview of deactivated instances": "停用实例概览",
|
|
150
|
+
"Get a message with an overview of all deactivated instances": "获取包含所有已停用实例概览的消息",
|
|
151
|
+
"Choose the day(s) where you want to get the overview of deactivated instances:": "选择您希望获得已停用实例概览的日期:",
|
|
152
|
+
"User/Group key (optional)": "用户/组密钥(可选)",
|
|
153
|
+
"Choose your User/Group key for Pushmessage": "为推送消息选择您的用户/组密钥"
|
|
146
154
|
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -177,6 +177,13 @@
|
|
|
177
177
|
"lg": 3,
|
|
178
178
|
"label": "Jeelink"
|
|
179
179
|
},
|
|
180
|
+
"loqedSmartLockDevices": {
|
|
181
|
+
"type": "checkbox",
|
|
182
|
+
"sm": 6,
|
|
183
|
+
"md": 6,
|
|
184
|
+
"lg": 3,
|
|
185
|
+
"label": "Loqed Smart Lock"
|
|
186
|
+
},
|
|
180
187
|
"lupusecDevices": {
|
|
181
188
|
"type": "checkbox",
|
|
182
189
|
"sm": 6,
|
|
@@ -489,6 +496,102 @@
|
|
|
489
496
|
"hidden": "!data.checkAdapterInstances",
|
|
490
497
|
"hideOnlyControl": false
|
|
491
498
|
},
|
|
499
|
+
"checkSendInstanceDeactivatedMsg": {
|
|
500
|
+
"newLine": "true",
|
|
501
|
+
"type": "checkbox",
|
|
502
|
+
"sm": 12,
|
|
503
|
+
"md": 12,
|
|
504
|
+
"lg": 6,
|
|
505
|
+
"label": "Instance deactivated message",
|
|
506
|
+
"help": "Receive a message when an instance is deactivated",
|
|
507
|
+
"hidden": "!data.checkAdapterInstances",
|
|
508
|
+
"hideOnlyControl": false
|
|
509
|
+
},
|
|
510
|
+
"checkSendInstanceDeactivatedDaily": {
|
|
511
|
+
"type": "checkbox",
|
|
512
|
+
"sm": 12,
|
|
513
|
+
"md": 12,
|
|
514
|
+
"lg": 6,
|
|
515
|
+
"label": "Overview of deactivated instances",
|
|
516
|
+
"help": "Get a message with an overview of all deactivated instances",
|
|
517
|
+
"hidden": "!data.checkAdapterInstances",
|
|
518
|
+
"hideOnlyControl": false
|
|
519
|
+
},
|
|
520
|
+
"_sendIntervallInstanceDeactivatedDay": {
|
|
521
|
+
"newLine": true,
|
|
522
|
+
"sm": 12,
|
|
523
|
+
"md": 12,
|
|
524
|
+
"lg": 6,
|
|
525
|
+
"hidden": "!data.checkSendInstanceDeactivatedDaily",
|
|
526
|
+
"hideOnlyControl": false,
|
|
527
|
+
"items": {
|
|
528
|
+
"_textDays": {
|
|
529
|
+
"type": "staticText",
|
|
530
|
+
"text": "Choose the day(s) where you want to get the overview of deactivated instances:",
|
|
531
|
+
"style": {
|
|
532
|
+
"fontSize": 16,
|
|
533
|
+
"marginTop": 20
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"checkInstanceDeactivatedMonday": {
|
|
537
|
+
"newLine": true,
|
|
538
|
+
"type": "checkbox",
|
|
539
|
+
"label": "Mon"
|
|
540
|
+
},
|
|
541
|
+
"checkInstanceDeactivatedTuesday": {
|
|
542
|
+
"type": "checkbox",
|
|
543
|
+
"label": "Tue"
|
|
544
|
+
},
|
|
545
|
+
"checkInstanceDeactivatedWednesday": {
|
|
546
|
+
"type": "checkbox",
|
|
547
|
+
"label": "Wed"
|
|
548
|
+
},
|
|
549
|
+
"checkInstanceDeactivatedThursday": {
|
|
550
|
+
"type": "checkbox",
|
|
551
|
+
"label": "Thu"
|
|
552
|
+
},
|
|
553
|
+
"checkInstanceDeactivatedFriday": {
|
|
554
|
+
"type": "checkbox",
|
|
555
|
+
"label": "Fri"
|
|
556
|
+
},
|
|
557
|
+
"checkInstanceDeactivatedSaturday": {
|
|
558
|
+
"type": "checkbox",
|
|
559
|
+
"label": "Sat"
|
|
560
|
+
},
|
|
561
|
+
"checkInstanceDeactivatedSunday": {
|
|
562
|
+
"type": "checkbox",
|
|
563
|
+
"label": "Sun"
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"_sendIntervallInstanceDeactivatedMsgTime": {
|
|
568
|
+
"sm": 12,
|
|
569
|
+
"md": 12,
|
|
570
|
+
"lg": 6,
|
|
571
|
+
"hidden": "!data.checkSendInstanceDeactivatedDaily",
|
|
572
|
+
"hideOnlyControl": false,
|
|
573
|
+
"items": {
|
|
574
|
+
"_textTime": {
|
|
575
|
+
"type": "staticText",
|
|
576
|
+
"text": "Choose the Time:",
|
|
577
|
+
"style": {
|
|
578
|
+
"fontSize": 16,
|
|
579
|
+
"marginTop": 20
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"checkSendInstanceDeactivatedTime": {
|
|
583
|
+
"newLine": true,
|
|
584
|
+
"type": "text",
|
|
585
|
+
"help": "Format hh:mm"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
"trennerInstanceDeactivated": {
|
|
590
|
+
"newLine": true,
|
|
591
|
+
"type": "divider",
|
|
592
|
+
"hidden": "!data.checkAdapterInstances",
|
|
593
|
+
"hideOnlyControl": false
|
|
594
|
+
},
|
|
492
595
|
"checkSendInstanceFailedMsg": {
|
|
493
596
|
"newLine": "true",
|
|
494
597
|
"type": "checkbox",
|
|
@@ -1063,6 +1166,16 @@
|
|
|
1063
1166
|
"hidden": "data.msgService !== 'pushover' && !data.instancePushover",
|
|
1064
1167
|
"hideOnlyControl": false
|
|
1065
1168
|
},
|
|
1169
|
+
"userPushover": {
|
|
1170
|
+
"type": "text",
|
|
1171
|
+
"sm": 12,
|
|
1172
|
+
"md": 4,
|
|
1173
|
+
"lg": 4,
|
|
1174
|
+
"label": "User/Group key (optional)",
|
|
1175
|
+
"help": "Choose your User/Group key for Pushmessage",
|
|
1176
|
+
"hidden": "data.msgService !== 'pushover' && !data.instancePushover",
|
|
1177
|
+
"hideOnlyControl": false
|
|
1178
|
+
},
|
|
1066
1179
|
"devicePushover": {
|
|
1067
1180
|
"type": "text",
|
|
1068
1181
|
"sm": 12,
|
|
@@ -1746,6 +1859,18 @@
|
|
|
1746
1859
|
"hidden": "!data.jeelinkDevices",
|
|
1747
1860
|
"hideOnlyControl": false
|
|
1748
1861
|
},
|
|
1862
|
+
"loqedSmartLockMaxMinutes": {
|
|
1863
|
+
"type": "number",
|
|
1864
|
+
"min": -1,
|
|
1865
|
+
"max": 100000,
|
|
1866
|
+
"sm": 6,
|
|
1867
|
+
"md": 6,
|
|
1868
|
+
"lg": 3,
|
|
1869
|
+
"label": "Loqed Smart Lock",
|
|
1870
|
+
"help": "in minutes",
|
|
1871
|
+
"hidden": "!data.loqedSmartLockDevices",
|
|
1872
|
+
"hideOnlyControl": false
|
|
1873
|
+
},
|
|
1749
1874
|
"lupusecMaxMinutes": {
|
|
1750
1875
|
"type": "number",
|
|
1751
1876
|
"min": -1,
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "device-watcher",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.8.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.8.0": {
|
|
7
|
+
"en": "Added: Support for LOQED Smart Lock\nAdded: Option to add user/group api key for Pushover\nAdded: Option to send notification if an instance was stopped\nAdded: Option to send shedule notifications with overview of stopped instances\nFixed: Issue if notifications was send of stopped instance but the option wasn't choosen\nFixed: Ignore battery values 0% if they were not smaller than 5% before",
|
|
8
|
+
"de": "Hinzugefügt: Unterstützung für LOQED Smart Lock\nHinzugefügt: Option zum Hinzufügen von Benutzer/Gruppen Api-Key für Pushover\nHinzugefügt: Option, um Benachrichtigung zu senden, wenn eine Instanz gestoppt wurde\nHinzugefügt: Option, um shedule Benachrichtigungen mit Überblick über gestoppte Instanzen zu senden\nFixed: Wenn Meldungen von einer gestoppten Instanz gesendet wurde, obwohl die Option nicht gewählt war\nFixed: Batteriewerte 0% ignorieren, wenn sie nicht kleiner als 5% vorher war",
|
|
9
|
+
"ru": "Добавлена: Поддержка LOQED Smart Lock\nДобавлена: Возможность добавления ключа пользователя/группы для Pushover\nДобавлена: Возможность отправки уведомления, если экземпляр был остановлен\nДобавлена: Возможность отправки уведомлений о прокладке с обзором остановленных экземпляров\nИсправлено: Проблема, если уведомления были отправлены с остановленным экземпляром, но вариант не был выбран\nИсправлено: Игнорировать значения батареи 0%, если они не были меньше 5% до",
|
|
10
|
+
"pt": "Adicionado: Suporte para bloqueio inteligente LOQED\nAdicionado: Opção para adicionar usuário / grupo api chave para Pushover\nAdicionado: Opção para enviar notificação se uma instância foi parada\nAdicionado: Opção para enviar notificações shedule com visão geral de instâncias paradas\nCorrigido: Emitir se as notificações foram enviadas de instância parada, mas a opção não foi escolhida\nCorrigido: Ignorar os valores da bateria 0 %s e não forem menores que 5% antes",
|
|
11
|
+
"nl": "Vertaling:\nOptie om gebruiker/group api sleutel toe te voegen voor Pushover\nOptie om een bericht te sturen als er een voorbeeld is gestopt\nOptie om Shedule-informatie te sturen met overzicht van gestopte instanties\nIssue of de inlichtingen verstuurd werden van gestopte instantie maar de optie werd niet gekozen\nIgnore batterijwaarden 0% als ze niet kleiner waren dan 5% eerder",
|
|
12
|
+
"fr": "Ajouté : Support pour la serrure intelligente LOQED\nAjouté: Option pour ajouter la clé api utilisateur/groupe pour Pushover\nAjouté: Option pour envoyer une notification si une instance a été arrêtée\nAjouté: Option pour envoyer des notifications de shedule avec aperçu des instances arrêtées\nCorrection : Question si les notifications ont été envoyées de l'instance arrêtée, mais l'option n'a pas été choisie\nFixe: Ignore les valeurs de la batterie 0 %s i elles n'étaient pas inférieures à 5% avant",
|
|
13
|
+
"it": "Aggiunto: Supporto per LOQED Smart Lock\nAggiunto: Opzione per aggiungere utente / gruppo api chiave per Pushover\nAggiunto: Opzione per inviare la notifica se un'istanza è stata fermata\nAggiunto: Opzione per inviare notifiche capannone con panoramica di istanze interrotte\nRisolto: Problema se le notifiche sono state inviate di istanza bloccata ma l'opzione non è stata scelta\nFisso: ignorare i valori della batteria 0 %s e non erano più piccoli del 5% prima",
|
|
14
|
+
"es": "Añadido: Soporte para bloqueo inteligente LOQED\nAñadido: Opción para añadir clave de usuario/grupo api para Pushover\nAñadido: Opción de enviar notificación si se detuvo una instancia\nAñadido: Option to send shedule notifications with overview of stopped instances\nCorregido: Edición si las notificaciones se envían de instancia parada pero la opción no fue elegida\nFijo: Ignorar los valores de la batería 0 %s i no eran menores de 5% antes",
|
|
15
|
+
"pl": "Added: wsparcie dla LOQED Smart Lock\nAdded: Option to add user/group api key\nAdded: Option, aby wysłać powiadomienie, czy instancja została zatrzymana\nAdded: Option to send castule notification with overview of a zatrzymane instancje\nFixed: Wydanie, jeśli powiadomienia zostały wysłane z przerwy, ale opcja nie została wybrana\nFixed: Ignore akumulatory 0%, jeśli nie były one mniejsze niż 5% przed rozpoczęciem budowy",
|
|
16
|
+
"uk": "Доданий: Підтримка LOQED Смарт блокування\nДодано: Параметри, щоб додати ключ користувача / групи Api для Pushover\nДоданий: Опція надсилати повідомлення, якщо було припинено\nДодано: Опція для відправки повідомлень про скидання з оглядом припинених екземплярів\nВиправлено: Питання, якщо повідомлення було відправлено припинено, але варіант не був обраний\nВиправлено: значення Ignore батареї 0%, якщо вони не менше 5% до",
|
|
17
|
+
"zh-cn": "增加:支持LOQED Smart Lock\n增 编:增加用户/集群的备选办法\n增加:如果某一例子被停止,可发出通知。\n增 编:发出简写通知,概述停止事件\nIxed:如果发出通知被阻止,但选择是选择的。\n固定:Ignore电池数值.0%"
|
|
18
|
+
},
|
|
6
19
|
"2.7.1": {
|
|
7
20
|
"en": "Added: Support for Ecovacs-Deebot\nUpdated: Dependencies\nImprovements: Small fixes",
|
|
8
21
|
"de": "Hinzugefügt: Unterstützung für Ecovacs-Deebot\nAktualisiert: Abhängigkeiten\nVerbesserungen: Kleine Verbesserungen",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "wysyłanie notyfikacji online i offline tylko wtedy, gdy połączenie z urządzeniem (zigbee stick etc.) jest dłuższe, wtedy kilka sekund. W razie potrzeby zapobiegać wielokrotnym wiadomościom w wyniku udaru\nzastrzeżenie, że wszystkie urządzenia zostały wymienione, mimo że wybrano tylko urządzenia fałszerskie",
|
|
81
94
|
"uk": "надсилайте онлайн і офлайн повідомлення тільки, якщо підключення до пристрою (зигніть палицю і т.д.) довший час, потім кілька секунд. Не допустити декількох повідомлень при інсульті\nвиправлено проблему, що всі пристрої були перераховані, хоча тільки пристрої баттері були вибрані",
|
|
82
95
|
"zh-cn": "只发出在线和线外通知,如果与装置(zigbee stick等)的联系较短。 如果能防止在场上的多条信息。\n尽管只选定电池器,但所有装置都列入了固定问题。"
|
|
83
|
-
},
|
|
84
|
-
"2.4.0": {
|
|
85
|
-
"en": "make onStateChanges only, when device instance is alive\nHomeconnect and Smartgarden Adapter added",
|
|
86
|
-
"de": "auf der Karte Änderungen nur, wenn Geräteinstanz lebendig ist\nHomeconnect und Smartgarden Adapter hinzugefügt",
|
|
87
|
-
"ru": "сделать onState Только изменения, когда экземпляр устройства жив\nHomeconnect и Smartgarden адаптер добавлен",
|
|
88
|
-
"pt": "make onState Alterações apenas, quando a instância do dispositivo está viva\nHomeconnect e Smartgarden Adapter adicionado",
|
|
89
|
-
"nl": "maak opState Verandert alleen, wanneer apparaat in leven is\nHomeconnect and Smartgarden Adapter toegevoegd",
|
|
90
|
-
"fr": "make onState Changements seulement, lorsque l'instance de périphérique est vivante\nAdaptateur Homeconnect et Smartgarden ajouté",
|
|
91
|
-
"it": "fare suState Modifiche solo, quando l'istanza del dispositivo è viva\nHomeconnect e adattatore Smartgarden aggiunto",
|
|
92
|
-
"es": "estado Cambios solamente, cuando la instancia del dispositivo está viva\nAdaptador Homeconnect y Smartgarden añadido",
|
|
93
|
-
"pl": "robić na State Zmiany są tylko wtedy, gdy instancja urządzenia jest żywa\nStrona internetowa firmy Smartgarden",
|
|
94
|
-
"uk": "зробити onState Зміни тільки, коли пристрій є живим\nHomeconnect і Smartgarden адаптер додано",
|
|
95
|
-
"zh-cn": "国家 仅发生变化,当装置是活性的。\n家庭联系和Smartgarden Adapter"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -242,6 +242,8 @@
|
|
|
242
242
|
"hueextMaxMinutes": 0,
|
|
243
243
|
"innogyDevices": false,
|
|
244
244
|
"innogyMaxMinutes": 0,
|
|
245
|
+
"loqedSmartLockDevices": false,
|
|
246
|
+
"loqedSmartLockMaxMinutes": 0,
|
|
245
247
|
"jeelinkDevices": false,
|
|
246
248
|
"jeelinkMaxMinutes": 300,
|
|
247
249
|
"lupusecDevices": false,
|
|
@@ -331,6 +333,7 @@
|
|
|
331
333
|
"titlePushover": "",
|
|
332
334
|
"devicePushover": "",
|
|
333
335
|
"prioPushover": "",
|
|
336
|
+
"userPushover": "",
|
|
334
337
|
"instanceEmail": "",
|
|
335
338
|
"subjectEmail": "",
|
|
336
339
|
"sendToEmail": "",
|
|
@@ -376,6 +379,16 @@
|
|
|
376
379
|
"checkAdapterUpdateFriday": false,
|
|
377
380
|
"checkAdapterUpdateSaturday": false,
|
|
378
381
|
"checkAdapterUpdateSunday": false,
|
|
382
|
+
"checkSendInstanceDeactivatedMsg": false,
|
|
383
|
+
"checkSendInstanceDeactivatedDaily": false,
|
|
384
|
+
"checkInstanceDeactivatedMonday": false,
|
|
385
|
+
"checkInstanceDeactivatedTuesday": false,
|
|
386
|
+
"checkInstanceDeactivatedWednesday": false,
|
|
387
|
+
"checkInstanceDeactivatedThursday": false,
|
|
388
|
+
"checkInstanceDeactivatedFriday": false,
|
|
389
|
+
"checkInstanceDeactivatedSaturday": false,
|
|
390
|
+
"checkInstanceDeactivatedSunday": false,
|
|
391
|
+
"checkSendInstanceDeactivatedTime": "12:20",
|
|
379
392
|
"checkSendInstanceFailedMsg": false,
|
|
380
393
|
"checkSendInstanceFailedDaily": false,
|
|
381
394
|
"checkFailedInstancesMonday": false,
|
package/lib/arrApart.js
CHANGED
|
@@ -258,6 +258,16 @@ const arrApart = {
|
|
|
258
258
|
reach: 'none',
|
|
259
259
|
isLowBat: '.lowBatt',
|
|
260
260
|
},
|
|
261
|
+
loqedSmartLock: {
|
|
262
|
+
Selektor: 'loqed.*.connection',
|
|
263
|
+
timeSelector: '.lockStatus.batteryPercentage',
|
|
264
|
+
adapterID: 'loqedSmartLock',
|
|
265
|
+
adapter: 'Loqed Smart Lock',
|
|
266
|
+
battery: '.lockStatus.batteryPercentage',
|
|
267
|
+
rssiState: 'none',
|
|
268
|
+
reach: '.connection',
|
|
269
|
+
isLowBat: '.lowBatt',
|
|
270
|
+
},
|
|
261
271
|
lupusec: {
|
|
262
272
|
Selektor: 'lupusec.*.cond_ok',
|
|
263
273
|
timeSelector: '.cond_ok',
|
package/main.js
CHANGED
|
@@ -127,6 +127,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
127
127
|
hueExt: this.config.hueExtDevices,
|
|
128
128
|
innogy: this.config.innogyDevices,
|
|
129
129
|
jeelink: this.config.jeelinkDevices,
|
|
130
|
+
loqedSmartLock: this.config.loqedSmartLockDevices,
|
|
130
131
|
lupusec: this.config.lupusecDevices,
|
|
131
132
|
maxcube: this.config.maxcubeDevices,
|
|
132
133
|
meross: this.config.merossDevices,
|
|
@@ -182,6 +183,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
182
183
|
hueExt: this.config.hueextMaxMinutes,
|
|
183
184
|
innogy: this.config.innogyMaxMinutes,
|
|
184
185
|
jeelink: this.config.jeelinkMaxMinutes,
|
|
186
|
+
loqedSmartLock: this.config.loqedSmartLockMaxMinutes,
|
|
185
187
|
lupusec: this.config.lupusecMaxMinutes,
|
|
186
188
|
maxcube: this.config.maxcubeMaxMinutes,
|
|
187
189
|
meross: this.config.merossMaxMinutes,
|
|
@@ -302,6 +304,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
302
304
|
// send overview of updatable adapters
|
|
303
305
|
if (this.config.checkSendAdapterUpdateMsgDaily) this.sendScheduleNotifications('updateAdapter');
|
|
304
306
|
|
|
307
|
+
// send overview of deactivated instances
|
|
308
|
+
if (this.config.checkSendInstanceDeactivatedDaily) this.sendScheduleNotifications('deactivatedInstance');
|
|
309
|
+
|
|
305
310
|
// send overview of instances with error
|
|
306
311
|
if (this.config.checkSendInstanceFailedDaily) this.sendScheduleNotifications('errorInstance');
|
|
307
312
|
} catch (error) {
|
|
@@ -379,6 +384,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
379
384
|
let oldAdapterUpdatesCounts;
|
|
380
385
|
|
|
381
386
|
try {
|
|
387
|
+
// adapter updates
|
|
382
388
|
if (id.endsWith('updatesJson')) {
|
|
383
389
|
oldAdapterUpdatesCounts = this.countAdapterUpdates;
|
|
384
390
|
await this.getAdapterUpdateData(id);
|
|
@@ -397,8 +403,10 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
397
403
|
}
|
|
398
404
|
}
|
|
399
405
|
|
|
406
|
+
// instances
|
|
400
407
|
for (const [instance, instanceData] of this.listInstanceRaw) {
|
|
401
408
|
switch (id) {
|
|
409
|
+
// instance alive
|
|
402
410
|
case instanceData.instanceAlivePath:
|
|
403
411
|
if (state.val !== instanceData.isAlive) {
|
|
404
412
|
instanceStatusRaw = await this.setInstanceStatus(
|
|
@@ -412,7 +420,13 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
412
420
|
instanceData.status = instanceStatusRaw[0];
|
|
413
421
|
instanceData.isHealthy = instanceStatusRaw[2];
|
|
414
422
|
}
|
|
423
|
+
if (this.config.checkSendInstanceDeactivatedMsg && !this.blacklistInstancesNotify.includes(instanceData.instanceAlivePath)) {
|
|
424
|
+
if (!instanceData.isHealthy) {
|
|
425
|
+
await this.sendStateNotifications('deactivatedInstance', instance);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
415
428
|
break;
|
|
429
|
+
// instance connected host
|
|
416
430
|
case instanceData.connectedHostPath:
|
|
417
431
|
oldInstanceHostState = instanceData.isConnectedHost;
|
|
418
432
|
instanceData.isConnectedHost = state.val;
|
|
@@ -436,6 +450,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
436
450
|
}
|
|
437
451
|
}
|
|
438
452
|
break;
|
|
453
|
+
// instance connected device
|
|
439
454
|
case instanceData.connectedDevicePath:
|
|
440
455
|
oldInstanceDeviceState = instanceData.isConnectedDevice;
|
|
441
456
|
instanceData.isConnectedDevice = state.val;
|
|
@@ -465,12 +480,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
465
480
|
for (const [device, deviceData] of this.listAllDevicesRaw) {
|
|
466
481
|
// On statechange update available datapoint
|
|
467
482
|
switch (id) {
|
|
483
|
+
// device connection
|
|
468
484
|
case deviceData.instanceDeviceConnectionDP:
|
|
469
485
|
if (state.val !== deviceData.instancedeviceConnected) {
|
|
470
486
|
deviceData.instancedeviceConnected = state.val;
|
|
471
487
|
}
|
|
472
488
|
break;
|
|
473
489
|
|
|
490
|
+
// device updates
|
|
474
491
|
case deviceData.UpdateDP:
|
|
475
492
|
if (state.val !== deviceData.Upgradable) {
|
|
476
493
|
deviceData.Upgradable = state.val;
|
|
@@ -482,15 +499,18 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
482
499
|
}
|
|
483
500
|
break;
|
|
484
501
|
|
|
502
|
+
// device signal
|
|
485
503
|
case deviceData.SignalStrengthDP:
|
|
486
504
|
signalData = await this.calculateSignalStrength(state, deviceData.adapterID);
|
|
487
505
|
deviceData.SignalStrength = signalData[0];
|
|
488
506
|
|
|
489
507
|
break;
|
|
490
508
|
|
|
509
|
+
// device battery
|
|
491
510
|
case deviceData.batteryDP:
|
|
492
511
|
if (deviceData.isBatteryDevice) {
|
|
493
512
|
oldLowBatState = deviceData.LowBat;
|
|
513
|
+
if (state.val === 0 && deviceData.BatteryRaw >= 5) continue;
|
|
494
514
|
batteryData = await this.getBatteryData(state.val, oldLowBatState, deviceData.faultReport, deviceData.adapterID);
|
|
495
515
|
|
|
496
516
|
deviceData.Battery = batteryData[0];
|
|
@@ -511,6 +531,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
511
531
|
}
|
|
512
532
|
break;
|
|
513
533
|
|
|
534
|
+
// device low bat
|
|
514
535
|
case deviceData.LowBatDP:
|
|
515
536
|
if (deviceData.isBatteryDevice) {
|
|
516
537
|
oldLowBatState = deviceData.LowBat;
|
|
@@ -528,6 +549,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
528
549
|
}
|
|
529
550
|
break;
|
|
530
551
|
|
|
552
|
+
//device error / fault reports
|
|
531
553
|
case deviceData.faultReportDP:
|
|
532
554
|
if (deviceData.isBatteryDevice) {
|
|
533
555
|
oldLowBatState = deviceData.LowBat;
|
|
@@ -546,6 +568,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
546
568
|
}
|
|
547
569
|
break;
|
|
548
570
|
|
|
571
|
+
// device unreach
|
|
549
572
|
case deviceData.UnreachDP:
|
|
550
573
|
oldStatus = deviceData.Status;
|
|
551
574
|
deviceData.UnreachState = await this.getInitValue(deviceData.UnreachDP);
|
|
@@ -939,6 +962,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
939
962
|
case 'hueExt':
|
|
940
963
|
case 'mihomeVacuum':
|
|
941
964
|
case 'mqttNuki':
|
|
965
|
+
case 'loqedSmartLock':
|
|
942
966
|
deviceBatteryStateDP = shortCurrDeviceString + this.selAdapter[i].battery;
|
|
943
967
|
deviceBatteryState = await this.getInitValue(deviceBatteryStateDP);
|
|
944
968
|
if (deviceBatteryState === undefined) {
|
|
@@ -990,7 +1014,12 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
990
1014
|
let unreachDP = currDeviceString + this.selAdapter[i].reach;
|
|
991
1015
|
const deviceStateSelectorDP = shortCurrDeviceString + this.selAdapter[i].stateValue;
|
|
992
1016
|
const rssiPeerSelectorDP = currDeviceString + this.selAdapter[i].rssiPeerState;
|
|
993
|
-
|
|
1017
|
+
let timeSelector = currDeviceString + this.selAdapter[i].timeSelector;
|
|
1018
|
+
|
|
1019
|
+
const timeSelectorState = await this.getInitValue(timeSelector);
|
|
1020
|
+
if (timeSelectorState === undefined) {
|
|
1021
|
+
timeSelector = shortCurrDeviceString + this.selAdapter[i].timeSelector;
|
|
1022
|
+
}
|
|
994
1023
|
|
|
995
1024
|
let deviceUnreachState = await this.getInitValue(unreachDP);
|
|
996
1025
|
if (deviceUnreachState === undefined) {
|
|
@@ -1122,6 +1151,7 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
1122
1151
|
case 'nukiExt':
|
|
1123
1152
|
case 'wled':
|
|
1124
1153
|
case 'mqttNuki':
|
|
1154
|
+
case 'loqedSmartLock':
|
|
1125
1155
|
if (shortDeviceObject && typeof shortDeviceObject === 'object') {
|
|
1126
1156
|
deviceName = shortDeviceObject.common.name;
|
|
1127
1157
|
}
|
|
@@ -2152,7 +2182,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2152
2182
|
instanceStatusString = 'Instanz okay';
|
|
2153
2183
|
} else {
|
|
2154
2184
|
// 2/3 - after 15 seconds
|
|
2155
|
-
await this.
|
|
2185
|
+
await this.delay(instanceErrorTime);
|
|
2186
|
+
|
|
2187
|
+
isAlive = await this.getInitValue(instanceAlivePath);
|
|
2188
|
+
if (!isAlive) return ['Instanz deaktiviert', false, null]; // if instance is turned off
|
|
2189
|
+
|
|
2156
2190
|
isDeviceConnected = await this.getInitValue(isDeviceConnctedPath);
|
|
2157
2191
|
isHostConnected = await this.getInitValue(hostConnectedPath);
|
|
2158
2192
|
|
|
@@ -2161,7 +2195,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2161
2195
|
instanceStatusString = 'Instanz okay';
|
|
2162
2196
|
} else {
|
|
2163
2197
|
// 3/3 - after 30 seconds in total or user time setting
|
|
2164
|
-
await this.
|
|
2198
|
+
await this.delay(instanceErrorTime);
|
|
2199
|
+
|
|
2200
|
+
isAlive = await this.getInitValue(instanceAlivePath);
|
|
2201
|
+
if (!isAlive) return ['Instanz deaktiviert', false, null]; // if instance is turned off
|
|
2202
|
+
|
|
2165
2203
|
isDeviceConnected = await this.getInitValue(isDeviceConnctedPath);
|
|
2166
2204
|
isHostConnected = await this.getInitValue(hostConnectedPath);
|
|
2167
2205
|
|
|
@@ -2650,8 +2688,8 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2650
2688
|
*/
|
|
2651
2689
|
async sendNotification(text) {
|
|
2652
2690
|
// Pushover
|
|
2653
|
-
|
|
2654
|
-
|
|
2691
|
+
if (this.config.instancePushover) {
|
|
2692
|
+
try {
|
|
2655
2693
|
//first check if instance is living
|
|
2656
2694
|
const pushoverAliveState = await this.getInitValue('system.adapter.' + this.config.instancePushover + '.alive');
|
|
2657
2695
|
|
|
@@ -2662,17 +2700,18 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2662
2700
|
message: text,
|
|
2663
2701
|
title: this.config.titlePushover,
|
|
2664
2702
|
device: this.config.devicePushover,
|
|
2703
|
+
user: this.config.userPushover,
|
|
2665
2704
|
priority: this.config.prioPushover,
|
|
2666
2705
|
});
|
|
2667
2706
|
}
|
|
2707
|
+
} catch (error) {
|
|
2708
|
+
this.errorReporting('[sendNotification Pushover]', error);
|
|
2668
2709
|
}
|
|
2669
|
-
} catch (error) {
|
|
2670
|
-
this.errorReporting('[sendNotification Pushover]', error);
|
|
2671
2710
|
}
|
|
2672
2711
|
|
|
2673
2712
|
// Telegram
|
|
2674
|
-
|
|
2675
|
-
|
|
2713
|
+
if (this.config.instanceTelegram) {
|
|
2714
|
+
try {
|
|
2676
2715
|
//first check if instance is living
|
|
2677
2716
|
const telegramAliveState = await this.getInitValue('system.adapter.' + this.config.instanceTelegram + '.alive');
|
|
2678
2717
|
|
|
@@ -2685,14 +2724,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2685
2724
|
chatId: this.config.chatIdTelegram,
|
|
2686
2725
|
});
|
|
2687
2726
|
}
|
|
2727
|
+
} catch (error) {
|
|
2728
|
+
this.errorReporting('[sendNotification Telegram]', error);
|
|
2688
2729
|
}
|
|
2689
|
-
} catch (error) {
|
|
2690
|
-
this.errorReporting('[sendNotification Telegram]', error);
|
|
2691
2730
|
}
|
|
2692
2731
|
|
|
2693
2732
|
// Whatsapp
|
|
2694
|
-
|
|
2695
|
-
|
|
2733
|
+
if (this.config.instanceWhatsapp) {
|
|
2734
|
+
try {
|
|
2696
2735
|
//first check if instance is living
|
|
2697
2736
|
const whatsappAliveState = await this.getInitValue('system.adapter.' + this.config.instanceWhatsapp + '.alive');
|
|
2698
2737
|
|
|
@@ -2704,14 +2743,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2704
2743
|
phone: this.config.phoneWhatsapp,
|
|
2705
2744
|
});
|
|
2706
2745
|
}
|
|
2746
|
+
} catch (error) {
|
|
2747
|
+
this.errorReporting('[sendNotification Whatsapp]', error);
|
|
2707
2748
|
}
|
|
2708
|
-
} catch (error) {
|
|
2709
|
-
this.errorReporting('[sendNotification Whatsapp]', error);
|
|
2710
2749
|
}
|
|
2711
2750
|
|
|
2712
2751
|
// Matrix
|
|
2713
|
-
|
|
2714
|
-
|
|
2752
|
+
if (this.config.instanceMatrix) {
|
|
2753
|
+
try {
|
|
2715
2754
|
//first check if instance is living
|
|
2716
2755
|
const matrixAliveState = await this.getInitValue('system.adapter.' + this.config.instanceMatrix + '.alive');
|
|
2717
2756
|
|
|
@@ -2723,14 +2762,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2723
2762
|
text: text,
|
|
2724
2763
|
});
|
|
2725
2764
|
}
|
|
2765
|
+
} catch (error) {
|
|
2766
|
+
this.errorReporting('[sendNotification Matrix]', error);
|
|
2726
2767
|
}
|
|
2727
|
-
} catch (error) {
|
|
2728
|
-
this.errorReporting('[sendNotification Matrix]', error);
|
|
2729
2768
|
}
|
|
2730
2769
|
|
|
2731
2770
|
// Signal
|
|
2732
|
-
|
|
2733
|
-
|
|
2771
|
+
if (this.config.instanceSignal) {
|
|
2772
|
+
try {
|
|
2734
2773
|
//first check if instance is living
|
|
2735
2774
|
const signalAliveState = await this.getInitValue('system.adapter.' + this.config.instanceSignal + '.alive');
|
|
2736
2775
|
|
|
@@ -2742,14 +2781,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2742
2781
|
phone: this.config.phoneSignal,
|
|
2743
2782
|
});
|
|
2744
2783
|
}
|
|
2784
|
+
} catch (error) {
|
|
2785
|
+
this.errorReporting('[sendNotification Signal]', error);
|
|
2745
2786
|
}
|
|
2746
|
-
} catch (error) {
|
|
2747
|
-
this.errorReporting('[sendNotification Signal]', error);
|
|
2748
2787
|
}
|
|
2749
2788
|
|
|
2750
2789
|
// Email
|
|
2751
|
-
|
|
2752
|
-
|
|
2790
|
+
if (this.config.instanceEmail) {
|
|
2791
|
+
try {
|
|
2753
2792
|
//first check if instance is living
|
|
2754
2793
|
const eMailAliveState = await this.getInitValue('system.adapter.' + this.config.instanceEmail + '.alive');
|
|
2755
2794
|
|
|
@@ -2762,14 +2801,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2762
2801
|
subject: this.config.subjectEmail,
|
|
2763
2802
|
});
|
|
2764
2803
|
}
|
|
2804
|
+
} catch (error) {
|
|
2805
|
+
this.errorReporting('[sendNotification eMail]', error);
|
|
2765
2806
|
}
|
|
2766
|
-
} catch (error) {
|
|
2767
|
-
this.errorReporting('[sendNotification eMail]', error);
|
|
2768
2807
|
}
|
|
2769
2808
|
|
|
2770
2809
|
// Jarvis Notification
|
|
2771
|
-
|
|
2772
|
-
|
|
2810
|
+
if (this.config.instanceJarvis) {
|
|
2811
|
+
try {
|
|
2773
2812
|
//first check if instance is living
|
|
2774
2813
|
const jarvisAliveState = await this.getInitValue('system.adapter.' + this.config.instanceJarvis + '.alive');
|
|
2775
2814
|
|
|
@@ -2782,14 +2821,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2782
2821
|
'{"title":"' + this.config.titleJarvis + ' (' + this.formatDate(new Date(), 'DD.MM.YYYY - hh:mm:ss') + ')","message": ' + jsonText + ',"display": "drawer"}',
|
|
2783
2822
|
);
|
|
2784
2823
|
}
|
|
2824
|
+
} catch (error) {
|
|
2825
|
+
this.errorReporting('[sendNotification Jarvis]', error);
|
|
2785
2826
|
}
|
|
2786
|
-
} catch (error) {
|
|
2787
|
-
this.errorReporting('[sendNotification Jarvis]', error);
|
|
2788
2827
|
}
|
|
2789
2828
|
|
|
2790
2829
|
// Lovelace Notification
|
|
2791
|
-
|
|
2792
|
-
|
|
2830
|
+
if (this.config.instanceLovelace) {
|
|
2831
|
+
try {
|
|
2793
2832
|
//first check if instance is living
|
|
2794
2833
|
const lovelaceAliveState = await this.getInitValue('system.adapter.' + this.config.instanceLovelace + '.alive');
|
|
2795
2834
|
|
|
@@ -2802,14 +2841,14 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2802
2841
|
'{"message":' + jsonText + ', "title":"' + this.config.titleLovelace + ' (' + this.formatDate(new Date(), 'DD.MM.YYYY - hh:mm:ss') + ')"}',
|
|
2803
2842
|
);
|
|
2804
2843
|
}
|
|
2844
|
+
} catch (error) {
|
|
2845
|
+
this.errorReporting('[sendNotification Lovelace]', error);
|
|
2805
2846
|
}
|
|
2806
|
-
} catch (error) {
|
|
2807
|
-
this.errorReporting('[sendNotification Lovelace]', error);
|
|
2808
2847
|
}
|
|
2809
2848
|
|
|
2810
2849
|
// Synochat Notification
|
|
2811
|
-
|
|
2812
|
-
|
|
2850
|
+
if (this.config.instanceSynochat) {
|
|
2851
|
+
try {
|
|
2813
2852
|
//first check if instance is living
|
|
2814
2853
|
const synochatAliveState = await this.getInitValue('system.adapter.' + this.config.instanceSynochat + '.alive');
|
|
2815
2854
|
|
|
@@ -2822,9 +2861,9 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2822
2861
|
this.log.warn('Synochat channel is not set. Message could not be sent. Please check your instance configuration.');
|
|
2823
2862
|
}
|
|
2824
2863
|
}
|
|
2864
|
+
} catch (error) {
|
|
2865
|
+
this.errorReporting('[sendNotification Synochat]', error);
|
|
2825
2866
|
}
|
|
2826
|
-
} catch (error) {
|
|
2827
|
-
this.errorReporting('[sendNotification Synochat]', error);
|
|
2828
2867
|
}
|
|
2829
2868
|
} // <-- End of sendNotification function
|
|
2830
2869
|
|
|
@@ -2899,6 +2938,11 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
2899
2938
|
message = `Instanz Watchdog:\n${objectData.InstanceName}: ${objectData.status}`;
|
|
2900
2939
|
setMessage(message);
|
|
2901
2940
|
break;
|
|
2941
|
+
case 'deactivatedInstance':
|
|
2942
|
+
objectData = this.listInstanceRaw.get(id);
|
|
2943
|
+
message = `Instanz Watchdog:\n${objectData.InstanceName}: ${objectData.status}`;
|
|
2944
|
+
setMessage(message);
|
|
2945
|
+
break;
|
|
2902
2946
|
}
|
|
2903
2947
|
}
|
|
2904
2948
|
|
|
@@ -3088,6 +3132,36 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
3088
3132
|
setMessage(message);
|
|
3089
3133
|
});
|
|
3090
3134
|
break;
|
|
3135
|
+
case 'deactivatedInstance':
|
|
3136
|
+
// push the selected days in list
|
|
3137
|
+
if (this.config.checkInstanceDeactivatedMonday) checkDays.push(1);
|
|
3138
|
+
if (this.config.checkInstanceDeactivatedTuesday) checkDays.push(2);
|
|
3139
|
+
if (this.config.checkInstanceDeactivatedWednesday) checkDays.push(3);
|
|
3140
|
+
if (this.config.checkInstanceDeactivatedThursday) checkDays.push(4);
|
|
3141
|
+
if (this.config.checkInstanceDeactivatedFriday) checkDays.push(5);
|
|
3142
|
+
if (this.config.checkInstanceDeactivatedSaturday) checkDays.push(6);
|
|
3143
|
+
if (this.config.checkInstanceDeactivatedSunday) checkDays.push(0);
|
|
3144
|
+
|
|
3145
|
+
time = this.config.checkSendInstanceDeactivatedTime.split(':');
|
|
3146
|
+
|
|
3147
|
+
if (checkDays.length === 0) {
|
|
3148
|
+
this.log.warn(`No days selected for daily instance deactivated message. Please check the instance configuration!`);
|
|
3149
|
+
return; // cancel function if no day is selected
|
|
3150
|
+
}
|
|
3151
|
+
this.log.debug(`Number of selected days for daily instance deactivated message: ${checkDays.length}. Send Message on: ${checkDays.join(', ')} ...`);
|
|
3152
|
+
cron = '5 ' + time[1] + ' ' + time[0] + ' * * ' + checkDays;
|
|
3153
|
+
schedule.scheduleJob(cron, () => {
|
|
3154
|
+
list = '';
|
|
3155
|
+
|
|
3156
|
+
for (const id of this.listDeactivatedInstances) {
|
|
3157
|
+
if (this.blacklistInstancesNotify.includes(id.instanceAlivePath)) continue;
|
|
3158
|
+
list = `${list}\n${id.Instance}`;
|
|
3159
|
+
}
|
|
3160
|
+
if (list.length === 0) return;
|
|
3161
|
+
message = `Tägliche Meldung über deaktivierte Instanzen: ${list}`;
|
|
3162
|
+
setMessage(message);
|
|
3163
|
+
});
|
|
3164
|
+
break;
|
|
3091
3165
|
}
|
|
3092
3166
|
}
|
|
3093
3167
|
|
|
@@ -4110,14 +4184,6 @@ class DeviceWatcher extends utils.Adapter {
|
|
|
4110
4184
|
return {};
|
|
4111
4185
|
}
|
|
4112
4186
|
|
|
4113
|
-
/**
|
|
4114
|
-
* @param {number} ms
|
|
4115
|
-
*/
|
|
4116
|
-
async wait(ms) {
|
|
4117
|
-
if (isUnloaded) return;
|
|
4118
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
4119
|
-
}
|
|
4120
|
-
|
|
4121
4187
|
/**
|
|
4122
4188
|
* Get previous run of cron job schedule
|
|
4123
4189
|
* Requires cron-parser!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.device-watcher",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Watchdog for devices",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Christian Behrends",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "https://github.com/ciddi89/ioBroker.device-watcher"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@iobroker/adapter-core": "^2.6.
|
|
25
|
+
"@iobroker/adapter-core": "^2.6.8"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@alcalzone/release-script": "^3.5.9",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/chai": "^4.3.4",
|
|
35
35
|
"@types/chai-as-promised": "^7.1.5",
|
|
36
36
|
"@types/mocha": "^10.0.1",
|
|
37
|
-
"@types/node": "^18.15.
|
|
37
|
+
"@types/node": "^18.15.11",
|
|
38
38
|
"@types/node-schedule": "^2.1.0",
|
|
39
39
|
"@types/proxyquire": "^1.3.28",
|
|
40
40
|
"@types/sinon": "^10.0.13",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"chai": "^4.3.7",
|
|
43
43
|
"chai-as-promised": "^7.1.1",
|
|
44
44
|
"cron-parser": "^4.8.1",
|
|
45
|
-
"eslint": "^8.
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
45
|
+
"eslint": "^8.37.0",
|
|
46
|
+
"eslint-config-prettier": "^8.8.0",
|
|
47
47
|
"eslint-plugin-prettier": "^4.2.1",
|
|
48
48
|
"mocha": "^10.2.0",
|
|
49
49
|
"node-schedule": "^2.1.1",
|
|
50
|
-
"prettier": "^2.8.
|
|
50
|
+
"prettier": "^2.8.7",
|
|
51
51
|
"proxyquire": "^2.1.3",
|
|
52
|
-
"sinon": "^15.0.
|
|
52
|
+
"sinon": "^15.0.3",
|
|
53
53
|
"sinon-chai": "^3.7.0",
|
|
54
|
-
"typescript": "~
|
|
54
|
+
"typescript": "~5.0.3"
|
|
55
55
|
},
|
|
56
56
|
"main": "main.js",
|
|
57
57
|
"files": [
|