homebridge-viessmann-vicare 2.0.71 → 2.0.73

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/SETUP-GUIDE.md CHANGED
@@ -1,8 +1,8 @@
1
- # Complete Setup Guide - v2.0.70
1
+ # Complete Setup Guide - v2.0.73
2
2
 
3
3
  ## Overview
4
4
 
5
- This guide will walk you through setting up the Viessmann ViCare plugin v2.0.70 for Homebridge, including all the advanced features like intelligent caching, rate limiting protection, comprehensive configuration options, **complete localization support with custom names**, **CSV history logging**, **HTML diagnostic reports**, **energy system monitoring** (PV, battery, wallbox), and **heating schedule awareness** with visual bands in the HTML report, and **heat pump (Wärmepumpe) support** with automatic device detection.
5
+ This guide will walk you through setting up the Viessmann ViCare plugin v2.0.73 for Homebridge, including all the advanced features like intelligent caching, rate limiting protection, comprehensive configuration options, **complete localization support with custom names**, **CSV history logging**, **HTML diagnostic reports**, **energy system monitoring** (PV, battery, wallbox), and **heating schedule awareness** with visual bands in the HTML report, and **heat pump (Wärmepumpe) support** with automatic device detection.
6
6
 
7
7
  ## Prerequisites
8
8
 
@@ -1228,6 +1228,19 @@ sudo systemctl restart homebridge
1228
1228
 
1229
1229
  ## Changelog
1230
1230
 
1231
+ ### v2.0.73 (2026-06-23)
1232
+ - fix: report server timeout default was 300 s instead of 600 s; clamp raised to 3600 s max (was 1800 s)
1233
+ - fix: platform.ts timeout fallback corrected from 300 s to 600 s
1234
+
1235
+ ### v2.0.72 (2026-06-23)
1236
+ - fix: `readApiStatus` function missing from report server — caused crash on every `GET /` request
1237
+ - chore: axios updated to `^1.17.0`
1238
+
1239
+ ### v2.0.71 (2026-05-30)
1240
+ - feat: API usage dashboard in report server UI (daily usage bar, health score, rate limit status)
1241
+ - feat: `writeApiStatusFile` in platform writes `viessmann-api-status.json` after each update cycle
1242
+ - fix: report generation timeout default raised to 600 s, configurable up to 3600 s
1243
+
1231
1244
  ### v2.0.70 (2026-05-29)
1232
1245
  - feat: TRV/room sensor discovery mode (enableRoomSensorDiscovery flag)
1233
1246
  - feat: report generation timeout configurable (reportServerTimeout, 60–1800 s)
package/dist/platform.js CHANGED
@@ -118,7 +118,7 @@ class ViessmannPlatform {
118
118
  }
119
119
  }
120
120
  }
121
- const reportTimeout = this.config.reportServerTimeout ?? 300;
121
+ const reportTimeout = this.config.reportServerTimeout ?? 600;
122
122
  const serverArgs = ['--port', String(reportPort), '--path', reportServerPath, '--timeout', String(reportTimeout)];
123
123
  if (this.config.debug)
124
124
  serverArgs.push('--debug');
@@ -9,7 +9,7 @@ export declare const PLUGIN_NAME = "homebridge-viessmann-vicare";
9
9
  /**
10
10
  * Plugin version for User-Agent and logging
11
11
  */
12
- export declare const PLUGIN_VERSION = "2.0.71";
12
+ export declare const PLUGIN_VERSION = "2.0.73";
13
13
  /**
14
14
  * Default configuration values
15
15
  */
package/dist/settings.js CHANGED
@@ -12,7 +12,7 @@ exports.PLUGIN_NAME = 'homebridge-viessmann-vicare';
12
12
  /**
13
13
  * Plugin version for User-Agent and logging
14
14
  */
15
- exports.PLUGIN_VERSION = '2.0.71';
15
+ exports.PLUGIN_VERSION = '2.0.73';
16
16
  /**
17
17
  * Default configuration values
18
18
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-viessmann-vicare",
3
- "version": "2.0.71",
3
+ "version": "2.0.73",
4
4
  "description": "Complete Homebridge plugin for Viessmann ViCare heating systems with full control capabilities, advanced rate limiting protection, and intelligent cache management",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -39,7 +39,7 @@
39
39
  "homebridge": ">=1.8.0 || >=2.0.0-beta.0"
40
40
  },
41
41
  "dependencies": {
42
- "axios": "^1.13.5"
42
+ "axios": "^1.17.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^20.19.35",
@@ -32,7 +32,7 @@ const HB_PATH = getArg('--path', process.env.HB_PATH || '/var/lib/homebridge'
32
32
  const SCRIPT = getArg('--script', path.join(__dirname, 'viessmann-report.js'));
33
33
  const DEBUG = args.includes('--debug') || process.env.DEBUG_REPORT === '1';
34
34
  // --timeout <seconds> passed from plugin config (reportServerTimeout, default 300)
35
- const TIMEOUT_SEC = parseInt(getArg('--timeout', '300'), 10);
35
+ const TIMEOUT_SEC = parseInt(getArg('--timeout', '600'), 10);
36
36
 
37
37
  // ── Debug logger ───────────────────────────────────────────────────────────
38
38
  function dbg(...parts) {
@@ -79,6 +79,20 @@ function detectInstallations() {
79
79
  }
80
80
  }
81
81
 
82
+ function readApiStatus(hbPath) {
83
+ try {
84
+ const p = path.join(hbPath, 'viessmann-api-status.json');
85
+ if (!fs.existsSync(p)) return null;
86
+ const d = JSON.parse(fs.readFileSync(p, 'utf8'));
87
+ // Only show data younger than 30 minutes
88
+ if (Date.now() - new Date(d.timestamp).getTime() > 30 * 60 * 1000) return null;
89
+ return d;
90
+ } catch (e) {
91
+ dbg(`readApiStatus error: ${e.message}`);
92
+ return null;
93
+ }
94
+ }
95
+
82
96
  function numParam(val, def, min, max) {
83
97
  const n = parseFloat(val);
84
98
  if (isNaN(n)) return def;
@@ -95,7 +109,7 @@ function safeNum(val) {
95
109
  // CSV files (e.g. 90 days = ~26 000 rows). The default 60 s was insufficient.
96
110
  // Raised to 300 s (5 minutes) which comfortably handles the largest datasets.
97
111
 
98
- const REPORT_TIMEOUT_MS = Math.min(Math.max(TIMEOUT_SEC, 60), 1800) * 1000; // from --timeout arg (clamped 601800s)
112
+ const REPORT_TIMEOUT_MS = Math.min(Math.max(TIMEOUT_SEC, 120), 3600) * 1000; // from --timeout arg (clamped 1203600s)
99
113
 
100
114
  function generateReport(params) {
101
115
  return new Promise((resolve, reject) => {