iobroker.device-watcher 2.12.1 → 2.12.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/lib/arrApart.js CHANGED
@@ -69,7 +69,7 @@ const arrApart = {
69
69
  },
70
70
  ecovacsdeebot: {
71
71
  Selektor: 'ecovacs-deebot.*.connection',
72
- timeSelector: '.connection',
72
+ timeSelector: '.connectionUptime',
73
73
  adapterID: 'ecovacsdeebot',
74
74
  adapter: 'Ecovacs-Deebot',
75
75
  rssiState: '.network.wifiSignal',
@@ -612,6 +612,16 @@ const arrApart = {
612
612
  isLowBat: 'none',
613
613
  id: 'none',
614
614
  },
615
+ xsense: {
616
+ Selektor: 'xsense.*.online',
617
+ timeSelector: '.online',
618
+ adapterID: 'xsense',
619
+ adapter: 'XSense',
620
+ battery: '.batInfo',
621
+ reach: '.online',
622
+ isLowBat: '.batInfo',
623
+ id: 'none',
624
+ },
615
625
  yeelight: {
616
626
  Selektor: 'yeelight-2.*.connect',
617
627
  timeSelector: '.connect',
@@ -389,7 +389,7 @@ const translations = {
389
389
  },
390
390
  Instance_Watchdog: {
391
391
  en: 'Instance Watchdog',
392
- de: 'Instanz-Wachdog',
392
+ de: 'Instanz-Watchdog',
393
393
  ru: 'Слежение за экземпляром',
394
394
  pt: 'Watchdog de Instância',
395
395
  nl: 'Instance-Wachdog',
package/main.js CHANGED
@@ -167,6 +167,7 @@ class DeviceWatcher extends utils.Adapter {
167
167
  viessmann: this.config.viessmannDevices,
168
168
  wifilight: this.config.wifilightDevices,
169
169
  wled: this.config.wledDevices,
170
+ xsense: this.config.xsenseDevices,
170
171
  yeelight: this.config.yeelightDevices,
171
172
  zigbee: this.config.zigbeeDevices,
172
173
  zigbee2MQTT: this.config.zigbee2mqttDevices,
@@ -229,6 +230,7 @@ class DeviceWatcher extends utils.Adapter {
229
230
  viessmann: this.config.viessmannMaxMinutes,
230
231
  wifilight: this.config.wifilightMaxMinutes,
231
232
  wled: this.config.wledMaxMinutes,
233
+ xsense: this.config.xsenseMaxMinutes,
232
234
  yeelight: this.config.yeelightMaxMinutes,
233
235
  zigbee: this.config.zigbeeMaxMinutes,
234
236
  zigbee2MQTT: this.config.zigbee2mqttMaxMinutes,
@@ -1161,6 +1163,29 @@ class DeviceWatcher extends utils.Adapter {
1161
1163
  isBatteryDevice = true;
1162
1164
  }
1163
1165
  break;
1166
+ case 'xsense':
1167
+ if (deviceBatteryState === undefined) {
1168
+ // do nothin brdge has no battery
1169
+ isBatteryDevice = false;
1170
+ } else if (deviceBatteryState >= 0) {
1171
+ batteryHealthRaw = deviceBatteryState;
1172
+ batteryHealthUnitRaw = '';
1173
+ isBatteryDevice = true;
1174
+ switch (batteryHealthRaw) {
1175
+ case 1:
1176
+ batteryHealth = 'low';
1177
+ break;
1178
+ case 2:
1179
+ batteryHealth = 'medium';
1180
+ break;
1181
+ case 3:
1182
+ batteryHealth = 'ok';
1183
+ break;
1184
+ default:
1185
+ batteryHealth = 'error';
1186
+ }
1187
+ }
1188
+ break;
1164
1189
  default:
1165
1190
  if (deviceBatteryState === undefined) {
1166
1191
  if (deviceLowBatState !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.device-watcher",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Watchdog for devices",
5
5
  "author": {
6
6
  "name": "Christian Behrends",
@@ -25,38 +25,38 @@
25
25
  "node": ">=18"
26
26
  },
27
27
  "dependencies": {
28
- "@iobroker/adapter-core": "^3.1.4"
28
+ "@iobroker/adapter-core": "^3.2.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@alcalzone/release-script": "^3.7.0",
32
- "@alcalzone/release-script-plugin-iobroker": "^3.7.0",
31
+ "@alcalzone/release-script": "^3.8.0",
32
+ "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
33
33
  "@alcalzone/release-script-plugin-license": "^3.7.0",
34
34
  "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
35
- "@iobroker/adapter-dev": "^1.3.0",
36
- "@iobroker/testing": "^4.1.3",
37
- "@types/chai": "^4.3.11",
38
- "@types/chai-as-promised": "^7.1.8",
39
- "@types/mocha": "^10.0.6",
40
- "@types/node": "^20.12.8",
35
+ "@iobroker/adapter-dev": "^1.4.0",
36
+ "@iobroker/testing": "^5.0.4",
37
+ "@types/chai": "^5.0.1",
38
+ "@types/chai-as-promised": "^8.0.1",
39
+ "@types/mocha": "^10.0.10",
40
+ "@types/node": "^22.15.29",
41
41
  "@types/node-schedule": "^2.1.7",
42
42
  "@types/proxyquire": "^1.3.31",
43
43
  "@types/sinon": "^17.0.3",
44
- "@types/sinon-chai": "^3.2.12",
45
- "@typescript-eslint/eslint-plugin": "^7.8.0",
46
- "@typescript-eslint/parser": "^7.8.0",
47
- "chai": "^4.4.1",
48
- "chai-as-promised": "^7.1.1",
44
+ "@types/sinon-chai": "^4.0.0",
45
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
46
+ "@typescript-eslint/parser": "^7.18.0",
47
+ "chai": "^4.5.0",
48
+ "chai-as-promised": "^7.1.2",
49
49
  "cron-parser": "^4.9.0",
50
- "eslint": "^8.57.0",
51
- "eslint-config-prettier": "^9.1.0",
52
- "eslint-plugin-prettier": "^5.1.3",
53
- "mocha": "^10.4.0",
50
+ "eslint": "^8.57.1",
51
+ "eslint-config-prettier": "^10.1.5",
52
+ "eslint-plugin-prettier": "^5.5.3",
53
+ "mocha": "^10.8.2",
54
54
  "node-schedule": "^2.1.1",
55
- "prettier": "^3.2.5",
55
+ "prettier": "^3.6.2",
56
56
  "proxyquire": "^2.1.3",
57
57
  "sinon": "^17.0.1",
58
58
  "sinon-chai": "^3.7.0",
59
- "typescript": "~5.4.5"
59
+ "typescript": "~5.8.3"
60
60
  },
61
61
  "main": "main.js",
62
62
  "files": [