homebridge-viessmann-vicare 2.0.75 β 2.0.76
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/CHANGELOG.md +3 -0
- package/README.md +3 -0
- package/SETUP-GUIDE.md +5 -2
- package/dist/platform.d.ts +6 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +68 -8
- package/dist/settings.d.ts +1 -1
- package/dist/settings.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
All notable changes to homebridge-viessmann-vicare.
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
### [2.0.76] - 2026-09-26
|
|
7
|
+
- fix: report web server (`reportServerPort`) could stop silently: it was started with `execFile`, which buffers the child output (1 MB max) and kills it when the buffer is full, especially with `debug: true`. It could also fail with the port still held by an orphan process after a restart. The server now runs as a supervised child process: output goes to the Homebridge log, errors and exits are logged, it restarts automatically with back-off (max 5 attempts) and it is stopped when Homebridge shuts down
|
|
8
|
+
|
|
6
9
|
### [2.0.75] - 2026-09-26
|
|
7
10
|
- fix: history values equal to **0** were written as empty/NULL (`value || undefined`): daily/monthly gas, heat production and outside temperature of 0 now stored correctly (e.g. heating gas in summer)
|
|
8
11
|
- fix: burner update statistics counted debounced updates as attempts (success rate shown ~50%): now only processed updates are counted
|
package/README.md
CHANGED
|
@@ -1095,6 +1095,9 @@ For issues and questions:
|
|
|
1095
1095
|
|
|
1096
1096
|
## π Changelog
|
|
1097
1097
|
|
|
1098
|
+
### [2.0.76] - 2026-09-26
|
|
1099
|
+
- fix: report web server (`reportServerPort`) could stop silently: it was started with `execFile`, which buffers the child output (1 MB max) and kills it when the buffer is full, especially with `debug: true`. It could also fail with the port still held by an orphan process after a restart. The server now runs as a supervised child process: output goes to the Homebridge log, errors and exits are logged, it restarts automatically with back-off (max 5 attempts) and it is stopped when Homebridge shuts down
|
|
1100
|
+
|
|
1098
1101
|
### [2.0.75] - 2026-09-26
|
|
1099
1102
|
- fix: history values equal to **0** were written as empty/NULL (`value || undefined`): daily/monthly gas, heat production and outside temperature of 0 now stored correctly (e.g. heating gas in summer)
|
|
1100
1103
|
- fix: burner update statistics counted debounced updates as attempts (success rate shown ~50%): now only processed updates are counted
|
package/SETUP-GUIDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Complete Setup Guide - v2.0.
|
|
1
|
+
# Complete Setup Guide - v2.0.76
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
This guide will walk you through setting up the Viessmann ViCare plugin v2.0.
|
|
5
|
+
This guide will walk you through setting up the Viessmann ViCare plugin v2.0.76 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
|
|
|
@@ -1281,6 +1281,9 @@ sudo systemctl restart homebridge
|
|
|
1281
1281
|
|
|
1282
1282
|
## Changelog
|
|
1283
1283
|
|
|
1284
|
+
### v2.0.76 (2026-09-26)
|
|
1285
|
+
- fix: report web server supervised (no more silent stop / "Load failed"): logs, automatic restart, clean stop on shutdown
|
|
1286
|
+
|
|
1284
1287
|
### v2.0.75 (2026-09-26)
|
|
1285
1288
|
- fix: zero values (gas, heat, outside temperature) no longer stored as empty/NULL in CSV and MySQL
|
|
1286
1289
|
- fix: burner update success rate, api-status plugin version, daily reference at local midnight
|
package/dist/platform.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export declare class ViessmannPlatform implements DynamicPlatformPlugin {
|
|
|
15
15
|
private installations;
|
|
16
16
|
private refreshTimer?;
|
|
17
17
|
private healthMonitoringTimer?;
|
|
18
|
+
private reportServerChild?;
|
|
19
|
+
private reportServerRestarts;
|
|
20
|
+
private reportServerStopping;
|
|
21
|
+
private reportServerRestartTimer?;
|
|
18
22
|
private isUpdating;
|
|
19
23
|
private consecutiveErrors;
|
|
20
24
|
private maxConsecutiveErrors;
|
|
@@ -24,6 +28,8 @@ export declare class ViessmannPlatform implements DynamicPlatformPlugin {
|
|
|
24
28
|
constructor(log: Logger, config: ViessmannPlatformConfig & PlatformConfig, api: API);
|
|
25
29
|
private validateConfig;
|
|
26
30
|
private setupBurnerUpdateSystem;
|
|
31
|
+
private startReportServer;
|
|
32
|
+
private stopReportServer;
|
|
27
33
|
private handleBurnerStatusUpdate;
|
|
28
34
|
private updateAccessoriesWithBurnerStatus;
|
|
29
35
|
private updateBoilerAccessoryBurnerStatus;
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EAGH,qBAAqB,EACrB,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,cAAc,EACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACrI,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAgB,MAAM,2BAA2B,CAAC;AASrI,qBAAa,iBAAkB,YAAW,qBAAqB;
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EAGH,qBAAqB,EACrB,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,cAAc,EACf,MAAM,YAAY,CA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AE;IAuCxB,oBAAoB,CACxB,YAAY,EAAE,qBAAqB,EACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,gBAAgB,EAAE;YAsEhB,wBAAwB;IA2ChC,gBAAgB;IA2HtB,OAAO,CAAC,mBAAmB;IA2C3B,OAAO,CAAC,kBAAkB;IAwC1B,OAAO,CAAC,qBAAqB;IA2B7B,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,eAAe;IAiFhB,kBAAkB;;;;;;;;;IAKlB,iBAAiB;;;;;;;;;0BAtxBR,MAAM;+BACD,MAAM;2BACV,MAAM;yBACR,MAAM;4BACH,MAAM;4BACN,MAAM;2BACP,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuyBxB"}
|
package/dist/platform.js
CHANGED
|
@@ -55,6 +55,11 @@ class ViessmannPlatform {
|
|
|
55
55
|
installations = [];
|
|
56
56
|
refreshTimer;
|
|
57
57
|
healthMonitoringTimer;
|
|
58
|
+
// Report server child process supervision
|
|
59
|
+
reportServerChild;
|
|
60
|
+
reportServerRestarts = 0;
|
|
61
|
+
reportServerStopping = false;
|
|
62
|
+
reportServerRestartTimer;
|
|
58
63
|
isUpdating = false;
|
|
59
64
|
consecutiveErrors = 0;
|
|
60
65
|
maxConsecutiveErrors = 5;
|
|
@@ -122,14 +127,13 @@ class ViessmannPlatform {
|
|
|
122
127
|
const serverArgs = ['--port', String(reportPort), '--path', reportServerPath, '--timeout', String(reportTimeout)];
|
|
123
128
|
if (this.config.debug)
|
|
124
129
|
serverArgs.push('--debug');
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
child
|
|
131
|
-
|
|
132
|
-
});
|
|
130
|
+
// Supervised child process (2.0.76):
|
|
131
|
+
// - spawn (not execFile): execFile buffers stdout (1 MB max) and ignores
|
|
132
|
+
// `stdio`, so with --debug the server was silently killed after a while
|
|
133
|
+
// - output forwarded to the Homebridge log, exit/errors logged
|
|
134
|
+
// - automatic restart with back-off (e.g. port still busy after a restart)
|
|
135
|
+
// - child terminated on Homebridge shutdown (no orphan holding the port)
|
|
136
|
+
this.startReportServer(reportScript, serverArgs, reportPort);
|
|
133
137
|
this.log.info('β'.repeat(60));
|
|
134
138
|
this.log.info('π Viessmann Report Server');
|
|
135
139
|
this.log.info(` Open from any device: http://${lanIP}:${reportPort}`);
|
|
@@ -143,6 +147,7 @@ class ViessmannPlatform {
|
|
|
143
147
|
}
|
|
144
148
|
});
|
|
145
149
|
this.api.on("shutdown" /* APIEvent.SHUTDOWN */, () => {
|
|
150
|
+
this.stopReportServer();
|
|
146
151
|
if (this.refreshTimer) {
|
|
147
152
|
clearInterval(this.refreshTimer);
|
|
148
153
|
}
|
|
@@ -191,6 +196,61 @@ class ViessmannPlatform {
|
|
|
191
196
|
this.viessmannAPI.setBurnerUpdateCallback(this.handleBurnerStatusUpdate.bind(this));
|
|
192
197
|
this.log.debug('π₯ Burner update system initialized');
|
|
193
198
|
}
|
|
199
|
+
// π Start the report web server as a supervised child process
|
|
200
|
+
startReportServer(script, args, port) {
|
|
201
|
+
const { spawn } = require('child_process');
|
|
202
|
+
const child = spawn(process.execPath, [script, ...args], { stdio: ['ignore', 'pipe', 'pipe'] });
|
|
203
|
+
this.reportServerChild = child;
|
|
204
|
+
const startedAt = Date.now();
|
|
205
|
+
const forward = (level) => (buf) => {
|
|
206
|
+
for (const line of buf.toString().split('\n')) {
|
|
207
|
+
const l = line.trim();
|
|
208
|
+
if (!l)
|
|
209
|
+
continue;
|
|
210
|
+
if (level === 'warn' || /error|EADDRINUSE|failed/i.test(l)) {
|
|
211
|
+
this.log.warn(`[ReportServer] ${l.replace(/^\[ReportServer\]\s*/, '')}`);
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.log.debug(`[ReportServer] ${l.replace(/^\[ReportServer\]\s*/, '')}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
child.stdout?.on('data', forward('debug'));
|
|
219
|
+
child.stderr?.on('data', forward('warn'));
|
|
220
|
+
child.on('error', (err) => {
|
|
221
|
+
this.log.warn(`π Report server failed to start: ${err.message}`);
|
|
222
|
+
});
|
|
223
|
+
child.on('exit', (code, signal) => {
|
|
224
|
+
this.reportServerChild = undefined;
|
|
225
|
+
if (this.reportServerStopping)
|
|
226
|
+
return;
|
|
227
|
+
// A run longer than 10 minutes resets the back-off counter
|
|
228
|
+
if (Date.now() - startedAt > 10 * 60 * 1000)
|
|
229
|
+
this.reportServerRestarts = 0;
|
|
230
|
+
this.reportServerRestarts++;
|
|
231
|
+
if (this.reportServerRestarts > 5) {
|
|
232
|
+
this.log.error(`π Report server on port ${port} keeps stopping (code=${code} signal=${signal}) β giving up. ` +
|
|
233
|
+
'Check that the port is free and restart Homebridge.');
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
const delay = Math.min(5000 * Math.pow(2, this.reportServerRestarts - 1), 120000);
|
|
237
|
+
this.log.warn(`π Report server stopped (code=${code} signal=${signal}) β restarting in ${delay / 1000}s ` +
|
|
238
|
+
`(attempt ${this.reportServerRestarts}/5)`);
|
|
239
|
+
this.reportServerRestartTimer = setTimeout(() => this.startReportServer(script, args, port), delay);
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
// π Stop the report server (Homebridge shutdown)
|
|
243
|
+
stopReportServer() {
|
|
244
|
+
this.reportServerStopping = true;
|
|
245
|
+
if (this.reportServerRestartTimer)
|
|
246
|
+
clearTimeout(this.reportServerRestartTimer);
|
|
247
|
+
try {
|
|
248
|
+
this.reportServerChild?.kill('SIGTERM');
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
// already gone
|
|
252
|
+
}
|
|
253
|
+
}
|
|
194
254
|
// π NEW: Handle burner status updates from API
|
|
195
255
|
async handleBurnerStatusUpdate(installationId, gatewaySerial, deviceId, burnerStatus, reason) {
|
|
196
256
|
const updateKey = `${installationId}-${gatewaySerial}-${deviceId}`;
|
package/dist/settings.d.ts
CHANGED
|
@@ -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.
|
|
12
|
+
export declare const PLUGIN_VERSION = "2.0.76";
|
|
13
13
|
/**
|
|
14
14
|
* Default configuration values
|
|
15
15
|
*/
|
package/dist/settings.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-viessmann-vicare",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.76",
|
|
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": {
|