iobroker.device-watcher 2.2.2 → 2.3.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 ciddi89 <mail@christian-behrends.de>
3
+ Copyright (c) 2023 ciddi89 <mail@christian-behrends.de>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -37,20 +37,114 @@
37
37
 
38
38
  ## Device-Watcher adapter for ioBroker
39
39
 
40
- This is a watchdog for devices. The adapter looks for the rssi/link quality and battery states and create JSON & HTML lists of them (devices with battery, devices with low battery, devices with link quality, devices offline and devices all) and count the devices in the same categories. For example you can use the lists and states for Grafana, Jarvis etc.
41
-
42
- **Supported adapters:**
43
-
44
- | - Alexa2<br>- Ble<br>- Deconz<br>- Enocean<br>- ESPHome<br>- FritzDect<br>- HAM<br>- Harmony<br>- HmiP<br>- Homematic<br>- HS100<br>- Hue<br>- Hue Extended<br>- Jeelink | - Lupusec<br>- MaxCube<br>- Meross<br>- MiHome<br>- MiHome Vacuum<br>- Netatmo<br>- Nuki Extended<br>- NUT<br>- Ping<br>- Roomba<br>- Shelly<br>- Sonoff<br>- Sonos<br>- Switchbot Ble | - Tado<br>- Tradfri<br>- Unifi<br>- WLED<br>- Yeelight<br>- Zigbee<br>- Zigbee2MQTT<br>- Zwave |
45
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
46
-
47
- **If one adapter is missing, feel free to open an [issue](https://github.com/ciddi89/ioBroker.device-watcher/issues/new/choose) with request to add it.**
48
-
49
- The adapter has also the option to send notifications if the number of offline devices are changed and to send you a notification if devices has a low battery state (e.g. 30%). You can choose the value for the battery notification and on which days you want the notification for low batteries.
50
-
51
- Currently supported notification services are:
52
-
53
- - Telegram (with support of Chat-ID for groupchats)
40
+ This is a watchdog for devices. The adapter looks for the different information about the datapoints and create JSON & HTML lists of them:
41
+
42
+ - devices with battery,
43
+ - devices with low battery,
44
+ - devices with link quality,
45
+ - updates for devices,
46
+ - devices offline and
47
+ - all devices
48
+
49
+ It's also counting them in the same categories. You can use the lists and states for Grafana, Jarvis etc for example.
50
+
51
+ ### Supported adapters:
52
+
53
+ <table>
54
+ <tr>
55
+ <td>Alexa2</td>
56
+ <td>APC UPS</td>
57
+ <td>Ble</td>
58
+ </tr>
59
+ <tr>
60
+ <td>Deconz</td>
61
+ <td>Enocean</td>
62
+ <td>ESP Home</td>
63
+ </tr>
64
+ <tr>
65
+ <td>FritzDect</td>
66
+ <td>fullyBrowser</td>
67
+ <td>Harmony</td>
68
+ </tr>
69
+ <tr>
70
+ <td>Ham</td>
71
+ <td>Homematic IP</td>
72
+ <td>Homematic RPC</td>
73
+ </tr>
74
+ <tr>
75
+ <td>HS100</td>
76
+ <td>Philips Hue</td>
77
+ <td>Philips Hue Extended</td>
78
+ </tr>
79
+ <tr>
80
+ <td>Innogy Smarthome</td>
81
+ <td>Jeelink</td>
82
+ <td>Lupusec</td>
83
+ </tr>
84
+ <tr>
85
+ <td>Max! Cube</td>
86
+ <td>Meross</td>
87
+ <td>MiHome</td>
88
+ </tr>
89
+ <tr>
90
+ <td>MiHome Vacuum</td>
91
+ <td>MQTT Client Zigbee2Mqtt</td>
92
+ <td>MQTT Nuki</td>
93
+ </tr>
94
+ <tr>
95
+ <td>MusicCast</td>
96
+ <td>Netatmo</td>
97
+ <td>Nuki Extended</td>
98
+ </tr>
99
+ <tr>
100
+ <td>Nut</td>
101
+ <td>Ping</td>
102
+ <td>Roomba</td>
103
+ </tr>
104
+ <tr>
105
+ <td>Shelly</td>
106
+ <td>Sonoff</td>
107
+ <td>Sonos</td>
108
+ </tr>
109
+ <tr>
110
+ <td>Sureflap</td>
111
+ <td>Switchbot Ble</td>
112
+ <td>Tado</td>
113
+ </tr>
114
+ <tr>
115
+ <td>Tapo</td>
116
+ <td>Tradfri</td>
117
+ <td>Unifi</td>
118
+ </tr>
119
+ <tr>
120
+ <td>Wled</td>
121
+ <td>Yeelight</td>
122
+ <td>Zigbee</td>
123
+ </tr>
124
+ <tr>
125
+ <td>Zigbee2MQTT</td>
126
+ <td>Zwave</td>
127
+ <td></td>
128
+ </tr>
129
+ </table>
130
+
131
+ A list with more information about the supported adapters can be found here: [in German](docs/de/listSupportAdapter.md) or [in English](docs/en/listSupportAdapter.md).</br>
132
+ **If one adapter is missing, feel free to open an request [issue](https://github.com/ciddi89/ioBroker.device-watcher/issues/new/choose) to add it.**
133
+
134
+ ### Notifications:
135
+
136
+ The adapter has different possibilities to send notifications:
137
+
138
+ - A device is no longer reachable or reachable again
139
+ - A device has reached the low battery level or the low bat state is true
140
+ - When an update is available for a device (shelly and unifi)
141
+ - Time based a list of offline devices
142
+ - Time based a list of low batterie devices
143
+ - Time based a list of devices which can be updated
144
+
145
+ ### Currently supported notification services are:
146
+
147
+ - Telegram
54
148
  - Pushover
55
149
  - WhatsApp
56
150
  - Email
@@ -59,37 +153,34 @@ Currently supported notification services are:
59
153
  - SynoChat
60
154
  - and also an datapoint with the last notification, so you can use it for other services which aren't supported.
61
155
 
62
- If you found a bug or you have an improvement suggestion, feel free to open an issue.
63
-
64
156
  ### Blacklist
65
157
 
66
- If you don't want a specifice device in the list, you can add it in the blacklist and the adapter will ignore it.
158
+ Is it neccessary to ignore a specifice device, you can add it in the blacklist and the device-watcher will ignore it.
159
+ It's possible to select:
67
160
 
68
- ![add_blacklist.png](admin/images/add_blacklist.png)
161
+ - Ignore in notifications
162
+ - Ignore in main list
163
+ - Ignore in adapter own list
69
164
 
70
- ### Example images of Pushover notification:
71
-
72
- ![noti_push.jpeg](admin/images/noti_push.jpeg)
73
- ![noti_push2.jpeg](admin/images/noti_push2.jpeg)
74
-
75
- ### Here are some images how the lists look:
165
+ ### Here are some images how the lists can be look like in Grafana:
76
166
 
77
167
  ![list1.png](admin/images/list1.png)
78
168
  ![list2.png](admin/images/list2.png)
79
169
  ![list3.png](admin/images/list3.png)
80
170
 
81
- ## To-Do
82
-
83
- - [ ] clean up the code
84
- - [ ] add support for reaction on state-changes
85
- - [ ] send offline text only from the device that goes offline
86
-
87
171
  ## Changelog
88
172
 
89
173
  <!--
90
174
  Placeholder for the next version (at the beginning of the line):
91
175
  ### **WORK IN PROGRESS**
92
176
  -->
177
+ ### 2.3.0 (2023-01-03)
178
+
179
+ - (ciddi89) sorting for device selection in the blacklist added
180
+ - (ciddi89) Devices can now also be blacklisted in adapter own list
181
+ - (ciddi89) booleans for lowbat, offline and upgradable added
182
+ - (ciddi89) euSec adapter added ([#73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73))
183
+
93
184
  ### 2.2.2 (2022-12-29)
94
185
 
95
186
  - (ciddi89) some translation added
@@ -252,7 +343,7 @@ If you don't want a specifice device in the list, you can add it in the blacklis
252
343
 
253
344
  MIT License
254
345
 
255
- Copyright (c) 2022 Christian Behrends <mail@christian-behrends.de>
346
+ Copyright (c) 2023 Christian Behrends <mail@christian-behrends.de>
256
347
 
257
348
  Permission is hereby granted, free of charge, to any person obtaining a copy
258
349
  of this software and associated documentation files (the "Software"), to deal
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Aktualisieren Sie Listen und Zählungen direkt bei jedem Zustandswechsel von Geräten",
100
100
  "Overview of low battery devices": "Übersicht über schwache Batteriegeräte",
101
101
  "Get a regular message with an overview all low battery devices": "Erhalten Sie eine regelmäßige Nachricht mit einer Übersicht aller schwachen Batteriegeräte",
102
- "From what % battery is considered low": "Ab wie viel % gilt der Akku als schwach"
102
+ "From what % battery is considered low": "Ab wie viel % gilt der Akku als schwach",
103
+ "Ignore in main lists": "In Hauptlisten ignorieren",
104
+ "Ignore in Own lists per adapter": "Ignorieren in Eigene Listen pro Adapter",
105
+ "Ignore in lists per adapter": "In Listen pro Adapter ignorieren"
103
106
  }
@@ -95,5 +95,8 @@
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",
97
97
  "Get a regular message with an overview all low battery devices": "Get a regular message with an overview all low battery devices",
98
- "From what % battery is considered low": "From what % battery is considered low"
98
+ "From what % battery is considered low": "From what % battery is considered low",
99
+ "Ignore in main lists": "Ignore in main lists",
100
+ "Ignore in Own lists per adapter": "Ignore in Own lists per adapter",
101
+ "Ignore in lists per adapter": "Ignore in lists per adapter"
99
102
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Actualice listas y conteos directamente con cada cambio de estado de los dispositivos",
100
100
  "Overview of low battery devices": "Descripción general de los dispositivos con batería baja",
101
101
  "Get a regular message with an overview all low battery devices": "Reciba un mensaje regular con una descripción general de todos los dispositivos con batería baja",
102
- "From what % battery is considered low": "A partir de qué % de batería se considera bajo"
102
+ "From what % battery is considered low": "A partir de qué % de batería se considera bajo",
103
+ "Ignore in main lists": "Ignorar en las listas principales",
104
+ "Ignore in Own lists per adapter": "Ignorar en Listas propias por adaptador",
105
+ "Ignore in lists per adapter": "Ignorar en listas por adaptador"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Mettre à jour les listes et les décomptes directement à chaque changement d'état des appareils",
100
100
  "Overview of low battery devices": "Aperçu des appareils à batterie faible",
101
101
  "Get a regular message with an overview all low battery devices": "Recevez un message régulier avec un aperçu de tous les appareils à batterie faible",
102
- "From what % battery is considered low": "A partir de quel % la batterie est considérée comme faible"
102
+ "From what % battery is considered low": "A partir de quel % la batterie est considérée comme faible",
103
+ "Ignore in main lists": "Ignorer dans les listes principales",
104
+ "Ignore in Own lists per adapter": "Ignorer dans les listes propres par adaptateur",
105
+ "Ignore in lists per adapter": "Ignorer dans les listes par adaptateur"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Aggiorna elenchi e conteggi direttamente con ogni cambio di stato dei dispositivi",
100
100
  "Overview of low battery devices": "Panoramica dei dispositivi con batteria scarica",
101
101
  "Get a regular message with an overview all low battery devices": "Ricevi un messaggio regolare con una panoramica di tutti i dispositivi con batteria scarica",
102
- "From what % battery is considered low": "Da quale % la batteria è considerata scarica"
102
+ "From what % battery is considered low": "Da quale % la batteria è considerata scarica",
103
+ "Ignore in main lists": "Ignora nelle liste principali",
104
+ "Ignore in Own lists per adapter": "Ignora negli elenchi Propri per adattatore",
105
+ "Ignore in lists per adapter": "Ignora negli elenchi per adattatore"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Update lijsten en tellingen direct bij elke statusverandering van apparaten",
100
100
  "Overview of low battery devices": "Overzicht apparaten met bijna lege batterij",
101
101
  "Get a regular message with an overview all low battery devices": "Ontvang regelmatig een bericht met een overzicht van alle bijna lege apparaten",
102
- "From what % battery is considered low": "Van welk % batterij als laag wordt beschouwd"
102
+ "From what % battery is considered low": "Van welk % batterij als laag wordt beschouwd",
103
+ "Ignore in main lists": "Negeren in hoofdlijsten",
104
+ "Ignore in Own lists per adapter": "Negeren in Eigen lijsten per adapter",
105
+ "Ignore in lists per adapter": "Negeren in lijsten per adapter"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Aktualizuj listy i liczniki bezpośrednio przy każdej zmianie stanu urządzeń",
100
100
  "Overview of low battery devices": "Przegląd urządzeń o niskim poziomie naładowania baterii",
101
101
  "Get a regular message with an overview all low battery devices": "Otrzymuj regularne wiadomości z przeglądem wszystkich urządzeń o niskim poziomie baterii",
102
- "From what % battery is considered low": "Od jakiego % baterii uważa się za niski"
102
+ "From what % battery is considered low": "Od jakiego % baterii uważa się za niski",
103
+ "Ignore in main lists": "Ignoruj ​​na listach głównych",
104
+ "Ignore in Own lists per adapter": "Ignoruj ​​na własnych listach na adapter",
105
+ "Ignore in lists per adapter": "Ignoruj ​​na listach według adaptera"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Atualiza listas e contagens diretamente com cada mudança de estado dos dispositivos",
100
100
  "Overview of low battery devices": "Visão geral de dispositivos com bateria fraca",
101
101
  "Get a regular message with an overview all low battery devices": "Receba uma mensagem regular com uma visão geral de todos os dispositivos com bateria fraca",
102
- "From what % battery is considered low": "A partir de que % a bateria é considerada fraca"
102
+ "From what % battery is considered low": "A partir de que % a bateria é considerada fraca",
103
+ "Ignore in main lists": "Ignorar nas listas principais",
104
+ "Ignore in Own lists per adapter": "Ignorar nas próprias listas por adaptador",
105
+ "Ignore in lists per adapter": "Ignorar nas listas por adaptador"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Обновляйте списки и счетчики непосредственно при каждом изменении состояния устройств.",
100
100
  "Overview of low battery devices": "Обзор устройств с низким зарядом батареи",
101
101
  "Get a regular message with an overview all low battery devices": "Получайте регулярное сообщение с обзором всех устройств с низким зарядом батареи",
102
- "From what % battery is considered low": "С какого % батарея считается разряженной"
102
+ "From what % battery is considered low": "С какого % батарея считается разряженной",
103
+ "Ignore in main lists": "Игнорировать в основных списках",
104
+ "Ignore in Own lists per adapter": "Игнорировать в собственных списках на адаптер",
105
+ "Ignore in lists per adapter": "Игнорировать в списках на адаптер"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "Оновлюйте списки та підрахунки безпосередньо з кожною зміною стану пристроїв",
100
100
  "Overview of low battery devices": "Огляд розряджених пристроїв",
101
101
  "Get a regular message with an overview all low battery devices": "Отримуйте регулярне повідомлення з оглядом усіх пристроїв із розрядженим акумулятором",
102
- "From what % battery is considered low": "Від якого % батарея вважається розрядженою"
102
+ "From what % battery is considered low": "Від якого % батарея вважається розрядженою",
103
+ "Ignore in main lists": "Ігнорувати в основних списках",
104
+ "Ignore in Own lists per adapter": "Ігнорувати у власних списках на адаптер",
105
+ "Ignore in lists per adapter": "Ігнорувати в списках на адаптер"
103
106
  }
@@ -99,5 +99,8 @@
99
99
  "Update lists & counts directly with each statechange of devices": "每次设备状态变化时直接更新列表和计数",
100
100
  "Overview of low battery devices": "低电量设备概述",
101
101
  "Get a regular message with an overview all low battery devices": "获取包含所有低电量设备概览的常规消息",
102
- "From what % battery is considered low": "从什么百分比电池被认为是低"
102
+ "From what % battery is considered low": "从什么百分比电池被认为是低",
103
+ "Ignore in main lists": "在主列表中忽略",
104
+ "Ignore in Own lists per adapter": "在每个适配器自己的列表中忽略",
105
+ "Ignore in lists per adapter": "在每个适配器的列表中忽略"
103
106
  }
@@ -53,6 +53,13 @@
53
53
  "lg": 3,
54
54
  "label": "EspHome"
55
55
  },
56
+ "eusecDevices": {
57
+ "type": "checkbox",
58
+ "sm": 6,
59
+ "md": 6,
60
+ "lg": 3,
61
+ "label": "euSec"
62
+ },
56
63
  "fritzdectDevices": {
57
64
  "type": "checkbox",
58
65
  "sm": 6,
@@ -942,10 +949,17 @@
942
949
  },
943
950
  {
944
951
  "type": "checkbox",
945
- "title": "Ignor in lists",
952
+ "title": "Ignore in main lists",
946
953
  "attr": "checkIgnorLists",
947
954
  "width": "10%",
948
955
  "alsoDependsOn": ["devices"]
956
+ },
957
+ {
958
+ "type": "checkbox",
959
+ "title": "Ignore in lists per adapter",
960
+ "attr": "checkIgnorAdapterLists",
961
+ "width": "10%",
962
+ "alsoDependsOn": ["devices"]
949
963
  }
950
964
  ]
951
965
  }
@@ -1118,6 +1132,18 @@
1118
1132
  "hidden": "!data.esphomeDevices",
1119
1133
  "hideOnlyControl": false
1120
1134
  },
1135
+ "eusecMaxMinutes": {
1136
+ "type": "number",
1137
+ "min": -1,
1138
+ "max": 100000,
1139
+ "sm": 6,
1140
+ "md": 6,
1141
+ "lg": 3,
1142
+ "label": "euSec",
1143
+ "help": "in minutes",
1144
+ "hidden": "!data.eusecDevices",
1145
+ "hideOnlyControl": false
1146
+ },
1121
1147
  "fritzdectMaxMinutes": {
1122
1148
  "type": "number",
1123
1149
  "min": -1,
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "device-watcher",
4
- "version": "2.2.2",
4
+ "version": "2.3.0",
5
5
  "news": {
6
+ "2.3.0": {
7
+ "en": "sorting for device selection in the blacklist added\nDevices can now also be blacklisted in adapter own list\nbooleans for lowbat, offline and upgradable added\neuSec adapter added ([#73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73))",
8
+ "de": "sortierung für geräteauswahl in der blacklist hinzugefügt\nGeräte können jetzt auch in Adapter-Eigenliste schwarz aufgeführt werden\nbooleans für lowbat, offline und aufrüstbar hinzugefügt\neuSec Adapter hinzugefügt #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
9
+ "ru": "сортировка для выбора устройства в черном списке добавлена\nУстройства теперь также могут быть черный список в списке адаптеров\nbooleans для lowbat, offline и upgradable добавлены\neuSec адаптер добавлен #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
10
+ "pt": "classificação para seleção de dispositivos na lista negra adicionada\nDispositivos agora também podem ser listados na lista própria do adaptador\nbooleanos para baixobat, off-line e upgradable adicionado\nadaptador euSec adicionado #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
11
+ "nl": "materiaal in de zwarte lijst toegevoegd\nDe slachtoffers kunnen nu ook zwart op wit staan in een eigen lijst\nbooleans voor laagbat, offline en upgradable toegevoegd\nquality over Quantity (QoQ) Releases Vertaling:",
12
+ "fr": "tri pour la sélection des appareils dans la liste noire ajoutée\nLes appareils peuvent maintenant être également noirlistés dans la liste d'adaptateurs propre\nbooléens pour faible teneur, hors ligne et dégradable ajouté\nadaptateur euSec ajouté #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
13
+ "it": "selezione del dispositivo nella lista nera aggiunto\nI dispositivi possono ora anche essere blacklist nella propria lista adattatore\nbooleans per basso, offline e aggiornabile aggiunto\nadattatore euSec aggiunto #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
14
+ "es": "clasificación para la selección de dispositivos en la lista negra\nLos dispositivos también pueden ser enlistados en la lista de adaptadores\nbooleanos para bajabat, sin conexión y añadida\neuSec adapter added #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
15
+ "pl": "dobór urządzenia w czarnej liście dodał sortowanie do wyboru urządzenia\nUrządzenia mogą być również czarne w wersji adapterowej\nbooleanzy dla niskopodłogowej, offline i upgradable dodać\ndodarzenie euSec dodaje #73 (https:/github.com/ciddi89/ioBroker,device-watcher/issues/73)",
16
+ "uk": "сортування для вибору пристрою в чорному списку\nПристрої тепер також можуть бути чорними у списку адаптерів\nболеани для негабариту, автономної та розширеної доданої\neuSec адаптер додано #[73](https://github.com/ciddi89/ioBroker.device-watcher/issues/73)",
17
+ "zh-cn": "黑名单中选用装置的类型\n现在也可能被黑名单人黑名单,以适应者自己的名单。\n低巴特、径流和降解的诱因\n用户增加了第[73]号(http://github.com/ciddi89/ioBroker.device-watcher/issues/73)"
18
+ },
6
19
  "2.2.2": {
7
20
  "en": "some translation added\ndatapoints will be written in intervall\nimprovements of lists\nsome other small improvements",
8
21
  "de": "einige übersetzung hinzugefügt\ndatenpunkte werden in intervall geschrieben\nverbesserungen der listen\neinige andere kleine verbesserungen",
@@ -80,19 +93,6 @@
80
93
  "pl": "dodany status baterii\nurządzenia z baterią, które są offline, są obecnie włączone do listy baterii\nmałe poprawki tłumaczenia\nwspółczynnikowy: możesz użyć 0 zamiast -1 (jak będzie nowy standard)\nulepszenia adaptername\nnumery stałe (#66(https:/github.com/ciddi89/ioBroker.device-watcher/issues/66) & #67(https:/github.com/ciddi89/ioBroker.device-watcher/67)\nulepszenia czarnej listy\nobsługa blacklist object",
81
94
  "uk": "додано статус до списку акумуляторів\nпристрої для баттів, які в автономному режимі, все ще включені в список акумуляторів\nневеликі поліпшення перекладів\nв автономному режимі настройки часу: ви можете використовувати 0 замість -1 (це буде новий стандарт)\nполіпшення імені адаптера\n[#66](https://github.com/ciddi89/ioBroker.device-watcher/issues/66) & [#67](https://github.com/ciddi89/ioBroker.device-watcher/issues/67)\nвідремонтовані повідомлення blacklist\nдодана обробка для об'єкта blacklist",
82
95
  "zh-cn": "电池清单的附加地位\nb 现仍在列入电池清单的浮动装置\n翻译的小改进\n时限:你可以使用0.而不是1-1(即新标准)\nb. 改进适应人员名\n固定问题[第66](http://github.com/ciddi89/ioBroker.device-watcher/issues/66)和[#67](http://github.com/ciddi89/Broker.device-watcher/issues/67)\n修理黑名单通知\n黑名单目标的新增处理"
83
- },
84
- "2.0.1": {
85
- "en": "If the device is offline, set signal strength to '0%'\nIf the device is offline, set battery to ' - '\nrepair some small issues in the lists",
86
- "de": "Ist das Gerät offline, setzen Sie Signalstärke auf 0%\nWenn das Gerät offline ist, setzen Sie Batterie auf ' - '\neinige kleine probleme in den listen reparieren",
87
- "ru": "Если устройство оффлайн, установите силу сигнала до 0%\nЕсли устройство оффлайн, установите аккумулятор в ' - '\nотремонтировать некоторые небольшие проблемы в списках",
88
- "pt": "Se o dispositivo estiver offline, defina a força do sinal para 0%\nSe o dispositivo estiver offline, configure a bateria para ' - '\nreparar alguns pequenos problemas nas listas",
89
- "nl": "Als het apparaat offline is, zet een signaalstilstand op 0%\nAls het apparaat offline is, zet dan batterij op '\nrepareer wat kleine kwesties in de lijst",
90
- "fr": "Si l'appareil est hors ligne, définir la résistance du signal à 0%\nSi l'appareil est hors ligne, régler la batterie à ' - '\nréparer quelques petits problèmes dans les listes",
91
- "it": "Se il dispositivo è offline, impostare la forza del segnale a 0%\nSe il dispositivo è offline, impostare la batteria a ' - '\nriparare alcuni piccoli problemi nelle liste",
92
- "es": "Si el dispositivo está fuera de línea, establece la fuerza de señal al 0%\nSi el dispositivo está fuera de línea, establece la batería a ' - '\nreparar algunas pequeñas cuestiones en las listas",
93
- "pl": "Jeśli urządzenie jest offline, ustawia siłę sygnału do 0%\nJeśli urządzenie jest wycinane, ustawiono baterię do '- '\nwyremontowano drobne problemy w listach",
94
- "uk": "Якщо пристрій вимкнено, встановлюється міцність сигналу на 0%\nЯкщо пристрій вимкнено, встановіть акумулятор до ' - '\nремонт деяких невеликих питань у переліках",
95
- "zh-cn": "如果装置落空,信号强度达到0%\n如果装置不线,便将电池到该地。\n在名单中修理一些小型问题"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -187,6 +187,8 @@
187
187
  "enoceanMaxMinutes": 300,
188
188
  "esphomeDevices": false,
189
189
  "esphomeMaxMinutes": 0,
190
+ "eusecDevices": false,
191
+ "eusecMaxMinutes": 0,
190
192
  "fritzdectDevices": false,
191
193
  "fritzdectMaxMinutes": 0,
192
194
  "fullybrowserDevices": false,
@@ -371,6 +373,31 @@
371
373
  },
372
374
  "native": {}
373
375
  },
376
+ {
377
+ "_id": "oneDeviceOffline",
378
+ "type": "state",
379
+ "common": {
380
+ "name": {
381
+ "en": "Is one device with offline",
382
+ "de": "Ist ein Gerät mit Offline",
383
+ "ru": "Это одно устройство с offline",
384
+ "pt": "É um dispositivo com offline",
385
+ "nl": "Is een apparaat met offline",
386
+ "fr": "Est un appareil avec hors ligne",
387
+ "it": "È un dispositivo con offline",
388
+ "es": "Es un dispositivo sin conexión",
389
+ "pl": "Jest to jeden urządzenie z offlinem",
390
+ "uk": "Є один пристрій з автономним",
391
+ "zh-cn": "一处有线装置"
392
+ },
393
+ "type": "boolean",
394
+ "role": "state",
395
+ "read": true,
396
+ "write": false,
397
+ "def": false
398
+ },
399
+ "native": {}
400
+ },
374
401
  {
375
402
  "_id": "listAll",
376
403
  "type": "state",
@@ -532,6 +559,31 @@
532
559
  },
533
560
  "native": {}
534
561
  },
562
+ {
563
+ "_id": "oneDeviceLowBat",
564
+ "type": "state",
565
+ "common": {
566
+ "name": {
567
+ "en": "Is one device with low battery",
568
+ "de": "Ist ein Gerät mit niedrigem Akku",
569
+ "ru": "Один прибор с низкой батареей",
570
+ "pt": "É um dispositivo com bateria baixa",
571
+ "nl": "Is een apparaat met lage batterijen",
572
+ "fr": "Est un appareil avec batterie basse",
573
+ "it": "È un dispositivo con batteria bassa",
574
+ "es": "Es un dispositivo con batería baja",
575
+ "pl": "Jest to jeden urządzenie z niską baterią",
576
+ "uk": "Є одним пристроєм з низьких акумуляторів",
577
+ "zh-cn": "低电池的装置"
578
+ },
579
+ "type": "boolean",
580
+ "role": "state",
581
+ "read": true,
582
+ "write": false,
583
+ "def": false
584
+ },
585
+ "native": {}
586
+ },
535
587
  {
536
588
  "_id": "lastCheck",
537
589
  "type": "state",
@@ -625,6 +677,31 @@
625
677
  "write": false
626
678
  },
627
679
  "native": {}
680
+ },
681
+ {
682
+ "_id": "oneDeviceUpdatable",
683
+ "type": "state",
684
+ "common": {
685
+ "name": {
686
+ "en": "Is one device updatable",
687
+ "de": "Ist ein Gerät aufnehmbar",
688
+ "ru": "Одно устройство обновляется",
689
+ "pt": "É um dispositivo updatable",
690
+ "nl": "Is een apparaat updat",
691
+ "fr": "Est-ce qu'un appareil est indéfectible",
692
+ "it": "È un dispositivo updatable",
693
+ "es": "Es un dispositivo actualizado",
694
+ "pl": "Jest to jedno urządzenie updatable",
695
+ "uk": "Є одним пристроєм",
696
+ "zh-cn": "一台装置"
697
+ },
698
+ "type": "boolean",
699
+ "role": "state",
700
+ "read": true,
701
+ "write": false,
702
+ "def": false
703
+ },
704
+ "native": {}
628
705
  }
629
706
  ]
630
707
  }
package/lib/arrApart.js CHANGED
@@ -52,6 +52,16 @@ const arrApart = {
52
52
  isLowBat: 'none',
53
53
  id: '.name',
54
54
  },
55
+ eusec: {
56
+ Selektor: 'eusec.*.software_version',
57
+ adapterID: 'eusec',
58
+ adapter: 'euSec',
59
+ battery: '.battery',
60
+ rssiState: '.wifi_rssi',
61
+ reach: '.connection',
62
+ isLowBat: '.battery_low',
63
+ id: '.name',
64
+ },
55
65
  fritzdect: {
56
66
  Selektor: 'fritzdect.*.present',
57
67
  adapterID: 'fritzdect',
package/main.js CHANGED
@@ -30,6 +30,7 @@ class DeviceWatcher extends utils.Adapter {
30
30
  this.batteryLowPowered = [];
31
31
  this.listAllDevices = [];
32
32
  this.blacklistLists = [];
33
+ this.blacklistAdapterLists = [];
33
34
  this.blacklistNotify = [];
34
35
  this.arrDev = [];
35
36
  this.adapterSelected = [];
@@ -78,6 +79,7 @@ class DeviceWatcher extends utils.Adapter {
78
79
  deconz: this.config.deconzDevices,
79
80
  enocean: this.config.enoceanDevices,
80
81
  esphome: this.config.esphomeDevices,
82
+ eusec: this.config.eusecDevices,
81
83
  fritzdect: this.config.fritzdectDevices,
82
84
  fullybrowser: this.config.fullybrowserDevices,
83
85
  ham: this.config.hamDevices,
@@ -126,6 +128,7 @@ class DeviceWatcher extends utils.Adapter {
126
128
  deconz: this.config.deconzMaxMinutes,
127
129
  enocean: this.config.enoceanMaxMinutes,
128
130
  esphome: this.config.esphomeMaxMinutes,
131
+ eusec: this.config.eusecMaxMinutes,
129
132
  fritzdect: this.config.fritzdectMaxMinutes,
130
133
  fullybrowser: this.config.fullybrowserMaxMinutes,
131
134
  ham: this.config.hamMaxMinutes,
@@ -318,7 +321,7 @@ class DeviceWatcher extends utils.Adapter {
318
321
  device.SignalStrength = contactData[2];
319
322
  }
320
323
 
321
- if (device.Status && oldStatus !== device.Status && this.config.checkSendOfflineMsg && !this.blacklistNotify.includes(device.Path)) {
324
+ if (this.config.checkSendOfflineMsg && oldStatus !== device.Status && !this.blacklistNotify.includes(device.Path)) {
322
325
  await this.sendOfflineNotifications(device.Device, device.Adapter, device.Status, device.LastContact);
323
326
  }
324
327
  break;
@@ -341,7 +344,7 @@ class DeviceWatcher extends utils.Adapter {
341
344
  try {
342
345
  result = this.listAllDevicesRaw;
343
346
  for (const element in result) {
344
- const label = 'Device: ' + result[element].Device + ' - Adapter: ' + result[element].Adapter;
347
+ const label = `${result[element].Adapter}: ${result[element].Device}`;
345
348
  const myValueObject = {
346
349
  deviceName: result[element].Device,
347
350
  adapter: result[element].Adapter,
@@ -350,7 +353,13 @@ class DeviceWatcher extends utils.Adapter {
350
353
  devices[myCount] = { label: label, value: JSON.stringify(myValueObject) };
351
354
  myCount++;
352
355
  }
353
- this.sendTo(obj.from, obj.command, devices, obj.callback);
356
+ const sortDevices = devices.slice(0);
357
+ sortDevices.sort(function (a, b) {
358
+ const x = a.label;
359
+ const y = b.label;
360
+ return x < y ? -1 : x > y ? 1 : 0;
361
+ });
362
+ this.sendTo(obj.from, obj.command, sortDevices, obj.callback);
354
363
  } catch (error) {
355
364
  this.sendTo(obj.from, obj.command, obj.callback);
356
365
  }
@@ -490,6 +499,9 @@ class DeviceWatcher extends utils.Adapter {
490
499
  if (myBlacklist[i].checkIgnorLists) {
491
500
  this.blacklistLists.push(blacklistParse.path);
492
501
  }
502
+ if (myBlacklist[i].checkIgnorAdapterLists) {
503
+ this.blacklistAdapterLists.push(blacklistParse.path);
504
+ }
493
505
  // push devices in list to ignor device in notifications
494
506
  if (myBlacklist[i].checkIgnorNotify) {
495
507
  this.blacklistNotify.push(blacklistParse.path);
@@ -500,6 +512,7 @@ class DeviceWatcher extends utils.Adapter {
500
512
  }
501
513
 
502
514
  if (this.blacklistLists.length >= 1) this.log.info(`Found items on blacklist for lists: ${this.blacklistLists}`);
515
+ if (this.blacklistAdapterLists.length >= 1) this.log.info(`Found items on blacklist for lists: ${this.blacklistAdapterLists}`);
503
516
  if (this.blacklistNotify.length >= 1) this.log.info(`Found items on blacklist for notificatioons: ${this.blacklistNotify}`);
504
517
  } else {
505
518
  return; // cancel run if unloaded was called.
@@ -526,15 +539,23 @@ class DeviceWatcher extends utils.Adapter {
526
539
  let folderName;
527
540
  let deviceID;
528
541
 
529
- // Get ID with currDeviceString from datapoint
530
542
  switch (this.arrDev[i].adapterID) {
531
- // Get ID for Switchbot and ESPHome Devices
543
+ // Get ID with currDeviceString from datapoint
532
544
  case 'switchbotBle':
533
545
  case 'esphome':
534
546
  case 'apcups':
535
547
  deviceName = await this.getInitValue(currDeviceString + this.arrDev[i].id);
536
548
  break;
537
549
 
550
+ case 'eusec':
551
+ deviceName = await this.getInitValue(currDeviceString + this.arrDev[i].id);
552
+ if (deviceName === null || deviceName === undefined) {
553
+ if (deviceObject && typeof deviceObject === 'object') {
554
+ deviceName = deviceObject.common.name;
555
+ }
556
+ }
557
+ break;
558
+
538
559
  case 'fullybrowser':
539
560
  deviceName = (await this.getInitValue(currDeviceString + this.arrDev[i].id)) + ' ' + (await this.getInitValue(currDeviceString + this.arrDev[i].id2));
540
561
  break;
@@ -717,7 +738,7 @@ class DeviceWatcher extends utils.Adapter {
717
738
  }
718
739
 
719
740
  /**
720
- *set low bat indicator
741
+ * set low bat indicator
721
742
  * @param {object} deviceBatteryState
722
743
  * @param {object} deviceLowBatState
723
744
  * @param {object} isLowBatDP
@@ -1181,78 +1202,35 @@ class DeviceWatcher extends utils.Adapter {
1181
1202
  }
1182
1203
 
1183
1204
  for (const device of this.listAllDevicesRaw) {
1184
- if (device.adapterID.includes(adptName)) {
1185
- /*---------- fill raw lists ----------*/
1186
- // low bat list
1187
- if (device.LowBat && device.Status !== 'Offline') {
1188
- this.batteryLowPoweredRaw.push({
1189
- Path: device.Path,
1190
- Device: device.Device,
1191
- Adapter: device.Adapter,
1192
- Battery: device.Battery,
1193
- });
1194
- }
1195
- // offline raw list
1196
- if (device.Status === 'Offline') {
1197
- this.offlineDevicesRaw.push({
1198
- Path: device.Path,
1199
- Device: device.Device,
1200
- Adapter: device.Adapter,
1201
- 'Last contact': device.LastContact,
1202
- });
1203
- }
1204
-
1205
- /*---------- fill user lists ----------*/
1206
- if (!this.blacklistLists.includes(device.Path)) {
1207
- this.listAllDevices.push({
1208
- Device: device.Device,
1209
- Adapter: device.Adapter,
1210
- Battery: device.Battery,
1211
- 'Signal strength': device.SignalStrength,
1212
- 'Last contact': device.LastContact,
1213
- Status: device.Status,
1214
- });
1215
- // LinkQuality lists
1216
- if (device.SignalStrength != ' - ') {
1217
- this.linkQualityDevices.push({
1218
- Device: device.Device,
1219
- Adapter: device.Adapter,
1220
- 'Signal strength': device.SignalStrength,
1221
- });
1222
- }
1223
- // Battery lists
1224
- if (device['isBatteryDevice']) {
1225
- this.batteryPowered.push({
1226
- Device: device.Device,
1227
- Adapter: device.Adapter,
1228
- Battery: device.Battery,
1229
- Status: device.Status,
1230
- });
1231
- }
1232
- // Low Bat lists
1233
- if (device.LowBat && device.Status !== 'Offline') {
1234
- this.batteryLowPowered.push({
1235
- Device: device.Device,
1236
- Adapter: device.Adapter,
1237
- Battery: device.Battery,
1238
- });
1239
- }
1205
+ /*---------- fill raw lists ----------*/
1206
+ // low bat list
1207
+ if (device.LowBat && device.Status !== 'Offline') {
1208
+ this.batteryLowPoweredRaw.push({
1209
+ Path: device.Path,
1210
+ Device: device.Device,
1211
+ Adapter: device.Adapter,
1212
+ Battery: device.Battery,
1213
+ });
1214
+ }
1215
+ // offline raw list
1216
+ if (device.Status === 'Offline') {
1217
+ this.offlineDevicesRaw.push({
1218
+ Path: device.Path,
1219
+ Device: device.Device,
1220
+ Adapter: device.Adapter,
1221
+ LastContact: device.LastContact,
1222
+ });
1223
+ }
1240
1224
 
1241
- // Offline List
1242
- if (device.Status === 'Offline') {
1243
- this.offlineDevices.push({
1244
- Device: device.Device,
1245
- Adapter: device.Adapter,
1246
- 'Last contact': device.LastContact,
1247
- });
1248
- }
1225
+ if (adptName === '' && !this.blacklistLists.includes(device.Path)) {
1226
+ await this.theLists(device);
1227
+ }
1249
1228
 
1250
- // Device update List
1251
- if (device.Upgradable) {
1252
- this.upgradableList.push({
1253
- Device: device.Device,
1254
- Adapter: device.Adapter,
1255
- });
1229
+ if (this.config.createOwnFolder && adptName !== '') {
1230
+ if (device.adapterID.includes(adptName)) {
1231
+ /*---------- fill user lists for each adapter ----------*/
1232
+ if (!this.blacklistAdapterLists.includes(device.Path)) {
1233
+ await this.theLists(device);
1256
1234
  }
1257
1235
  }
1258
1236
  }
@@ -1260,6 +1238,67 @@ class DeviceWatcher extends utils.Adapter {
1260
1238
  await this.countDevices();
1261
1239
  }
1262
1240
 
1241
+ /**
1242
+ * fill the lists for user
1243
+ * @param {object} device
1244
+ */
1245
+ async theLists(device) {
1246
+ // List with all devices
1247
+ this.listAllDevices.push({
1248
+ Device: device.Device,
1249
+ Adapter: device.Adapter,
1250
+ Battery: device.Battery,
1251
+ 'Signal strength': device.SignalStrength,
1252
+ 'Last contact': device.LastContact,
1253
+ Status: device.Status,
1254
+ });
1255
+
1256
+ // LinkQuality lists
1257
+ if (device.SignalStrength != ' - ') {
1258
+ this.linkQualityDevices.push({
1259
+ Device: device.Device,
1260
+ Adapter: device.Adapter,
1261
+ 'Signal strength': device.SignalStrength,
1262
+ });
1263
+ }
1264
+
1265
+ // Battery lists
1266
+ if (device['isBatteryDevice']) {
1267
+ this.batteryPowered.push({
1268
+ Device: device.Device,
1269
+ Adapter: device.Adapter,
1270
+ Battery: device.Battery,
1271
+ Status: device.Status,
1272
+ });
1273
+ }
1274
+
1275
+ // Low Bat lists
1276
+ if (device.LowBat && device.Status !== 'Offline') {
1277
+ this.batteryLowPowered.push({
1278
+ Device: device.Device,
1279
+ Adapter: device.Adapter,
1280
+ Battery: device.Battery,
1281
+ });
1282
+ }
1283
+
1284
+ // Offline List
1285
+ if (device.Status === 'Offline') {
1286
+ this.offlineDevices.push({
1287
+ Device: device.Device,
1288
+ Adapter: device.Adapter,
1289
+ 'Last contact': device.LastContact,
1290
+ });
1291
+ }
1292
+
1293
+ // Device update List
1294
+ if (device.Upgradable) {
1295
+ this.upgradableList.push({
1296
+ Device: device.Device,
1297
+ Adapter: device.Adapter,
1298
+ });
1299
+ }
1300
+ }
1301
+
1263
1302
  /**
1264
1303
  * Count devices for each type
1265
1304
  */
@@ -1744,18 +1783,21 @@ class DeviceWatcher extends utils.Adapter {
1744
1783
  dpSubFolder = '';
1745
1784
  }
1746
1785
 
1786
+ // Write Datapoints for counts
1747
1787
  await this.setStateAsync(`${dpSubFolder}offlineCount`, { val: this.offlineDevicesCount, ack: true });
1748
1788
  await this.setStateAsync(`${dpSubFolder}countAll`, { val: this.deviceCounter, ack: true });
1749
1789
  await this.setStateAsync(`${dpSubFolder}batteryCount`, { val: this.batteryPoweredCount, ack: true });
1750
1790
  await this.setStateAsync(`${dpSubFolder}lowBatteryCount`, { val: this.lowBatteryPoweredCount, ack: true });
1751
1791
  await this.setStateAsync(`${dpSubFolder}upgradableCount`, { val: this.upgradableDevicesCount, ack: true });
1752
1792
 
1793
+ // List all devices
1753
1794
  if (this.deviceCounter === 0) {
1754
1795
  // if no device is count, write the JSON List with default value
1755
1796
  this.listAllDevices = [{ Device: '--none--', Adapter: '', Battery: '', 'Last contact': '', 'Signal strength': '' }];
1756
1797
  }
1757
1798
  await this.setStateAsync(`${dpSubFolder}listAll`, { val: JSON.stringify(this.listAllDevices), ack: true });
1758
1799
 
1800
+ // List link quality
1759
1801
  if (this.linkQualityCount === 0) {
1760
1802
  // if no device is count, write the JSON List with default value
1761
1803
  this.linkQualityDevices = [{ Device: '--none--', Adapter: '', 'Signal strength': '' }];
@@ -1766,6 +1808,7 @@ class DeviceWatcher extends utils.Adapter {
1766
1808
  ack: true,
1767
1809
  });
1768
1810
 
1811
+ // List offline devices
1769
1812
  if (this.offlineDevicesCount === 0) {
1770
1813
  // if no device is count, write the JSON List with default value
1771
1814
  this.offlineDevices = [{ Device: '--none--', Adapter: '', 'Last contact': '' }];
@@ -1776,6 +1819,7 @@ class DeviceWatcher extends utils.Adapter {
1776
1819
  ack: true,
1777
1820
  });
1778
1821
 
1822
+ // List updatable
1779
1823
  if (this.upgradableDevicesCount === 0) {
1780
1824
  // if no device is count, write the JSON List with default value
1781
1825
  this.upgradableList = [{ Device: '--none--', Adapter: '', 'Last contact': '' }];
@@ -1786,6 +1830,7 @@ class DeviceWatcher extends utils.Adapter {
1786
1830
  ack: true,
1787
1831
  });
1788
1832
 
1833
+ // List battery powered
1789
1834
  if (this.batteryPoweredCount === 0) {
1790
1835
  // if no device is count, write the JSON List with default value
1791
1836
  this.batteryPowered = [{ Device: '--none--', Adapter: '', Battery: '' }];
@@ -1796,6 +1841,7 @@ class DeviceWatcher extends utils.Adapter {
1796
1841
  ack: true,
1797
1842
  });
1798
1843
 
1844
+ // list battery low powered
1799
1845
  if (this.lowBatteryPoweredCount === 0) {
1800
1846
  // if no device is count, write the JSON List with default value
1801
1847
  this.batteryLowPowered = [{ Device: '--none--', Adapter: '', Battery: '' }];
@@ -1806,6 +1852,43 @@ class DeviceWatcher extends utils.Adapter {
1806
1852
  ack: true,
1807
1853
  });
1808
1854
 
1855
+ // set booleans datapoints
1856
+ if (this.offlineDevicesCount === 0) {
1857
+ await this.setStateAsync(`${dpSubFolder}oneDeviceOffline`, {
1858
+ val: false,
1859
+ ack: true,
1860
+ });
1861
+ } else {
1862
+ await this.setStateAsync(`${dpSubFolder}oneDeviceOffline`, {
1863
+ val: true,
1864
+ ack: true,
1865
+ });
1866
+ }
1867
+
1868
+ if (this.lowBatteryPoweredCount === 0) {
1869
+ await this.setStateAsync(`${dpSubFolder}oneDeviceLowBat`, {
1870
+ val: false,
1871
+ ack: true,
1872
+ });
1873
+ } else {
1874
+ await this.setStateAsync(`${dpSubFolder}oneDeviceLowBat`, {
1875
+ val: true,
1876
+ ack: true,
1877
+ });
1878
+ }
1879
+
1880
+ if (this.upgradableDevicesCount === 0) {
1881
+ await this.setStateAsync(`${dpSubFolder}oneDeviceUpdatable`, {
1882
+ val: false,
1883
+ ack: true,
1884
+ });
1885
+ } else {
1886
+ await this.setStateAsync(`${dpSubFolder}oneDeviceUpdatable`, {
1887
+ val: true,
1888
+ ack: true,
1889
+ });
1890
+ }
1891
+
1809
1892
  //write HTML list
1810
1893
  if (this.createHtmlList) {
1811
1894
  await this.setStateAsync(`${dpSubFolder}linkQualityListHTML`, {
@@ -1863,7 +1946,7 @@ class DeviceWatcher extends utils.Adapter {
1863
1946
  html += `<tr>
1864
1947
  <td><font>${device.Device}</font></td>
1865
1948
  <td align=center><font>${device.Adapter}</font></td>
1866
- <td align=right><font>${device.SignalStrength}</font></td>
1949
+ <td align=right><font>${device['Signal strength']}</font></td>
1867
1950
  </tr>`;
1868
1951
  }
1869
1952
 
@@ -1899,7 +1982,7 @@ class DeviceWatcher extends utils.Adapter {
1899
1982
  html += `<tr>
1900
1983
  <td><font>${device.Device}</font></td>
1901
1984
  <td align=center><font>${device.Adapter}</font></td>
1902
- <td align=center><font color=orange>${device.LastContact}</font></td>
1985
+ <td align=center><font color=orange>${device['Last contact']}</font></td>
1903
1986
  </tr>`;
1904
1987
  }
1905
1988
 
@@ -2007,6 +2090,31 @@ class DeviceWatcher extends utils.Adapter {
2007
2090
  native: {},
2008
2091
  });
2009
2092
 
2093
+ await this.setObjectNotExistsAsync(`${adptName}.oneDeviceOffline`, {
2094
+ type: 'state',
2095
+ common: {
2096
+ name: {
2097
+ en: 'Is one device with offline',
2098
+ de: 'Ist ein Gerät mit Offline',
2099
+ ru: 'Это одно устройство с offline',
2100
+ pt: 'É um dispositivo com offline',
2101
+ nl: 'Is een apparaat met offline',
2102
+ fr: 'Est un appareil avec hors ligne',
2103
+ it: 'È un dispositivo con offline',
2104
+ es: 'Es un dispositivo sin conexión',
2105
+ pl: 'Jest to jeden urządzenie z offlinem',
2106
+ uk: 'Є один пристрій з автономним',
2107
+ 'zh-cn': '一处有线装置',
2108
+ },
2109
+ type: 'boolean',
2110
+ role: 'state',
2111
+ read: true,
2112
+ write: false,
2113
+ def: false,
2114
+ },
2115
+ native: {},
2116
+ });
2117
+
2010
2118
  await this.setObjectNotExistsAsync(`${adptName}.listAll`, {
2011
2119
  type: 'state',
2012
2120
  common: {
@@ -2145,6 +2253,31 @@ class DeviceWatcher extends utils.Adapter {
2145
2253
  native: {},
2146
2254
  });
2147
2255
 
2256
+ await this.setObjectNotExistsAsync(`${adptName}.oneDeviceLowBat`, {
2257
+ type: 'state',
2258
+ common: {
2259
+ name: {
2260
+ en: 'Is one device with low battery',
2261
+ de: 'Ist ein Gerät mit niedrigem Akku',
2262
+ ru: 'Один прибор с низкой батареей',
2263
+ pt: 'É um dispositivo com bateria baixa',
2264
+ nl: 'Is een apparaat met lage batterijen',
2265
+ fr: 'Est un appareil avec batterie basse',
2266
+ it: 'È un dispositivo con batteria bassa',
2267
+ es: 'Es un dispositivo con batería baja',
2268
+ pl: 'Jest to jeden urządzenie z niską baterią',
2269
+ uk: 'Є одним пристроєм з низьких акумуляторів',
2270
+ 'zh-cn': '低电池的装置',
2271
+ },
2272
+ type: 'boolean',
2273
+ role: 'state',
2274
+ read: true,
2275
+ write: false,
2276
+ def: false,
2277
+ },
2278
+ native: {},
2279
+ });
2280
+
2148
2281
  await this.setObjectNotExistsAsync(`${adptName}.batteryCount`, {
2149
2282
  type: 'state',
2150
2283
  common: {
@@ -2215,6 +2348,31 @@ class DeviceWatcher extends utils.Adapter {
2215
2348
  },
2216
2349
  native: {},
2217
2350
  });
2351
+
2352
+ await this.setObjectNotExistsAsync(`${adptName}.oneDeviceUpdatable`, {
2353
+ type: 'state',
2354
+ common: {
2355
+ name: {
2356
+ en: 'Is one device updatable',
2357
+ de: 'Ist ein Gerät aufnehmbar',
2358
+ ru: 'Одно устройство обновляется',
2359
+ pt: 'É um dispositivo updatable',
2360
+ nl: 'Is een apparaat updat',
2361
+ fr: "Est-ce qu'un appareil est indéfectible",
2362
+ it: 'È un dispositivo updatable',
2363
+ es: 'Es un dispositivo actualizado',
2364
+ pl: 'Jest to jedno urządzenie updatable',
2365
+ uk: 'Є одним пристроєм',
2366
+ 'zh-cn': '一台装置',
2367
+ },
2368
+ type: 'boolean',
2369
+ role: 'state',
2370
+ read: true,
2371
+ write: false,
2372
+ def: false,
2373
+ },
2374
+ native: {},
2375
+ });
2218
2376
  }
2219
2377
 
2220
2378
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.device-watcher",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "description": "Watchdog for devices",
5
5
  "author": {
6
6
  "name": "Christian Behrends",
@@ -33,23 +33,23 @@
33
33
  "@types/chai": "^4.3.4",
34
34
  "@types/chai-as-promised": "^7.1.5",
35
35
  "@types/mocha": "^10.0.1",
36
- "@types/node": "^18.11.10",
36
+ "@types/node": "^18.11.18",
37
37
  "@types/node-schedule": "^2.1.0",
38
38
  "@types/proxyquire": "^1.3.28",
39
39
  "@types/sinon": "^10.0.13",
40
40
  "@types/sinon-chai": "^3.2.9",
41
41
  "chai": "^4.3.7",
42
42
  "chai-as-promised": "^7.1.1",
43
- "eslint": "^8.28.0",
43
+ "eslint": "^8.31.0",
44
44
  "eslint-config-prettier": "^8.5.0",
45
45
  "eslint-plugin-prettier": "^4.2.1",
46
- "mocha": "^10.1.0",
46
+ "mocha": "^10.2.0",
47
47
  "node-schedule": "^2.1.0",
48
- "prettier": "^2.8.0",
48
+ "prettier": "^2.8.1",
49
49
  "proxyquire": "^2.1.3",
50
- "sinon": "^15.0.0",
50
+ "sinon": "^15.0.1",
51
51
  "sinon-chai": "^3.7.0",
52
- "typescript": "~4.9.3"
52
+ "typescript": "~4.9.4"
53
53
  },
54
54
  "main": "main.js",
55
55
  "files": [