iobroker.device-watcher 2.9.0 → 2.9.2

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 CHANGED
@@ -189,6 +189,16 @@ It's possible to select:
189
189
  Placeholder for the next version (at the beginning of the line):
190
190
  ### **WORK IN PROGRESS**
191
191
  -->
192
+ ### 2.9.2 (2023-05-19)
193
+
194
+ - (ciddi89) Fixed: Instance name in schedule notifications for faulty instances
195
+ - (ciddi89) Fixed: Ignore null values in update datapoints of devices
196
+ - (ciddi89) Updated: Dependencies
197
+
198
+ ### 2.9.1 (2023-04-27)
199
+
200
+ - (ciddi89) Removed: Function for error handling (not neccessary)
201
+
192
202
  ### 2.9.0 (2023-04-26)
193
203
 
194
204
  - (ciddi89) Fixed: Deactivated instances were not displayed in the daily message about deactivated instances
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "device-watcher",
4
- "version": "2.9.0",
4
+ "version": "2.9.2",
5
5
  "news": {
6
+ "2.9.2": {
7
+ "en": "Fixed: Instance name in schedule notifications for faulty instances\nFixed: Ignore null values in update datapoints of devices\nUpdated: Dependencies",
8
+ "de": "Behoben: Instancenamen in Schedule Benachrichtigungen für Fehlerhafte Instanzen\nBehoben: Nullwerte in Update-Datenpunkten von Geräten ignorieren\nAktualisiert: Abhängigkeiten",
9
+ "ru": "Исправлено: Наименование Instance в расписании уведомлений для неисправных инстанций\nИсправлено: Игнорировать значения null в обновлении точек данных устройств\nОбновлено: зависимости",
10
+ "pt": "Corrigido: Nome da instância em notificações de horário para casos defeituosos\nCorrigido: Ignorar valores nulos em datapoints de atualização de dispositivos\nAtualizado: Dependências",
11
+ "nl": "Vertaling:\nIgnore noll waarden in updategegevens van apparaten\nOpgepast",
12
+ "fr": "Correction : Nom d'instance dans les notifications horaires pour les cas défectueux\nFixed: Ignore les valeurs nulles dans les points de données de mise à jour des dispositifs\nActualisé : dépenses",
13
+ "it": "Risolto: nome dell'istanza nelle notifiche di pianificazione per istanze difettose\nRisolto: ignorare i valori null nell'aggiornamento dei datapoint dei dispositivi\nAggiornato: Dipendenze",
14
+ "es": "Fijo: Nombre de la instalación en notificaciones programadas para casos defectuosos\nFijo: Ignorar los valores nulos en los puntos de datos actualizados de los dispositivos\nActualizado: Dependencias",
15
+ "pl": "Fixed: Instance in schedule notifications for faulty instances (ang.)\nFix: Ignore null value in updated datapoints (ang.)\nZastrzeżenie: Zależność",
16
+ "uk": "Виправлено: Ім'я користувача в розкладі повідомлень для несправних екземплярів\nВиправлено: значення Ignore null в оновленні точок даних пристроїв\nОновлено: Залежності",
17
+ "zh-cn": "固定:在通知过失事件时的名称\nFixed: Ignore在更新装置数据点时丧失价值\n更新:属地"
18
+ },
19
+ "2.9.1": {
20
+ "en": "Removed: Function for error handling (not neccessary)",
21
+ "de": "Entfernt: Funktion zur Fehlerbehandlung (nicht erforderlich)",
22
+ "ru": "Удалено: функция обработки ошибок (не обязательно)",
23
+ "pt": "Removido: Função para manipulação de erros (não necessário)",
24
+ "nl": "Verwijderd: Functie voor fouten omgaan met (niet negatief)",
25
+ "fr": "Supprimé : Fonction pour la manipulation d'erreurs (pas neccessaire)",
26
+ "it": "Rimosso: Funzione per la gestione degli errori (non neccessario)",
27
+ "es": "Retirado: Función para el manejo de errores (no es necesario)",
28
+ "pl": "Removed: Funkcje służące do obsługi błędów (nie wymagania)",
29
+ "uk": "Видалити: Функція для обробки помилок (необхідний)",
30
+ "zh-cn": "删除:处理错误(未作必要说明)的职能"
31
+ },
6
32
  "2.9.0": {
7
33
  "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",
8
34
  "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",
@@ -67,32 +93,6 @@
67
93
  "pl": "Fixed: Don't handle id's (ang.)\nAdded: Possibility for the user to select the global deactivation time",
68
94
  "uk": "Виправлено: Не робіть id's, які закінчуються повною поверхнею\nДодано: Можливість вибору глобального часу деактивації екземплярів",
69
95
  "zh-cn": "九. 固定:捐税处理停止完全停战的叛国行为\n增 编:用户可以选择全球启动时间,以选择发生的情况"
70
- },
71
- "2.8.1": {
72
- "en": "Added: Possibility for the user to select the global error time for instances",
73
- "de": "Hinzugefügt: Möglichkeit der Auswahl der globalen Fehlerzeit für Instanzen durch den Benutzer",
74
- "ru": "Добавлена: Возможность для пользователя выбрать глобальное время ошибки для инстанций",
75
- "pt": "Adicionado: Possibilidade para o usuário selecionar o tempo de erro global para instâncias",
76
- "nl": "Toegevoegd voor de gebruiker om de wereldwijde fouten uit te kiezen voor instituut",
77
- "fr": "Ajouté: Possibilité pour l'utilisateur de sélectionner le temps d'erreur global pour les instances",
78
- "it": "Aggiunto: Possibilità per l'utente di selezionare il tempo di errore globale per le istanze",
79
- "es": "Añadido: Posibilidad para que el usuario seleccione el tiempo de error global para los casos",
80
- "pl": "Added: Possibility for the user to select the global error time for instances",
81
- "uk": "Додано: Можливість вибору часу глобальної помилки для екземплярів",
82
- "zh-cn": "增加:用户选择全球错误时间的可能性"
83
- },
84
- "2.8.0": {
85
- "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",
86
- "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",
87
- "ru": "Добавлена: Поддержка LOQED Smart Lock\nДобавлена: Возможность добавления ключа пользователя/группы для Pushover\nДобавлена: Возможность отправки уведомления, если экземпляр был остановлен\nДобавлена: Возможность отправки уведомлений о прокладке с обзором остановленных экземпляров\nИсправлено: Проблема, если уведомления были отправлены с остановленным экземпляром, но вариант не был выбран\nИсправлено: Игнорировать значения батареи 0%, если они не были меньше 5% до",
88
- "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",
89
- "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",
90
- "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",
91
- "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",
92
- "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",
93
- "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",
94
- "uk": "Доданий: Підтримка LOQED Смарт блокування\nДодано: Параметри, щоб додати ключ користувача / групи Api для Pushover\nДоданий: Опція надсилати повідомлення, якщо було припинено\nДодано: Опція для відправки повідомлень про скидання з оглядом припинених екземплярів\nВиправлено: Питання, якщо повідомлення було відправлено припинено, але варіант не був обраний\nВиправлено: значення Ignore батареї 0%, якщо вони не менше 5% до",
95
- "zh-cn": "增加:支持LOQED Smart Lock\n增 编:增加用户/集群的备选办法\n增加:如果某一例子被停止,可发出通知。\n增 编:发出简写通知,概述停止事件\nIxed:如果发出通知被阻止,但选择是选择的。\n固定:Ignore电池数值.0%"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -122,7 +122,7 @@
122
122
  "uk": "Сторожовий пес для пристроїв"
123
123
  },
124
124
  "authors": ["Christian Behrends <mail@christian-behrends.de>"],
125
- "keywords": ["device", "watcher", "device-watcher", "battery", "rssi", "link-quality", "lists"],
125
+ "keywords": ["device", "instance", "watcher", "device-watcher", "instance-watcher", "battery", "rssi", "link-quality", "lists"],
126
126
  "license": "MIT",
127
127
  "platform": "Javascript/Node.js",
128
128
  "main": "main.js",
@@ -135,7 +135,7 @@
135
135
  "type": "misc-data",
136
136
  "compact": true,
137
137
  "connectionType": "local",
138
- "dataSource": "poll",
138
+ "dataSource": "push",
139
139
  "plugins": {
140
140
  "sentry": {
141
141
  "dsn": "https://77c117cb4f6e43059424e03819439c24@o1337119.ingest.sentry.io/6606442"
package/main.js CHANGED
@@ -1,7 +1,3 @@
1
- /* jshint -W097 */
2
- /* jshint strict: false */
3
- /* jslint node: true */
4
-
5
1
  'use strict';
6
2
 
7
3
  const utils = require('@iobroker/adapter-core');
@@ -10,9 +6,6 @@ const schedule = require('node-schedule');
10
6
  const arrApart = require('./lib/arrApart.js'); // list of supported adapters
11
7
  const cronParser = require('cron-parser');
12
8
 
13
- // Sentry error reporting, disable when testing code!
14
- const enableSendSentry = true;
15
-
16
9
  // indicator if the adapter is running or not (for intervall/shedule)
17
10
  let isUnloaded = false;
18
11
 
@@ -264,7 +257,7 @@ class DeviceWatcher extends utils.Adapter {
264
257
  }
265
258
  }
266
259
  } catch (error) {
267
- this.errorReporting('[onReady - create and fill datapoints for each adapter]', error);
260
+ this.log.error(`[onReady - create and fill datapoints for each adapter] - ${error}`);
268
261
  }
269
262
  }
270
263
 
@@ -314,7 +307,7 @@ class DeviceWatcher extends utils.Adapter {
314
307
  // send overview of instances with error
315
308
  if (this.config.checkSendInstanceFailedDaily) this.sendScheduleNotifications('errorInstance');
316
309
  } catch (error) {
317
- this.errorReporting('[onReady]', error);
310
+ this.log.error(`[onReady] - ${error}`);
318
311
  this.terminate ? this.terminate(15) : process.exit(15);
319
312
  }
320
313
  } // <-- onReady end
@@ -601,7 +594,7 @@ class DeviceWatcher extends utils.Adapter {
601
594
  });
602
595
  this.sendTo(obj.from, obj.command, sortDevices, obj.callback);
603
596
  } catch (error) {
604
- this.errorReporting('[onMessage - deviceList for blacklisttable]', error);
597
+ this.log.error(`[onMessage - deviceList for blacklisttable] - ${error}`);
605
598
  }
606
599
  }
607
600
  break;
@@ -626,7 +619,7 @@ class DeviceWatcher extends utils.Adapter {
626
619
  });
627
620
  this.sendTo(obj.from, obj.command, sortInstances, obj.callback);
628
621
  } catch (error) {
629
- this.errorReporting('[onMessage - instanceList]', error);
622
+ this.log.error(`[onMessage - instanceList] - ${error}`);
630
623
  }
631
624
  }
632
625
  break;
@@ -650,7 +643,7 @@ class DeviceWatcher extends utils.Adapter {
650
643
  });
651
644
  this.sendTo(obj.from, obj.command, sortInstances, obj.callback);
652
645
  } catch (error) {
653
- this.errorReporting('[onMessage - instanceList]', error);
646
+ this.log.error(`[onMessage - instanceList] - ${error}`);
654
647
  }
655
648
  }
656
649
  break;
@@ -672,7 +665,7 @@ class DeviceWatcher extends utils.Adapter {
672
665
  await this.writeDatapoints(); // fill the datapoints
673
666
  this.log.debug(`Created and filled data for all adapters`);
674
667
  } catch (error) {
675
- this.errorReporting('[main - create data of all adapter]', error);
668
+ this.log.error(`[main - create data of all adapter] - ${error}`);
676
669
  }
677
670
 
678
671
  // fill datapoints for each adapter if selected
@@ -690,7 +683,7 @@ class DeviceWatcher extends utils.Adapter {
690
683
  }
691
684
  }
692
685
  } catch (error) {
693
- this.errorReporting('[main - create and fill datapoints for each adapter]', error);
686
+ this.log.error(`[main - create and fill datapoints for each adapter] - ${error}`);
694
687
  }
695
688
  }
696
689
 
@@ -763,7 +756,7 @@ class DeviceWatcher extends utils.Adapter {
763
756
  this.blacklistNotify.push(blacklistParse.path);
764
757
  }
765
758
  } catch (error) {
766
- this.errorReporting('[createBlacklist]', error);
759
+ this.log.error(`[createBlacklist] - ${error}`);
767
760
  }
768
761
  if (this.blacklistLists.length >= 1) this.log.info(`Found devices/services on blacklist for lists: ${this.blacklistLists}`);
769
762
  if (this.blacklistAdapterLists.length >= 1) this.log.info(`Found devices/services on blacklist for lists: ${this.blacklistAdapterLists}`);
@@ -786,7 +779,7 @@ class DeviceWatcher extends utils.Adapter {
786
779
  this.blacklistInstancesNotify.push(blacklistParse.instanceID);
787
780
  }
788
781
  } catch (error) {
789
- this.errorReporting('[createBlacklist]', error);
782
+ this.log.error(`[createBlacklist] - ${error}`);
790
783
  }
791
784
  }
792
785
  if (this.blacklistInstancesLists.length >= 1) this.log.info(`Found instances items on blacklist for lists: ${this.blacklistInstancesLists}`);
@@ -811,7 +804,7 @@ class DeviceWatcher extends utils.Adapter {
811
804
  errorTime: userTimeListInstances[i].errorTime,
812
805
  });
813
806
  } catch (error) {
814
- this.errorReporting('[createTimeListInstances]', error);
807
+ this.log.error(`[createTimeListInstances] - ${error}`);
815
808
  }
816
809
  }
817
810
  if (this.userTimeInstancesList.size >= 1) this.log.info(`Found instances items on lists for timesettings: ${Array.from(this.userTimeInstancesList.keys())}`);
@@ -1077,7 +1070,7 @@ class DeviceWatcher extends utils.Adapter {
1077
1070
  }
1078
1071
  } // <-- end of loop
1079
1072
  } catch (error) {
1080
- this.errorReporting('[createData - create data of devices]', error);
1073
+ this.log.error(`[createData - create data of devices] - ${error}`);
1081
1074
  }
1082
1075
  } // <-- end of createData
1083
1076
 
@@ -1174,7 +1167,7 @@ class DeviceWatcher extends utils.Adapter {
1174
1167
  }
1175
1168
  return deviceName;
1176
1169
  } catch (error) {
1177
- this.errorReporting('[getDeviceName]', error);
1170
+ this.log.error(`[getDeviceName] - ${error}`);
1178
1171
  }
1179
1172
  }
1180
1173
 
@@ -1562,7 +1555,7 @@ class DeviceWatcher extends utils.Adapter {
1562
1555
  }
1563
1556
  return [lastContactString, deviceState, linkQuality];
1564
1557
  } catch (error) {
1565
- this.errorReporting('[getLastContact]', error);
1558
+ this.log.error(`[getLastContact] - ${error}`);
1566
1559
  }
1567
1560
  }
1568
1561
 
@@ -1611,10 +1604,12 @@ class DeviceWatcher extends utils.Adapter {
1611
1604
  }
1612
1605
  break;
1613
1606
  default:
1614
- if (deviceUpdateSelector) {
1615
- isUpgradable = true;
1616
- } else if (!deviceUpdateSelector) {
1617
- isUpgradable = false;
1607
+ if (deviceUpdateSelector !== null && typeof deviceUpdateSelector === 'boolean') {
1608
+ if (deviceUpdateSelector) {
1609
+ isUpgradable = true;
1610
+ } else if (!deviceUpdateSelector) {
1611
+ isUpgradable = false;
1612
+ }
1618
1613
  }
1619
1614
  }
1620
1615
 
@@ -2000,7 +1995,7 @@ class DeviceWatcher extends utils.Adapter {
2000
1995
  const lastCheck = this.formatDate(new Date(), 'DD.MM.YYYY') + ' - ' + this.formatDate(new Date(), 'hh:mm:ss');
2001
1996
  await this.setStateChangedAsync('lastCheck', lastCheck, true);
2002
1997
  } catch (error) {
2003
- this.errorReporting('[writeDatapoints]', error);
1998
+ this.log.error(`[writeDatapoints] - ${error}`);
2004
1999
  }
2005
2000
  this.log.debug(`Function finished: ${this.writeDatapoints.name}`);
2006
2001
  } //<--End of writing Datapoints
@@ -2013,7 +2008,7 @@ class DeviceWatcher extends utils.Adapter {
2013
2008
  const allInstances = `system.adapter.*`;
2014
2009
  await this.getInstanceData(allInstances);
2015
2010
  } catch (error) {
2016
- this.errorReporting('[getInstance]', error);
2011
+ this.log.error(`[getInstance] - ${error}`);
2017
2012
  }
2018
2013
  }
2019
2014
 
@@ -2113,7 +2108,7 @@ class DeviceWatcher extends utils.Adapter {
2113
2108
  await this.createInstanceList();
2114
2109
  await this.writeInstanceDPs();
2115
2110
  } catch (error) {
2116
- this.errorReporting('[getInstanceData]', error);
2111
+ this.log.error(`[getInstanceData] - ${error}`);
2117
2112
  }
2118
2113
  }
2119
2114
 
@@ -2804,7 +2799,7 @@ class DeviceWatcher extends utils.Adapter {
2804
2799
  });
2805
2800
  }
2806
2801
  } catch (error) {
2807
- this.errorReporting('[sendNotification Pushover]', error);
2802
+ this.log.error(`[sendNotification Pushover] - ${error}`);
2808
2803
  }
2809
2804
  }
2810
2805
 
@@ -2824,7 +2819,7 @@ class DeviceWatcher extends utils.Adapter {
2824
2819
  });
2825
2820
  }
2826
2821
  } catch (error) {
2827
- this.errorReporting('[sendNotification Telegram]', error);
2822
+ this.log.error(`[sendNotification Telegram] - ${error}`);
2828
2823
  }
2829
2824
  }
2830
2825
 
@@ -2843,7 +2838,7 @@ class DeviceWatcher extends utils.Adapter {
2843
2838
  });
2844
2839
  }
2845
2840
  } catch (error) {
2846
- this.errorReporting('[sendNotification Whatsapp]', error);
2841
+ this.log.error(`[sendNotification Whatsapp] - ${error}`);
2847
2842
  }
2848
2843
  }
2849
2844
 
@@ -2862,7 +2857,7 @@ class DeviceWatcher extends utils.Adapter {
2862
2857
  });
2863
2858
  }
2864
2859
  } catch (error) {
2865
- this.errorReporting('[sendNotification Matrix]', error);
2860
+ this.log.error(`[sendNotification Matrix] - ${error}`);
2866
2861
  }
2867
2862
  }
2868
2863
 
@@ -2881,7 +2876,7 @@ class DeviceWatcher extends utils.Adapter {
2881
2876
  });
2882
2877
  }
2883
2878
  } catch (error) {
2884
- this.errorReporting('[sendNotification Signal]', error);
2879
+ this.log.error(`[sendNotification Signal] - ${error}`);
2885
2880
  }
2886
2881
  }
2887
2882
 
@@ -2901,7 +2896,7 @@ class DeviceWatcher extends utils.Adapter {
2901
2896
  });
2902
2897
  }
2903
2898
  } catch (error) {
2904
- this.errorReporting('[sendNotification eMail]', error);
2899
+ this.log.error(`[sendNotification eMail] - ${error}`);
2905
2900
  }
2906
2901
  }
2907
2902
 
@@ -2921,7 +2916,7 @@ class DeviceWatcher extends utils.Adapter {
2921
2916
  );
2922
2917
  }
2923
2918
  } catch (error) {
2924
- this.errorReporting('[sendNotification Jarvis]', error);
2919
+ this.log.error(`[sendNotification Jarvis] - ${error}`);
2925
2920
  }
2926
2921
  }
2927
2922
 
@@ -2941,7 +2936,7 @@ class DeviceWatcher extends utils.Adapter {
2941
2936
  );
2942
2937
  }
2943
2938
  } catch (error) {
2944
- this.errorReporting('[sendNotification Lovelace]', error);
2939
+ this.log.error(`[sendNotification Lovelace] - ${error}`);
2945
2940
  }
2946
2941
  }
2947
2942
 
@@ -2961,7 +2956,7 @@ class DeviceWatcher extends utils.Adapter {
2961
2956
  }
2962
2957
  }
2963
2958
  } catch (error) {
2964
- this.errorReporting('[sendNotification Synochat]', error);
2959
+ this.log.error(`[sendNotification Synochat] - ${error}`);
2965
2960
  }
2966
2961
  }
2967
2962
  } // <-- End of sendNotification function
@@ -3272,7 +3267,7 @@ class DeviceWatcher extends utils.Adapter {
3272
3267
 
3273
3268
  for (const id of this.listErrorInstanceRaw) {
3274
3269
  if (this.blacklistInstancesNotify.includes(id)) continue;
3275
- list = `${list}\n${id}: ${id.Status}`;
3270
+ list = `${list}\n${id.Instance}: ${id.Status}`;
3276
3271
  }
3277
3272
  if (list.length === 0) return;
3278
3273
  message = `Tägliche Meldung über fehlerhafte Instanzen: ${list}`;
@@ -4354,30 +4349,10 @@ class DeviceWatcher extends utils.Adapter {
4354
4349
  const previous = interval.prev();
4355
4350
  return Math.floor(Date.now() - previous.getTime()); // in ms
4356
4351
  } catch (error) {
4357
- this.log.warn(error);
4358
- return;
4352
+ this.log.error(`[getPreviousCronRun] - ${error}`);
4359
4353
  }
4360
4354
  }
4361
4355
 
4362
- /**
4363
- * @param {string} codePart - Message Prefix
4364
- * @param {object} error - Sentry message
4365
- */
4366
- errorReporting(codePart, error) {
4367
- const msg = `[${codePart}] error: ${error.message}`;
4368
- if (enableSendSentry) {
4369
- if (this.supportsFeature && this.supportsFeature('PLUGINS')) {
4370
- const sentryInstance = this.getPluginInstance('sentry');
4371
- if (sentryInstance) {
4372
- this.log.warn(`Error catched and sent to Sentry, error: ${msg}`);
4373
- sentryInstance.getSentryObject().captureException(msg);
4374
- }
4375
- }
4376
- } else {
4377
- this.log.error(`Sentry disabled, error catched : ${msg}`);
4378
- }
4379
- } // <-- end of errorReporting
4380
-
4381
4356
  /**
4382
4357
  * @param {() => void} callback
4383
4358
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.device-watcher",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "Watchdog for devices",
5
5
  "author": {
6
6
  "name": "Christian Behrends",
@@ -31,10 +31,10 @@
31
31
  "@alcalzone/release-script-plugin-manual-review": "^3.5.9",
32
32
  "@iobroker/adapter-dev": "^1.2.0",
33
33
  "@iobroker/testing": "^4.1.0",
34
- "@types/chai": "^4.3.4",
34
+ "@types/chai": "^4.3.5",
35
35
  "@types/chai-as-promised": "^7.1.5",
36
36
  "@types/mocha": "^10.0.1",
37
- "@types/node": "^18.15.11",
37
+ "@types/node": "^18.16.3",
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.37.0",
45
+ "eslint": "^8.39.0",
46
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.7",
50
+ "prettier": "^2.8.8",
51
51
  "proxyquire": "^2.1.3",
52
- "sinon": "^15.0.3",
52
+ "sinon": "^15.0.4",
53
53
  "sinon-chai": "^3.7.0",
54
- "typescript": "~5.0.3"
54
+ "typescript": "~5.0.4"
55
55
  },
56
56
  "main": "main.js",
57
57
  "files": [