iobroker.device-watcher 2.9.3 → 2.9.5

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/main.js CHANGED
@@ -109,6 +109,7 @@ class DeviceWatcher extends utils.Adapter {
109
109
  fhemTFAsensors: this.config.fhemTFAsensorsDevices,
110
110
  fritzdect: this.config.fritzdectDevices,
111
111
  fullybrowser: this.config.fullybrowserDevices,
112
+ fullybrowserV3: this.config.fullybrowserV3Devices,
112
113
  fullyMQTT: this.config.fullyMQTTDevices,
113
114
  ham: this.config.hamDevices,
114
115
  harmony: this.config.harmonyDevices,
@@ -152,7 +153,7 @@ class DeviceWatcher extends utils.Adapter {
152
153
  yeelight: this.config.yeelightDevices,
153
154
  zigbee: this.config.zigbeeDevices,
154
155
  zigbee2MQTT: this.config.zigbee2mqttDevices,
155
- zwave: this.config.zwaveDevices,
156
+ zwave2: this.config.zwaveDevices,
156
157
  };
157
158
 
158
159
  this.configMaxMinutes = {
@@ -167,6 +168,7 @@ class DeviceWatcher extends utils.Adapter {
167
168
  fhemTFAsensors: this.config.fhemTFAsensorsMaxMinutes,
168
169
  fritzdect: this.config.fritzdectMaxMinutes,
169
170
  fullybrowser: this.config.fullybrowserMaxMinutes,
171
+ fullybrowserV3: this.config.fullybrowserV3MaxMinutes,
170
172
  fullyMQTT: this.config.fullyMQTTMaxMinutes,
171
173
  ham: this.config.hamMaxMinutes,
172
174
  harmony: this.config.harmonyMaxMinutes,
@@ -210,7 +212,7 @@ class DeviceWatcher extends utils.Adapter {
210
212
  yeelight: this.config.yeelightMaxMinutes,
211
213
  zigbee: this.config.zigbeeMaxMinutes,
212
214
  zigbee2MQTT: this.config.zigbee2mqttMaxMinutes,
213
- zwave: this.config.zwaveMaxMinutes,
215
+ zwave2: this.config.zwaveMaxMinutes,
214
216
  };
215
217
 
216
218
  try {
@@ -936,6 +938,10 @@ class DeviceWatcher extends utils.Adapter {
936
938
  if (deviceLowBatState === undefined) {
937
939
  isLowBatDP = currDeviceString + this.selAdapter[i].isLowBat2;
938
940
  deviceLowBatState = await this.getInitValue(isLowBatDP);
941
+ if (deviceLowBatState === undefined) {
942
+ isLowBatDP = currDeviceString + this.selAdapter[i].isLowBat3;
943
+ deviceLowBatState = await this.getInitValue(isLowBatDP);
944
+ }
939
945
  }
940
946
  if (deviceLowBatState === undefined) isLowBatDP = 'none';
941
947
 
@@ -1098,6 +1104,7 @@ class DeviceWatcher extends utils.Adapter {
1098
1104
 
1099
1105
  switch (this.selAdapter[i].adapterID) {
1100
1106
  case 'fullybrowser':
1107
+ case 'fullybrowserV3':
1101
1108
  deviceName = (await this.getInitValue(currDeviceString + this.selAdapter[i].id)) + ' ' + (await this.getInitValue(currDeviceString + this.selAdapter[i].id2));
1102
1109
  break;
1103
1110
 
@@ -1110,14 +1117,14 @@ class DeviceWatcher extends utils.Adapter {
1110
1117
  case 'loqedSmartLock':
1111
1118
  case 'viessmann':
1112
1119
  case 'homekitController':
1113
- if (shortDeviceObject && typeof shortDeviceObject === 'object') {
1120
+ if (shortDeviceObject && typeof shortDeviceObject === 'object' && shortDeviceObject.common) {
1114
1121
  deviceName = shortDeviceObject.common.name;
1115
1122
  }
1116
1123
  break;
1117
1124
 
1118
1125
  // Get ID with short short currDeviceString from objectjson (HMiP Devices)
1119
1126
  case 'hmiP':
1120
- if (shortshortDeviceObject && typeof shortshortDeviceObject === 'object') {
1127
+ if (shortshortDeviceObject && typeof shortshortDeviceObject === 'object' && shortshortDeviceObject.common) {
1121
1128
  deviceName = shortshortDeviceObject.common.name;
1122
1129
  }
1123
1130
  break;
@@ -1137,7 +1144,7 @@ class DeviceWatcher extends utils.Adapter {
1137
1144
 
1138
1145
  // Format Device name
1139
1146
  case 'sureflap':
1140
- if (deviceObject && typeof deviceObject === 'object') {
1147
+ if (deviceObject && typeof deviceObject === 'object' && deviceObject.common) {
1141
1148
  deviceName = deviceObject.common.name
1142
1149
  // @ts-ignore FIXME: fix syntax error
1143
1150
  .replace(/'/g, '')
@@ -1157,7 +1164,7 @@ class DeviceWatcher extends utils.Adapter {
1157
1164
  default:
1158
1165
  if (this.selAdapter[i].id !== 'none' || this.selAdapter[i].id !== undefined) deviceName = await this.getInitValue(currDeviceString + this.selAdapter[i].id);
1159
1166
  if (deviceName === null || deviceName === undefined) {
1160
- if (deviceObject && typeof deviceObject === 'object') {
1167
+ if (deviceObject && typeof deviceObject === 'object' && deviceObject.common) {
1161
1168
  deviceName = deviceObject.common.name;
1162
1169
  }
1163
1170
  }
@@ -1325,7 +1332,7 @@ class DeviceWatcher extends utils.Adapter {
1325
1332
  if (deviceLowBatState !== undefined || faultReportState !== undefined) {
1326
1333
  switch (adapterID) {
1327
1334
  case 'hmrpc':
1328
- if (deviceLowBatState === 1 || faultReportState === 6) {
1335
+ if (deviceLowBatState === 1 || deviceLowBatState === true || faultReportState === 6) {
1329
1336
  lowBatIndicator = true;
1330
1337
  }
1331
1338
  break;
@@ -1454,7 +1461,8 @@ class DeviceWatcher extends utils.Adapter {
1454
1461
  case 'proxmox':
1455
1462
  if (this.configMaxMinutes[adapterID] <= 0) {
1456
1463
  if (deviceUnreachState !== 'running' && deviceUnreachState !== 'online') {
1457
- if (linkQuality !== ' - ') deviceState = 'Offline'; //set online state to offline
1464
+ deviceState = 'Offline'; //set online state to offline
1465
+ if (linkQuality !== ' - ') linkQuality = '0%'; // set linkQuality to nothing
1458
1466
  }
1459
1467
  } else if (lastDeviceUnreachStateChange > this.configMaxMinutes[adapterID] && deviceUnreachState !== 'running' && deviceUnreachState !== 'online') {
1460
1468
  deviceState = 'Offline'; //set online state to offline
@@ -2508,6 +2516,7 @@ class DeviceWatcher extends utils.Adapter {
2508
2516
  it: 'Adattatore e istanze',
2509
2517
  es: 'Adaptador e instalaciones',
2510
2518
  pl: 'Adapter and Instances',
2519
+ // @ts-ignore
2511
2520
  uk: 'Адаптер та інстанції',
2512
2521
  'zh-cn': '道歉和案',
2513
2522
  },
@@ -2529,6 +2538,7 @@ class DeviceWatcher extends utils.Adapter {
2529
2538
  it: 'JSON Elenco di tutte le istanze',
2530
2539
  es: 'JSON Lista de todos los casos',
2531
2540
  pl: 'JSON Lista wszystkich instancji',
2541
+ // @ts-ignore
2532
2542
  uk: 'Сонце Список всіх екземплярів',
2533
2543
  'zh-cn': '附 件 所有事例一览表',
2534
2544
  },
@@ -2552,6 +2562,7 @@ class DeviceWatcher extends utils.Adapter {
2552
2562
  it: 'Numero di tutte le istanze',
2553
2563
  es: 'Número de casos',
2554
2564
  pl: 'Liczba wszystkich instancji',
2565
+ // @ts-ignore
2555
2566
  uk: 'Кількість всіх екземплярів',
2556
2567
  'zh-cn': '各类案件数目',
2557
2568
  },
@@ -2576,6 +2587,7 @@ class DeviceWatcher extends utils.Adapter {
2576
2587
  it: 'JSON Elenco di tutte le istanze attive',
2577
2588
  es: 'JSON Lista de todos los casos activos',
2578
2589
  pl: 'JSON Lista wszystkich aktywnych instancji',
2590
+ // @ts-ignore
2579
2591
  uk: 'Сонце Список всіх активних екземплярів',
2580
2592
  'zh-cn': '附 件 所有积极事件清单',
2581
2593
  },
@@ -2599,6 +2611,7 @@ class DeviceWatcher extends utils.Adapter {
2599
2611
  it: 'Numero di tutte le istanze attive',
2600
2612
  es: 'Número de casos activos',
2601
2613
  pl: 'Liczba wszystkich czynnych przypadków',
2614
+ // @ts-ignore
2602
2615
  uk: 'Кількість всіх активних екземплярів',
2603
2616
  'zh-cn': '所有积极事件的数目',
2604
2617
  },
@@ -2622,6 +2635,7 @@ class DeviceWatcher extends utils.Adapter {
2622
2635
  it: 'JSON Elenco delle istanze disattivate',
2623
2636
  es: 'JSON Lista de casos desactivados',
2624
2637
  pl: 'JSON Lista przypadków deaktywowanych',
2638
+ // @ts-ignore
2625
2639
  uk: 'Сонце Перелік деактивованих екземплярів',
2626
2640
  'zh-cn': '附 件 被动事例清单',
2627
2641
  },
@@ -2645,6 +2659,7 @@ class DeviceWatcher extends utils.Adapter {
2645
2659
  it: 'Numero di istanze disattivate',
2646
2660
  es: 'Número de casos desactivados',
2647
2661
  pl: 'Liczba deaktywowanych instancji',
2662
+ // @ts-ignore
2648
2663
  uk: 'Кількість деактивованих екземплярів',
2649
2664
  'zh-cn': 'A. 递解事件的数目',
2650
2665
  },
@@ -2668,6 +2683,7 @@ class DeviceWatcher extends utils.Adapter {
2668
2683
  it: 'Elenco JSON delle istanze con errore',
2669
2684
  es: 'JSON lista de casos con error',
2670
2685
  pl: 'Lista błędów JSON',
2686
+ // @ts-ignore
2671
2687
  uk: 'JSON список екземплярів з помилкою',
2672
2688
  'zh-cn': '联合工作组办公室错误事件清单',
2673
2689
  },
@@ -2691,6 +2707,7 @@ class DeviceWatcher extends utils.Adapter {
2691
2707
  it: 'Conteggio di istanze con errore',
2692
2708
  es: 'Cuenta de casos con error',
2693
2709
  pl: 'Liczba przykładów w przypadku błędów',
2710
+ // @ts-ignore
2694
2711
  uk: 'Кількість екземплярів з помилкою',
2695
2712
  'zh-cn': '发生错误的情况',
2696
2713
  },
@@ -2716,6 +2733,7 @@ class DeviceWatcher extends utils.Adapter {
2716
2733
  it: 'Elenco di adattatori JSON con aggiornamenti disponibili',
2717
2734
  es: 'JSON lista de adaptadores con actualizaciones disponibles',
2718
2735
  pl: 'JSON lista adapterów z dostępnymi aktualizacjami',
2736
+ // @ts-ignore
2719
2737
  uk: 'JSON список адаптерів з доступними оновленнями',
2720
2738
  'zh-cn': '附录A',
2721
2739
  },
@@ -2739,6 +2757,7 @@ class DeviceWatcher extends utils.Adapter {
2739
2757
  it: 'Numero di adattatori con aggiornamenti disponibili',
2740
2758
  es: 'Número de adaptadores con actualizaciones disponibles',
2741
2759
  pl: 'Liczba adapterów z dostępną aktualizacją',
2760
+ // @ts-ignore
2742
2761
  uk: 'Кількість адаптерів з доступними оновленнями',
2743
2762
  'zh-cn': '更新的适应者人数',
2744
2763
  },
@@ -2968,7 +2987,7 @@ class DeviceWatcher extends utils.Adapter {
2968
2987
  let objectData;
2969
2988
  let list = '';
2970
2989
  let message = '';
2971
- const setMessage = async (message) => {
2990
+ const setMessage = async (/** @type {string} */ message) => {
2972
2991
  this.log.info(`${message}`);
2973
2992
  await this.setStateAsync('lastNotification', `${message}`, true);
2974
2993
  await this.sendNotification(`${message}`);
@@ -3667,6 +3686,7 @@ class DeviceWatcher extends utils.Adapter {
3667
3686
  it: 'È un dispositivo con offline',
3668
3687
  es: 'Es un dispositivo sin conexión',
3669
3688
  pl: 'Jest to jeden urządzenie z offlinem',
3689
+ // @ts-ignore
3670
3690
  uk: 'Є один пристрій з автономним',
3671
3691
  'zh-cn': '一处有线装置',
3672
3692
  },
@@ -3692,6 +3712,7 @@ class DeviceWatcher extends utils.Adapter {
3692
3712
  it: 'JSON RAW Elenco di tutti i dispositivi',
3693
3713
  es: 'JSON RAW Lista de todos los dispositivos',
3694
3714
  pl: 'JSON RAW Lista wszystkich urządzeń',
3715
+ // @ts-ignore
3695
3716
  uk: 'ДЖСОН РАВ Список всіх пристроїв',
3696
3717
  'zh-cn': 'JSONRAW 所有装置清单',
3697
3718
  },
@@ -3854,6 +3875,7 @@ class DeviceWatcher extends utils.Adapter {
3854
3875
  it: 'È un dispositivo con batteria bassa',
3855
3876
  es: 'Es un dispositivo con batería baja',
3856
3877
  pl: 'Jest to jeden urządzenie z niską baterią',
3878
+ // @ts-ignore
3857
3879
  uk: 'Є одним пристроєм з низьких акумуляторів',
3858
3880
  'zh-cn': '低电池的装置',
3859
3881
  },
@@ -3902,6 +3924,7 @@ class DeviceWatcher extends utils.Adapter {
3902
3924
  it: 'Numero di dispositivi con aggiornamenti disponibili',
3903
3925
  es: 'Número de dispositivos con actualizaciones disponibles',
3904
3926
  pl: 'Liczba urządzeń z dostępną aktualizacją',
3927
+ // @ts-ignore
3905
3928
  uk: 'Кількість пристроїв з доступними оновленнями',
3906
3929
  'zh-cn': '现有更新的装置数目',
3907
3930
  },
@@ -3926,6 +3949,7 @@ class DeviceWatcher extends utils.Adapter {
3926
3949
  it: 'JSON Elenco dei dispositivi con aggiornamenti disponibili',
3927
3950
  es: 'JSON Lista de dispositivos con actualizaciones disponibles',
3928
3951
  pl: 'JSON Lista urządzeń korzystających z aktualizacji',
3952
+ // @ts-ignore
3929
3953
  uk: 'Сонце Перелік пристроїв з доступними оновленнями',
3930
3954
  'zh-cn': '附 件 现有最新设备清单',
3931
3955
  },
@@ -3950,6 +3974,7 @@ class DeviceWatcher extends utils.Adapter {
3950
3974
  it: 'È un dispositivo updatable',
3951
3975
  es: 'Es un dispositivo actualizado',
3952
3976
  pl: 'Jest to jedno urządzenie updatable',
3977
+ // @ts-ignore
3953
3978
  uk: 'Є одним пристроєм',
3954
3979
  'zh-cn': '一台装置',
3955
3980
  },
@@ -4128,6 +4153,7 @@ class DeviceWatcher extends utils.Adapter {
4128
4153
  it: 'Elenchi HTML per adattatore e istanze',
4129
4154
  es: 'Listas HTML para adaptador y casos',
4130
4155
  pl: 'Listy HTML dla adaptera i instancji',
4156
+ // @ts-ignore
4131
4157
  uk: 'Списки HTML для адаптерів та екземплярів',
4132
4158
  'zh-cn': 'HTML名单',
4133
4159
  },
@@ -4147,6 +4173,7 @@ class DeviceWatcher extends utils.Adapter {
4147
4173
  it: 'HTML Elenco di tutte le istanze',
4148
4174
  es: 'HTML Lista de todos los casos',
4149
4175
  pl: 'HTML Lista wszystkich instancji',
4176
+ // @ts-ignore
4150
4177
  uk: 'Українська Список всіх екземплярів',
4151
4178
  'zh-cn': 'HTML 所有事例一览表',
4152
4179
  },
@@ -4171,6 +4198,7 @@ class DeviceWatcher extends utils.Adapter {
4171
4198
  it: 'HTML Elenco di tutte le istanze attive',
4172
4199
  es: 'HTML Lista de todos los casos activos',
4173
4200
  pl: 'HTML Lista wszystkich aktywnych instancji',
4201
+ // @ts-ignore
4174
4202
  uk: 'Українська Список всіх активних екземплярів',
4175
4203
  'zh-cn': 'HTML 所有积极事件清单',
4176
4204
  },
@@ -4195,6 +4223,7 @@ class DeviceWatcher extends utils.Adapter {
4195
4223
  it: 'HTML Elenco di tutte le istanze disattivate',
4196
4224
  es: 'HTML Lista de todos los casos desactivados',
4197
4225
  pl: 'HTML Lista wszystkich przypadków deaktywowanych',
4226
+ // @ts-ignore
4198
4227
  uk: 'Українська Список всіх деактивованих екземплярів',
4199
4228
  'zh-cn': 'HTML 所有违犯事件清单',
4200
4229
  },
@@ -4219,6 +4248,7 @@ class DeviceWatcher extends utils.Adapter {
4219
4248
  it: 'HTML Elenco delle istanze con errore',
4220
4249
  es: 'HTML Lista de casos con error',
4221
4250
  pl: 'HTML Lista przykładów z błądem',
4251
+ // @ts-ignore
4222
4252
  uk: 'Українська Список екземплярів з помилкою',
4223
4253
  'zh-cn': 'HTML 出现错误的情况清单',
4224
4254
  },
@@ -4242,6 +4272,7 @@ class DeviceWatcher extends utils.Adapter {
4242
4272
  it: 'Elenco HTML degli adattatori con aggiornamenti disponibili',
4243
4273
  es: 'Lista HTML de adaptadores con actualizaciones disponibles',
4244
4274
  pl: 'Lista adapterów HTML z dostępnymi aktualizacjami',
4275
+ // @ts-ignore
4245
4276
  uk: 'HTML список адаптерів з доступними оновленнями',
4246
4277
  'zh-cn': 'HTML 可供更新的适应者名单',
4247
4278
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.device-watcher",
3
- "version": "2.9.3",
3
+ "version": "2.9.5",
4
4
  "description": "Watchdog for devices",
5
5
  "author": {
6
6
  "name": "Christian Behrends",
@@ -21,37 +21,40 @@
21
21
  "type": "git",
22
22
  "url": "https://github.com/ciddi89/ioBroker.device-watcher"
23
23
  },
24
+ "engines": {
25
+ "node": ">= 16"
26
+ },
24
27
  "dependencies": {
25
- "@iobroker/adapter-core": "^2.6.8"
28
+ "@iobroker/adapter-core": "^3.0.4"
26
29
  },
27
30
  "devDependencies": {
28
- "@alcalzone/release-script": "^3.5.9",
29
- "@alcalzone/release-script-plugin-iobroker": "^3.5.9",
31
+ "@alcalzone/release-script": "^3.6.0",
32
+ "@alcalzone/release-script-plugin-iobroker": "^3.6.0",
30
33
  "@alcalzone/release-script-plugin-license": "^3.5.9",
31
34
  "@alcalzone/release-script-plugin-manual-review": "^3.5.9",
32
35
  "@iobroker/adapter-dev": "^1.2.0",
33
36
  "@iobroker/testing": "^4.1.0",
34
- "@types/chai": "^4.3.5",
35
- "@types/chai-as-promised": "^7.1.5",
36
- "@types/mocha": "^10.0.1",
37
- "@types/node": "^20.3.3",
38
- "@types/node-schedule": "^2.1.0",
39
- "@types/proxyquire": "^1.3.28",
40
- "@types/sinon": "^10.0.13",
41
- "@types/sinon-chai": "^3.2.9",
42
- "chai": "^4.3.7",
37
+ "@types/chai": "^4.3.9",
38
+ "@types/chai-as-promised": "^7.1.7",
39
+ "@types/mocha": "^10.0.3",
40
+ "@types/node": "^20.8.10",
41
+ "@types/node-schedule": "^2.1.2",
42
+ "@types/proxyquire": "^1.3.30",
43
+ "@types/sinon": "^10.0.16",
44
+ "@types/sinon-chai": "^3.2.11",
45
+ "chai": "^4.3.10",
43
46
  "chai-as-promised": "^7.1.1",
44
- "cron-parser": "^4.8.1",
45
- "eslint": "^8.44.0",
46
- "eslint-config-prettier": "^8.8.0",
47
- "eslint-plugin-prettier": "^4.2.1",
47
+ "cron-parser": "^4.9.0",
48
+ "eslint": "^8.52.0",
49
+ "eslint-config-prettier": "^9.0.0",
50
+ "eslint-plugin-prettier": "^5.0.1",
48
51
  "mocha": "^10.2.0",
49
52
  "node-schedule": "^2.1.1",
50
- "prettier": "^2.8.8",
53
+ "prettier": "^3.0.3",
51
54
  "proxyquire": "^2.1.3",
52
- "sinon": "^15.2.0",
55
+ "sinon": "^17.0.0",
53
56
  "sinon-chai": "^3.7.0",
54
- "typescript": "~5.1.6"
57
+ "typescript": "~5.2.2"
55
58
  },
56
59
  "main": "main.js",
57
60
  "files": [