homebridge-viessmann-vicare 2.0.74 → 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 +442 -0
- package/README.md +42 -9
- package/SETUP-GUIDE.md +25 -6
- package/config.schema.json +2 -2
- package/dist/accessories/boiler-accessory.d.ts +12 -0
- package/dist/accessories/boiler-accessory.d.ts.map +1 -1
- package/dist/accessories/boiler-accessory.js +89 -12
- package/dist/accessories/dhw-accessory.d.ts +1 -1
- package/dist/accessories/dhw-accessory.d.ts.map +1 -1
- package/dist/accessories/dhw-accessory.js +1 -1
- package/dist/accessories/energy-accessory.d.ts +1 -1
- package/dist/accessories/energy-accessory.d.ts.map +1 -1
- package/dist/accessories/energy-accessory.js +24 -24
- package/dist/accessories/heating-circuit-accessory.d.ts +2 -2
- package/dist/accessories/heating-circuit-accessory.d.ts.map +1 -1
- package/dist/accessories/heating-circuit-accessory.js +2 -2
- package/dist/accessories/history-logger.d.ts +62 -42
- package/dist/accessories/history-logger.d.ts.map +1 -1
- package/dist/accessories/history-logger.js +234 -239
- package/dist/accessories/room-sensor-accessory.d.ts.map +1 -1
- package/dist/api-cache.d.ts.map +1 -1
- package/dist/api-cache.js +18 -13
- package/dist/platform.d.ts +6 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +74 -10
- package/dist/settings.d.ts +2 -2
- package/dist/settings.js +3 -3
- package/dist/viessmann-api.d.ts +15 -2
- package/dist/viessmann-api.d.ts.map +1 -1
- package/dist/viessmann-api.js +17 -1
- package/grafana/viessmann-dashboard.json +4926 -0
- package/package.json +12 -6
- package/viessmann-explore-history.js +2 -2
- package/viessmann-report.js +4 -4
- package/viessmann-sync-events.js +69 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to homebridge-viessmann-vicare.
|
|
4
|
+
|
|
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
|
+
|
|
9
|
+
### [2.0.75] - 2026-09-26
|
|
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)
|
|
11
|
+
- fix: burner update statistics counted debounced updates as attempts (success rate shown ~50%): now only processed updates are counted
|
|
12
|
+
- fix: `viessmann-api-status.json` reported a hard-coded plugin version (2.0.71): now uses the real version
|
|
13
|
+
- fix: daily burner starts/hours reference now resets at local midnight (was UTC)
|
|
14
|
+
- fix: **live data was cached for hours/days**: device feature URLs (`/features/installations/.../features`) matched the *installations* cache rule first, so temperatures, burner state and counters were served from cache with the installations TTL (24 h by default) and only refreshed after a command or a restart. Feature data now uses `featuresTTL`, always shorter than `refreshInterval`. Note: the plugin now really polls the API every `refreshInterval` (≈720 requests/day per device at the 2-min default; Viessmann free plan allows 1450/day)
|
|
15
|
+
- feat: new MySQL-only columns: `water_pressure_bar`, `gas_heating/dhw_year_m3`, `heat_heating/dhw_year_kwh`, `power_heating/dhw_day/month/year_kwh` (boiler electricity), `status_code` (latest S.xx/F.xx message), `wifi_rssi`
|
|
16
|
+
- feat: automatic schema migration: missing columns are added on startup (`ALTER TABLE`, requires ALTER privilege, otherwise the SQL to run is logged)
|
|
17
|
+
- feat: `viessmann-sync-events.js` also writes burner ON/OFF and demand events to MySQL when `logging.mysql.enabled` is true (`--no-mysql` to skip)
|
|
18
|
+
- feat: bilingual Grafana dashboard (Italian default / English) shipped in `grafana/viessmann-dashboard.json`
|
|
19
|
+
- chore: `mysql2` moved from `optionalDependencies` to `dependencies`: no more manual `npm install mysql2`
|
|
20
|
+
- chore: TypeScript sources of 2.0.72–2.0.74 realigned in the repository
|
|
21
|
+
|
|
22
|
+
### [2.0.74] - 2026-06-23
|
|
23
|
+
- feat: optional MySQL/MariaDB history logging (`logging.mysql.*` config section) — direct Grafana integration without import scripts
|
|
24
|
+
- feat: 13 extra DB-only columns: `boiler_water_temp`, `hc_operating_mode`, `hc_comfort/normal/reduced_temp`, `hc_slope/shift`, `holiday_mode_active`, `extended_heating_active`, `dhw_mode`, `dhw_circulation_pump`, `installation_id`, `gateway_serial`
|
|
25
|
+
- feat: table auto-created on first run; existing CSV imported automatically in background
|
|
26
|
+
- feat: `logging.csv.enabled` flag (default `true`) — CSV can now be disabled if using MySQL exclusively
|
|
27
|
+
- chore: `mysql2 ^3.11.0` added as `optionalDependencies`
|
|
28
|
+
|
|
29
|
+
### [2.0.73] - 2026-06-23
|
|
30
|
+
- fix: report server timeout default corrected from 300 s to 600 s; max raised from 1800 s to 3600 s
|
|
31
|
+
- fix: `platform.ts` timeout fallback corrected from 300 s to 600 s
|
|
32
|
+
|
|
33
|
+
### [2.0.72] - 2026-06-23
|
|
34
|
+
- fix: `readApiStatus` function missing from report server — caused crash on every `GET /` request (`ReferenceError: readApiStatus is not defined`)
|
|
35
|
+
- chore: axios updated to `^1.17.0`
|
|
36
|
+
|
|
37
|
+
### [2.0.71] - 2026-05-30
|
|
38
|
+
- feat: API usage dashboard card in report server UI (daily usage bar, health score, rate limit status)
|
|
39
|
+
- feat: `writeApiStatusFile` writes `viessmann-api-status.json` after each update cycle
|
|
40
|
+
|
|
41
|
+
### [2.0.70] - 2026-05-29
|
|
42
|
+
- feat: TRV / Room Sensor discovery mode (`features.enableRoomSensorDiscovery`) — scans all gateway devices, logs every API feature path+value tagged `[RoomDiscovery]`, creates a provisional HomeKit `TemperatureSensor` for each device with a temperature reading
|
|
43
|
+
- feat: report generation timeout now configurable (`reportServerTimeout`, default 300 s, range 60–1800 s) — exposed in Homebridge Config UI X
|
|
44
|
+
- fix: report server `--timeout` arg forwarded from plugin config to child process
|
|
45
|
+
|
|
46
|
+
### [2.0.68] - 2026-05-29
|
|
47
|
+
- fix: report server now logs actual LAN IP (`http://192.168.x.x:PORT`) instead of `localhost`/`0.0.0.0` — URL is reachable from any device on the network
|
|
48
|
+
- fix: report generation timeout raised from 60 s to 300 s — fixes timeout error with large CSV files (90+ days, 26 000+ rows)
|
|
49
|
+
- fix: error response from report server now includes full stderr so the UI displays the actual cause
|
|
50
|
+
- feat: comprehensive debug logging in report server (`--debug` flag, forwarded automatically when plugin `debug: true`)
|
|
51
|
+
- fix: `platform.ts` log messages no longer have redundant `[Viessmann]` prefix (Homebridge already adds it)
|
|
52
|
+
|
|
53
|
+
### [2.0.67] - 2026-05-29
|
|
54
|
+
- fix: OAuth authentication URL never shown in Docker/Umbrel/container environments — URL now printed unconditionally before any environment check (FIX#5)
|
|
55
|
+
- fix: improved headless detection: `DISPLAY`/`WAYLAND_DISPLAY` check and `DOCKER`/`CONTAINER` env vars — covers Docker, Umbrel, and headless Linux
|
|
56
|
+
- fix: `tryOpenBrowserDirect()` error callback now also emits the URL as fallback for undetected environments
|
|
57
|
+
|
|
58
|
+
### [2.0.66] - 2026-03-19
|
|
59
|
+
- fix: HTTP 400 (gateway offline / boiler off) no longer causes log spam — strengthened detection via both response.status and message string fallback
|
|
60
|
+
|
|
61
|
+
### [2.0.65] - 2026-03-19
|
|
62
|
+
- fix: HTTP 400 (gateway offline / boiler off) no longer triggers aggressive retry and error logs
|
|
63
|
+
- fix: api-client.ts — 400 responses skip retry loop, logged at debug level only
|
|
64
|
+
- fix: platform.ts — 400 during update cycle logged as debug "⏸️ gateway offline", not error
|
|
65
|
+
- fix: platform.ts — 400 during initial setup logged as debug, not error
|
|
66
|
+
|
|
67
|
+
### [2.0.64] - 2026-03-18
|
|
68
|
+
- fix: CSV cleanup — 4 rows with invalid program='heating' (from first run on 10/03) corrected to empty string
|
|
69
|
+
- fix: version bump (v2.0.63 was already published)
|
|
70
|
+
|
|
71
|
+
### [2.0.63] - 2026-03-18
|
|
72
|
+
- fix: ReferenceError T() in browser — chart labels now evaluated at build time via \${} wrapper
|
|
73
|
+
- fix: tooltip callbacks use pre-injected _tooltip object with _tt() helper
|
|
74
|
+
- fix: thermal efficiency note still hardcoded in Energy Summary section
|
|
75
|
+
|
|
76
|
+
### [2.0.63] - 2026-03-18
|
|
77
|
+
- fix: SyntaxError "Unexpected identifier" in browser — chart labels T() values were emitted without quotes (label:Temp. ambiente (°C) instead of label:"Temp. ambiente (°C)")
|
|
78
|
+
- fix: all 40 chart label and axis T() expressions now correctly wrapped in quotes in generated HTML
|
|
79
|
+
|
|
80
|
+
### [2.0.62] - 2026-03-18
|
|
81
|
+
- fix: report server UI — Language selector now always visible as dedicated card (was hidden inside Advanced panel)
|
|
82
|
+
- fix: Advanced panel — curve slope and shift now have separate labeled fields
|
|
83
|
+
- fix: report server UI card order: Period → Installation → Language → Advanced
|
|
84
|
+
|
|
85
|
+
### [2.0.62] - 2026-03-18
|
|
86
|
+
- fix: all remaining hardcoded English strings in IT report (Cycle performance, Modulation & gas, Burner activity by hour, Daily gas consumption, Flow temperature note, Reset zoom, trend: label)
|
|
87
|
+
- fix: report server language selector moved to correct position in Advanced panel (col 1, below Boiler KW)
|
|
88
|
+
|
|
89
|
+
### [2.0.62] - 2026-03-18
|
|
90
|
+
- feat: complete i18n — 100% of visible text translated, zero English strings in Italian report
|
|
91
|
+
- feat: all Chart.js dataset labels translated (Room temp, Flow temp, Heat demand, Heating curve, Condensing limit, Trend, etc.)
|
|
92
|
+
- feat: program schedule labels translated (Normal→Normale, Reduced→Ridotto, Heating→Riscaldamento, Off→Spento)
|
|
93
|
+
- feat: report header period/generated/samples line translated
|
|
94
|
+
- feat: heatmap legend (Low/High) translated
|
|
95
|
+
- fix: condensing mode/score unit shows "100% del tempo" correctly
|
|
96
|
+
- fix: houseEff comparison uses CSS class instead of translated label
|
|
97
|
+
- fix: effLabel badge uses T() for High/Severe
|
|
98
|
+
- fix: report server language selector in correct position
|
|
99
|
+
|
|
100
|
+
### [2.0.61] - 2026-03-17
|
|
101
|
+
- feat: complete i18n — all report strings translated (section headers, KPI labels, badges, chart notes, boiler notes, forecast, device messages)
|
|
102
|
+
- fix: self-referencing T() calls inside STRINGS block
|
|
103
|
+
- fix: broken forecast note template literal
|
|
104
|
+
- fix: unescaped apostrophes in EN/IT string literals
|
|
105
|
+
|
|
106
|
+
### [2.0.60] - 2026-03-17
|
|
107
|
+
- feat: Heat Demand scatter now includes theoretical heat loss line Q=H×(Ti-To) in green
|
|
108
|
+
- feat: Estimated condensing score (return temp model) added to HC0 section
|
|
109
|
+
- feat: Comfort vs Efficiency section — shows placeholder with data accumulation progress when < 30 days
|
|
110
|
+
- fix: i18n strings — escaped apostrophes in Italian strings
|
|
111
|
+
|
|
112
|
+
### [2.0.59] - 2026-03-17
|
|
113
|
+
- feat: i18n system — English and Italian with --lang CLI param (extensible to any language)
|
|
114
|
+
- feat: all section titles, KPI labels and insight strings translated
|
|
115
|
+
- feat: actionable recommendations with concrete actions and estimated impact
|
|
116
|
+
- feat: --lang selector in report server web UI
|
|
117
|
+
|
|
118
|
+
### [2.0.58] - 2026-03-17
|
|
119
|
+
- fix: TypeError "c.canvas.addEventListener is not an object" in scatter charts (zoom feature)
|
|
120
|
+
|
|
121
|
+
### [2.0.57] - 2026-03-17
|
|
122
|
+
- feat: zoom & pan on Heat Demand and Flow Temperature scatter charts (scroll wheel, pinch, drag, double-click reset)
|
|
123
|
+
|
|
124
|
+
### [2.0.56] - 2026-03-17
|
|
125
|
+
- feat: new chart "Flow Temperature vs Outdoor — Actual vs Heating Curve" (separate from heat demand scatter)
|
|
126
|
+
- fix: removed heating curve from heat demand scatter (incompatible units on same axis)
|
|
127
|
+
- fix: scatter chart restored to single Y axis
|
|
128
|
+
|
|
129
|
+
### [2.0.56] - 2026-03-17
|
|
130
|
+
- fix: heating curve moved to dedicated "Flow Temperature vs Outdoor" chart (scatter chart restored to single Y axis)
|
|
131
|
+
- feat: flow temp chart shows actual flow temp points + theoretical heating curve + 55°C condensing limit line
|
|
132
|
+
|
|
133
|
+
### [2.0.55] - 2026-03-17
|
|
134
|
+
- feat: heating curve overlay on Heat Demand vs Outdoor Temperature scatter chart (non-linear, fitted from ViCare app data)
|
|
135
|
+
- feat: heating curve slope/shift auto-read from viessmann-history-explore JSON per installation/circuit
|
|
136
|
+
- feat: viessmann-explore-history.js now reads heating.circuits.*.heating.curve for all circuits
|
|
137
|
+
- fix: curve formula uses cubic polynomial fit (±2°C accuracy) instead of linear approximation
|
|
138
|
+
|
|
139
|
+
### [2.0.54] - 2026-03-17
|
|
140
|
+
- fix: viessmann-explore-history.js added to npm package files (was missing since initial release)
|
|
141
|
+
|
|
142
|
+
### [2.0.53] - 2026-03-17
|
|
143
|
+
- feat: viessmann-sync-events.js — fetches burner ON/OFF events from API events-history with second-precision timestamps
|
|
144
|
+
- fix: Device Messages section now correctly inside max-width container
|
|
145
|
+
- fix: viessmann-sync-events.js added to npm package files
|
|
146
|
+
|
|
147
|
+
### [2.0.52] - 2026-03-17
|
|
148
|
+
- feat: hourly burner heatmap in report (24-cell grid, runtime %, outdoor temp on hover)
|
|
149
|
+
- feat: daily thermal efficiency chart from CSV (heat_heating_day_kwh / gas × 10.55)
|
|
150
|
+
- feat: energy flow chart for PV/battery/grid/wallbox installations
|
|
151
|
+
- feat: emoji icons on all report section headers
|
|
152
|
+
- fix: CSV migration — hc0/dhw post-deploy rows now correctly detected (35-col format)
|
|
153
|
+
- fix: hc0/dhw appendCsvRow now includes event_type='snapshot' for future-proof migration
|
|
154
|
+
- fix: viessmann-history-YOUR_INSTALLATION_ID.csv migration script updated (re-run if needed)
|
|
155
|
+
|
|
156
|
+
### [2.0.51] - 2026-03-16
|
|
157
|
+
- fix: viessmann-report-server.js missing from npm package (added to files field)
|
|
158
|
+
|
|
159
|
+
### [2.0.50] - 2026-03-16
|
|
160
|
+
- feat: Report web server (viessmann-report-server.js) — configurable port, auto-detect installations, all params from UI
|
|
161
|
+
- feat: reportServerPort + reportServerPath in plugin config and Homebridge UI
|
|
162
|
+
- feat: CSV — 9 new columns: event_type, burner_starts/hours_today (delta), gas/heat monthly, heat production day/month
|
|
163
|
+
- fix: Burner on/off events written to CSV immediately (not only at 15-min snapshot)
|
|
164
|
+
- fix: Statistics read before burner state change detection — event row has accurate starts/hours
|
|
165
|
+
|
|
166
|
+
### [2.0.49] - 2026-03-16
|
|
167
|
+
- fix: battery standby state now correctly shows 0W (not discharge)
|
|
168
|
+
- fix: PV daily yield unit-aware conversion (wattHour vs kilowattHour)
|
|
169
|
+
- fix: COP service comment corrected (×20 not ×10)
|
|
170
|
+
|
|
171
|
+
### [2.0.48] - 2026-03-16
|
|
172
|
+
- fix: VitoCharge ESS battery/PV paths; eebus wallbox vcs.* paths
|
|
173
|
+
- fix: PV kilowatt→watt conversion; activePower property; daily yield from cumulated
|
|
174
|
+
|
|
175
|
+
### [2.0.47] - 2026-03-15
|
|
176
|
+
#### Fixed
|
|
177
|
+
- **Extended Heating state: HomeKit OFF while ViCare ON** — confirmed via live API: `forcedLastFromSchedule.active=True` is a schedule management artifact (always present), not an Extended Heating indicator. State now reads `comfort.active OR (programs.active === comfortFeatureSuffix)`. Deactivation uses `comfort.setTemperature` as fallback when `deactivate` is not executable (Vitodens).
|
|
178
|
+
- **Extended Heating / comfort program: API-driven feature discovery** — removed hardcoded candidate list `['comfort', 'comfortHeating']`. Plugin now discovers the comfort program by scanning actual device features for any enabled `programs.*` that has an `activate` command, excluding known non-comfort programs. Works for Vitodens (`programs.comfort`), Vitocal gen3 (`programs.comfortHeating`), and any future device model without code changes.
|
|
179
|
+
- **HC active program normalisation: pattern-based** — replaced fixed `programNormMap` with `startsWith` pattern matching (`comfort*` → `comfort`, `normal*` → `normal`, `reduced*` → `reduced`). Handles any future variants from new device models automatically.
|
|
180
|
+
- **Device messages: per-device file** — `writeDeviceMessages` now writes `viessmann-messages-<installationId>-<deviceId>.json` (previously single file per installation, causing overwrite when multiple devices present, e.g. Vitocal + VitoCharge). Report aggregates all matching files.
|
|
181
|
+
- **Device messages written at startup** — `setupDeviceAccessories` now calls `writeDeviceMessages` so the file exists immediately on startup, not only after the first update cycle.
|
|
182
|
+
- **Compressor setpoint path: dynamic** — `heating.compressors.0.speed.setpoint` was hardcoded. Now derived from resolved `hpPaths.compressorMod` by replacing `.current` with `.setpoint` — correct for any device/compressor index.
|
|
183
|
+
|
|
184
|
+
### [2.0.48] - 2026-03-15
|
|
185
|
+
*(published separately)*
|
|
186
|
+
|
|
187
|
+
### [2.0.49] - 2026-03-16
|
|
188
|
+
- fix: battery standby state now correctly shows 0W (not discharge)
|
|
189
|
+
- fix: PV daily yield unit-aware conversion (wattHour vs kilowattHour)
|
|
190
|
+
- fix: COP service comment corrected (×20 not ×10)
|
|
191
|
+
|
|
192
|
+
### [2.0.48] - 2026-03-16
|
|
193
|
+
- fix: VitoCharge ESS battery/PV paths; eebus wallbox vcs.* paths
|
|
194
|
+
- fix: PV kilowatt→watt conversion; activePower property; daily yield from cumulated
|
|
195
|
+
|
|
196
|
+
### [2.0.47] - 2026-03-15
|
|
197
|
+
*(published separately)*
|
|
198
|
+
|
|
199
|
+
### [2.0.46] - 2026-03-15
|
|
200
|
+
*(published separately)*
|
|
201
|
+
|
|
202
|
+
### [2.0.45] - 2026-03-15
|
|
203
|
+
*(published separately)*
|
|
204
|
+
|
|
205
|
+
### [2.0.44] - 2026-03-15
|
|
206
|
+
*(published separately)*
|
|
207
|
+
|
|
208
|
+
### [2.0.43] - 2026-03-15
|
|
209
|
+
*(published separately)*
|
|
210
|
+
|
|
211
|
+
### [2.0.42] - 2026-03-15
|
|
212
|
+
#### Fixed
|
|
213
|
+
- **Extended Heating always OFF on heat pump installations** — the entire Extended Heating (comfort boost) feature was conditioned on `programs.comfort` existing in the device features. Vitocal gen3 uses `programs.comfortHeating` instead. The plugin now resolves the correct feature name once at setup (`comfortFeatureSuffix`), trying `comfort` first then `comfortHeating`. All API calls — setup detection, update cycle state reading, activate/deactivate commands, temperature changes — use the resolved name. Fixes HomeKit showing OFF while ViCare app shows ON.
|
|
214
|
+
- **HC program names on heat pump installations** — Vitocal 250A returns `normalHeating`, `reducedEnergySaving`, `comfortHeating` etc. instead of plain `normal`/`reduced`/`comfort`. These were silently ignored, leaving `currentProgram` stale. A normalisation map now converts all HP program variants to the canonical set used by HomeKit switches.
|
|
215
|
+
- **Gas forecast annual estimate threshold** — minimum 14 days of gas data required before showing annual projection. With fewer days the estimate was unreliable. Report now shows a "Need N days" badge and a clear message when threshold not met.
|
|
216
|
+
|
|
217
|
+
#### Added
|
|
218
|
+
- **`maxCompressorRps` config option** — configures the maximum compressor speed (rps) used to normalise heat pump modulation to 0–100% in HomeKit. Default: 50 rps (Vitocal 250A). If measured rps exceeds this value the plugin logs a warning with a suggested corrected value. Set in Homebridge config: `"maxCompressorRps": 60`.
|
|
219
|
+
- **Compressor setpoint logging** — debug log now shows both `current` and `setpoint` rps alongside the normalised modulation % for calibration visibility.
|
|
220
|
+
- **Device messages JSON** — plugin now writes `viessmann-messages-<installationId>.json` to Homebridge storage on every update cycle. Contains S./F./I. codes with timestamps from `device.messages.status/info/service.raw` features. Used by the `viessmann-report.js` Device Messages section.
|
|
221
|
+
|
|
222
|
+
### [2.0.41] - 2026-03-15
|
|
223
|
+
#### Fixed
|
|
224
|
+
- **Duplicate Boiler accessory on heat pump installations** — `setupBoilerAccessory` was matching `heating.boiler.serial` which is present on VitoCharge and other gen3 devices as a system identifier. Filter now requires actual burner/boiler operation features (`heating.burners.*`, `heating.boiler.temperature.current`, etc.). Fixes "Boiler 2" / "Energy 2" confusion reported on Windows installations with Vitocal 250A.
|
|
225
|
+
|
|
226
|
+
#### Added — `viessmann-report.js`
|
|
227
|
+
- **Gas forecast section** — projects next-30-day and annual gas consumption using linear regression on historical CSV data. Shows cost estimate in € with configurable tariff via `--gasPriceEur` (default: 0.90 €/m³). Includes trend indicator (rising/stable/falling).
|
|
228
|
+
- **Device messages section** — reads `viessmann-messages-<ID>.json` (written by plugin, future) and displays S./F./I. codes with English translations from Viessmann service documentation (80+ codes covered).
|
|
229
|
+
- **`--gasPriceEur`** CLI parameter for gas cost calculation.
|
|
230
|
+
|
|
231
|
+
### [2.0.40] - 2026-03-15
|
|
232
|
+
#### Fixed
|
|
233
|
+
- **Critical: Accessories not updating after Homebridge restart** — when restoring accessories from cache, `device`, `installation`, and `gateway` were not written to `accessory.context`. The update loop silently skipped all accessories on every subsequent restart, showing `0 device(s) fetched, 0/0 accessories updated`. All four restore-from-cache paths (Boiler, DHW, Heating Circuit, Energy/Heat Pump) are now fixed.
|
|
234
|
+
|
|
235
|
+
#### Changed
|
|
236
|
+
- **Full feature dump** — moved from `INFO` to `DEBUG` level; only visible when `debug: true` is set in plugin config.
|
|
237
|
+
- **Capability detail log** — resolved HP paths and capability breakdown moved to `DEBUG`; single compact `INFO` line now summarises detected capabilities (e.g. `Capabilities detected: HeatPump`).
|
|
238
|
+
- **`updateHandler not set` warning** — downgraded from `WARN` to `DEBUG`. Per-device spam eliminated; update cycle summary still shows the count when non-zero.
|
|
239
|
+
|
|
240
|
+
#### Notes
|
|
241
|
+
- Users upgrading from ≤ v2.0.38 with a heat pump may see ghost "Heat Pump" accessories in Homebridge cache. Remove via Homebridge UI → Settings → Remove Single Accessory.
|
|
242
|
+
|
|
243
|
+
### [2.0.39] - 2026-03-11
|
|
244
|
+
#### Fixed
|
|
245
|
+
- **Critical: Heat pump device detection** — `isHeatPumpDevice()` was incorrectly matching ALL Viessmann gen3 devices because `type:E3` is a gen3 architecture marker present on every device (TCU gateway, TRVs, room sensors, repeaters, VitoCharge, HEMS, wallbox, etc.). Detection now requires `type:heatpump` (exact role) or modelId containing `vitocal`. This was causing spurious "Adding new energy accessory: … Heat Pump" log entries for every device.
|
|
246
|
+
- **Heat pump path resolution** — Fixed `compressorActive` path to use `heating.compressors.0` (correct for Vitocal 250A gen3), `compressorMod` to use `heating.compressors.0.speed.current`, `returnTemp` to use `heating.sensors.temperature.return`, `cop` to use `heating.scop.heating` / `heating.spf.heating`.
|
|
247
|
+
- **Energy device detection** — PV/Battery/Wallbox capabilities now also detected from device roles (`type:photovoltaic;integrated`, `type:ess`, `type:accessory;vehicleChargingStation`) in addition to feature path scanning. VitoCharge ESS+PV and wallbox now correctly identified.
|
|
248
|
+
- Added compressor speed modulation read (`heating.compressors.0.speed.current` in rps, normalised to 0–100%).
|
|
249
|
+
|
|
250
|
+
### [2.0.38] - 2026-03-11
|
|
251
|
+
#### Added
|
|
252
|
+
- **Heat pump support (Wärmepumpe)** — automatic device detection via `roles` field (`type:heatpump`, `type:E3`, Vitocal modelId); creates a dedicated HomeKit HeaterCooler accessory (compressor state, outside temp) and a COP Lightbulb (Brightness = COP × 20%)
|
|
253
|
+
- **Energy / Heat Pump accessory** fully integrated into the standard discovery flow — no separate config required
|
|
254
|
+
- **Full feature dump** — on first startup every device logs ALL feature paths (name, enabled state, property values, available commands) at INFO level; essential for reverse-engineering unknown device types
|
|
255
|
+
- **Automatic path resolution for heat pumps** — tries multiple known path variants for compressor, outside temp, supply/return temp and COP; logs which paths were found and which were not
|
|
256
|
+
- **`roles` and `brand` fields** added to `ViessmannDevice` interface and device mapping (previously discarded from API response)
|
|
257
|
+
- **PV, battery, wallbox, electric DHW** accessories now properly integrated in main discovery (were previously only in beta branch)
|
|
258
|
+
|
|
259
|
+
#### Changed
|
|
260
|
+
- `setupDeviceAccessories` in `platform.ts` now calls `setupEnergyAccessory` as the last step — gas boiler users see zero impact (silent `return` if no energy features found)
|
|
261
|
+
|
|
262
|
+
### [2.0.37] - 2026-03-10
|
|
263
|
+
#### Added
|
|
264
|
+
- **Comfort stability** — standard deviation of room temperature samples, rated Excellent (<0.2°C) / Good (<0.5°C) / Unstable
|
|
265
|
+
- **Cycling severity score** — composite score (cycles/hour × 10/avgDuration): Excellent <1, Acceptable 1–3, Severe >3
|
|
266
|
+
- **Minimum modulation check** — detects boiler operating near minimum modulation with short cycles (possible oversizing)
|
|
267
|
+
- **Estimated system efficiency** — heatProduced(kWh) ÷ gasUsed(m³ × 10.6 kWh/m³), shown as % (requires `--boilerKW` + gas data)
|
|
268
|
+
- **Heating curve behaviour** — Pearson correlation between outdoor temp and flow temp: weather-compensated / fixed flow / misconfigured
|
|
269
|
+
- **Heat Demand vs Outdoor Temperature scatter plot** — each point is one burner-active sample; red regression line shows heating curve slope and estimated balance point (outdoor temp where heating demand = 0)
|
|
270
|
+
|
|
271
|
+
### [2.0.36] - 2026-03-10
|
|
272
|
+
#### Added
|
|
273
|
+
- **Heating System Assistant** — new *System Analysis* section in the HTML report with deterministic diagnostics:
|
|
274
|
+
- **Heat demand** (kW): avg modulation × nominal power (requires `--boilerKW`)
|
|
275
|
+
- **House heat loss coefficient** (kW/°C): heat demand ÷ ΔT (room vs outdoor)
|
|
276
|
+
- **Estimated peak load** (kW): heat loss × (room setpoint − design temp, default −7°C)
|
|
277
|
+
- **House efficiency rating**: Excellent / Good / Average / Poor based on heat loss coefficient
|
|
278
|
+
- **Boiler sizing check**: warns if nominal power > 2× estimated peak load
|
|
279
|
+
- **Cycling diagnostics**: cycles/hour, short-cycling detection (avg < 5 min), excessive cycling (> 6/hr)
|
|
280
|
+
- **Flow temperature heuristic**: suggests lowering heating curve if flow > 55°C when outdoor > 5°C
|
|
281
|
+
- **Human-readable insight cards**: ✅ / ⚠️ / ℹ️ with actionable explanations
|
|
282
|
+
- **New CLI parameters**: `--boilerKW <kW>` (nominal boiler power), `--designTemp <°C>` (design outdoor temp, default −7°C)
|
|
283
|
+
- All kW-based calculations gracefully hidden if `--boilerKW` is not provided — report works for all users
|
|
284
|
+
|
|
285
|
+
### [2.0.35] - 2026-03-10
|
|
286
|
+
#### Added
|
|
287
|
+
- **Multi-installation support** — CSV and schedule files are now per-installation: `viessmann-history-<ID>.csv` and `viessmann-schedule-<ID>.json`. Each installation writes its own file, no data mixing.
|
|
288
|
+
- **`--installation <ID>` parameter** for report generator — selects the correct CSV and schedule file for the specified installation ID.
|
|
289
|
+
|
|
290
|
+
#### Migration
|
|
291
|
+
Rename existing CSV and schedule files to include your installation ID:
|
|
292
|
+
```bash
|
|
293
|
+
mv /var/lib/homebridge/viessmann-history.csv /var/lib/homebridge/viessmann-history-YOUR_INSTALLATION_ID.csv
|
|
294
|
+
mv /var/lib/homebridge/viessmann-schedule.json /var/lib/homebridge/viessmann-schedule-YOUR_INSTALLATION_ID.json
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### [2.0.34] - 2026-03-10
|
|
298
|
+
#### Fixed
|
|
299
|
+
- **Schedule bands overlay removed** — Canvas-based overlay approach caused all charts to break across multiple attempts. Replaced entirely with a pure HTML/CSS horizontal bar below the overview chart.
|
|
300
|
+
- **Schedule bands wrong position** — band X positions were calculated using string comparison which matched label indices incorrectly. Replaced with numeric minutes-since-midnight comparison so bands align precisely to the actual schedule times.
|
|
301
|
+
|
|
302
|
+
#### Added
|
|
303
|
+
- **Heating schedule bar** — A pure HTML/CSS bar under the overview chart shows the full 24h schedule split into colored segments: 🟢 Normal, ⬜ Reduced, 🟠 Comfort, 🔴 Off. Computed server-side at report generation time, zero JavaScript, zero Chart.js interference. Tooltip on hover shows mode and duration in hours.
|
|
304
|
+
|
|
305
|
+
### [2.0.33] - 2026-03-10
|
|
306
|
+
#### Fixed
|
|
307
|
+
- **All charts broken in v2.0.32** — `Chart.register()` approach caused re-render interference. Removed all canvas overlay attempts entirely, replaced with server-side HTML/CSS schedule bar (implemented in v2.0.34).
|
|
308
|
+
|
|
309
|
+
### [2.0.32] - 2026-03-10
|
|
310
|
+
#### Fixed
|
|
311
|
+
- **All charts broken in v2.0.31** — the schedule bands overlay used `plugins:[{...}]` at the Chart.js root level which is invalid syntax in Chart.js 3/4 and caused all charts to fail silently. Replaced with `Chart.register()` + `Chart.getChart()` approach called after chart instantiation. Also fixed band positioning to use label index lookup instead of ISO string matching.
|
|
312
|
+
|
|
313
|
+
### [2.0.31] - 2026-03-10
|
|
314
|
+
#### Added
|
|
315
|
+
- **Heating schedule awareness** — the plugin now persists the weekly heating schedule to `viessmann-schedule-<ID>.json` after every API refresh, reading `heating.circuits.0.heating.schedule` (timeslots with `mode`, `start`, `end` per weekday).
|
|
316
|
+
- **HTML report: Today's schedule stat card** — shows the active timeslots for the current day (e.g. `06:00–07:30 normal, 17:00–23:00 normal · rest: reduced`) in the HC0 section.
|
|
317
|
+
- **HTML report: Schedule bands overlay** — the overview chart renders subtle background bands to visually align temperature/burner data with the programmed schedule.
|
|
318
|
+
|
|
319
|
+
### [2.0.30] - 2026-03-10
|
|
320
|
+
#### Fixed
|
|
321
|
+
- **Daily gas chart not rendering** — the Chart.js initializer for `cGas` was nested inside the `cycleCount>=3` conditional block. If fewer than 3 burner cycles were present the gas chart canvas was drawn but never initialized. Extracted as independent block, now renders whenever gas data is available (`hasGasChart=true`).
|
|
322
|
+
|
|
323
|
+
### [2.0.29] - 2026-03-10
|
|
324
|
+
#### Fixed
|
|
325
|
+
- **Outdoor temperature chart** — `outside_temp` is written by boiler accessory but was incorrectly read from `hcRows` in the report; fixed to read from `boilerRows`. Outdoor temp now appears correctly in overview chart and dedicated series.
|
|
326
|
+
|
|
327
|
+
#### Added
|
|
328
|
+
- **Daily gas consumption chart** — stacked bar chart (heating = dark blue, DHW = teal) + red line overlay for daily total. Aggregates `max(gas_*_day_m3)` per calendar day so the daily reset at midnight is handled correctly.
|
|
329
|
+
- README: expanded HTML report section, added automated email script + crontab scheduling examples, updated "What is recorded" table.
|
|
330
|
+
|
|
331
|
+
### [2.0.28] - 2026-03-10
|
|
332
|
+
#### Added
|
|
333
|
+
- **Flow temperature logging** — `heating.circuits.N.sensors.temperature.supply` now read and logged to CSV as `flow_temp` column from HC0 accessory.
|
|
334
|
+
- **HTML report** — interactive multi-chart report (`viessmann-report.js`) with overview chart, burner cycles, temperature history, condensing analysis, flow temp, gas consumption, and stat cards. Run with `node viessmann-report.js --installation YOUR_INSTALLATION_ID --days 7`.
|
|
335
|
+
- Condensing badge in report: shows % time in condensing mode (flow temp ≤ 57°C).
|
|
336
|
+
- Cache statistics and custom names in report header.
|
|
337
|
+
|
|
338
|
+
### [2.0.27] - 2026-03-10
|
|
339
|
+
#### Added
|
|
340
|
+
- **Energy accessory** (`energy-accessory.ts`) — auto-detected from `heating.solar`, `heating.circuits.0.circulation.pump`, PV/battery/grid features. Exposes ContactSensor services for each detected energy device.
|
|
341
|
+
- Energy data columns in CSV: `pv_production_w`, `pv_daily_kwh`, `battery_level`, `battery_charging_w`, `battery_discharging_w`, `grid_feedin_w`, `grid_draw_w`, `wallbox_charging`, `wallbox_power_w`.
|
|
342
|
+
|
|
343
|
+
### [2.0.26] - 2026-03-10
|
|
344
|
+
#### Added
|
|
345
|
+
- **Gas consumption logging** — `gas_heating_day_m3` and `gas_dhw_day_m3` columns added to CSV, read from `heating.gas.consumption.heating` and `heating.gas.consumption.dhw` features.
|
|
346
|
+
|
|
347
|
+
### [2.0.25] - 2026-03-10
|
|
348
|
+
#### Fixed
|
|
349
|
+
- **DHW state update delays** — DHW target temp and program now update within 2s of API confirmation instead of waiting for the next full refresh cycle.
|
|
350
|
+
|
|
351
|
+
### [2.0.24] - 2026-03-10
|
|
352
|
+
#### Fixed
|
|
353
|
+
- **HAP feedback loop on ExtendedHeating switch** — incorrect initial state after restart caused HomeKit to immediately call `setExtendedHeating(false)` on load, triggering an unwanted API command. Fixed with proper state initialization guard.
|
|
354
|
+
|
|
355
|
+
### [2.0.23] - 2026-03-09
|
|
356
|
+
#### Fixed
|
|
357
|
+
- **Auth token refresh race condition** — concurrent requests could trigger multiple simultaneous refresh attempts. Added mutex lock around token refresh logic.
|
|
358
|
+
|
|
359
|
+
### [2.0.22]
|
|
360
|
+
#### Fixed
|
|
361
|
+
- **`updateAllCharacteristics()` HAP feedback loop** — when characteristic values were pushed to HomeKit, HAP called back the setter synchronously. Fixed with `_updatingCharacteristics` guard flag cleared via `setImmediate()`.
|
|
362
|
+
|
|
363
|
+
### [2.0.21] - 2026-03-05
|
|
364
|
+
#### Fixed
|
|
365
|
+
- **`ExtendedHeating` incorrect initial state after restart** — switch showed wrong state on Homebridge startup, causing immediate unwanted command. Fixed with proper cache-aware initialization.
|
|
366
|
+
|
|
367
|
+
### [2.0.20] - 2026-03-05
|
|
368
|
+
#### Fixed
|
|
369
|
+
- 🐛 **Stale cache read in command confirmation retry** — `scheduleCommandConfirmation` was calling `getDeviceFeatures()` without invalidating the cache first. Fixed by adding `clearCache()` before each retry, on all three accessories (DHW, HC, Boiler).
|
|
370
|
+
|
|
371
|
+
### [2.0.19] - 2026-03-05
|
|
372
|
+
#### Fixed
|
|
373
|
+
- 🐛 **HAP feedback loop on `updateAllCharacteristics()`** — when switch states were pushed to HomeKit, HAP called back `setEcoMode(false)` / `setOffMode(false)` synchronously, triggering redundant API commands and repeated `Cannot deactivate Off mode` warnings. Fixed by adding a `_updatingCharacteristics` guard flag; cleared via `setImmediate()` after HAP processes all synchronous callbacks.
|
|
374
|
+
|
|
375
|
+
#### Changed
|
|
376
|
+
- 🔧 `postCommandRefreshDelay` config parameter removed and replaced by `postCommandRetry.delays` (array of ms, default `[5000, 15000, 30000, 60000]`) and `postCommandRetry.guardDuration` (ms, default `120000`).
|
|
377
|
+
- 🔧 `scheduleStateRefresh()` replaced by `scheduleCommandConfirmation()` in all three accessories.
|
|
378
|
+
- 🔧 Applied uniformly to `dhw-accessory`, `boiler-accessory`, and `heating-circuit-accessory`.
|
|
379
|
+
|
|
380
|
+
### [2.0.18] - 2026-03-02
|
|
381
|
+
#### Fixed
|
|
382
|
+
- 🐛 **Double `handleManualAuth()` call eliminated** — when auto-auth failed, `handleManualAuth()` was being called twice. Fixed: `performAutoAuth()` now simply rethrows, leaving `authenticate()` as the single point of fallback control.
|
|
383
|
+
|
|
384
|
+
#### Changed
|
|
385
|
+
- 🔧 Removed all commented-out dead code from `auth-manager.ts`. No functional change, cleaner codebase.
|
|
386
|
+
|
|
387
|
+
### [2.0.17] - 2026-03-02
|
|
388
|
+
#### Fixed
|
|
389
|
+
- 🐛 **Progressive command confirmation replaces single-shot refresh** — after every command all accessories now retry API confirmation up to 4 times (at 5s, 15s, 30s, 60s). Each retry extends the pending guard, preventing the regular update cycle from overwriting local state while the Viessmann backend propagates.
|
|
390
|
+
- 🐛 **External change detection during guard window** — if the API returns a value that is neither the pre-command nor the expected post-command value, the guard is immediately reset and the external change is applied.
|
|
391
|
+
- 🐛 **Guard duration now covers the full retry window** — `pendingXxxUntil` is set to `guardDuration` (default 120s) instead of the previous hardcoded 10s.
|
|
392
|
+
|
|
393
|
+
### [2.0.16] - 2026-03-02
|
|
394
|
+
#### Fixed
|
|
395
|
+
- 🐛 Cache invalidation on command — `clearCache()` now called before each confirmation retry to prevent stale reads masking actual state changes.
|
|
396
|
+
|
|
397
|
+
### [2.0.15] - 2026-02-28
|
|
398
|
+
#### Added
|
|
399
|
+
- ✨ **Boiler accessory** (`boiler-accessory.ts`) — exposes burner active status, modulation, outside temperature, humidity, and DHW temperature as HomeKit sensors.
|
|
400
|
+
- ✨ **History logger** (`history-logger.ts`) — logs all sensor data to CSV every refresh cycle with FakeGato support for Eve app graphs.
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
### [2.0.4] - 2025-10-06
|
|
404
|
+
**Added**
|
|
405
|
+
- ✨ `logEnvDiagnostics()` for better detection of graphical environment (X11, Wayland, systemd, headless).
|
|
406
|
+
- ✨ New fallback page `/login` for authentication via another device on the same LAN.
|
|
407
|
+
- ✨ Auto-authentication now supported even in headless environments (Raspberry Pi, systemd, Docker).
|
|
408
|
+
**Changed**
|
|
409
|
+
- ✨ Default `authMethod` is now `"auto"` in all examples and documentation.
|
|
410
|
+
- ✨ Improved resilience in `openBrowser()` on Linux with fallback to `xdg-open`, `gio`, and `xdg-desktop-portal`.
|
|
411
|
+
**Fixed**
|
|
412
|
+
- 🐛 Timeout and fallback flow now properly logged when auto-auth fails.
|
|
413
|
+
- 🐛 Documentation and setup guide reflect the new authentication behavior.
|
|
414
|
+
|
|
415
|
+
### v2.0.0
|
|
416
|
+
- ✨ **Major Release**: Complete rewrite with advanced features
|
|
417
|
+
- ✨ **Complete Localization Support**: Custom names for all accessories in any language
|
|
418
|
+
- ✨ **Intelligent Cache Management**: Multi-layer caching with configurable TTL
|
|
419
|
+
- ✨ **Advanced Rate Limiting Protection**: Exponential backoff with smart recovery
|
|
420
|
+
- ✨ **Complete UI Configuration**: All parameters exposed in Homebridge Config UI X
|
|
421
|
+
- ✨ **Enhanced Installation Filtering**: Filter by name or ID with debug information
|
|
422
|
+
- ✨ **Feature Toggle Controls**: Enable/disable specific accessory types
|
|
423
|
+
- ✨ **Individual Temperature Programs**: Separate controls for Reduced/Normal/Comfort modes
|
|
424
|
+
- ✨ **Enhanced Holiday Modes**: Full support for Holiday and Holiday at Home programs
|
|
425
|
+
- ✨ **Extended Heating Mode**: Quick comfort boost functionality
|
|
426
|
+
- ✨ **Advanced Timeout Controls**: Configurable timeouts and retry mechanisms
|
|
427
|
+
- ✨ **Intelligent Retry Logic**: Alternative API endpoints and smart backoff
|
|
428
|
+
- ✨ **Performance Monitoring**: Real-time diagnostics and cache statistics
|
|
429
|
+
- ✨ **Improved Error Recovery**: Better handling of temporary API issues
|
|
430
|
+
- 🐛 **Enhanced Token Management**: More robust token refresh mechanism
|
|
431
|
+
- 🐛 **Better Device Detection**: Improved handling of device feature detection
|
|
432
|
+
- 🐛 **Fixed Temperature Constraints**: Proper validation of temperature ranges
|
|
433
|
+
- 🔧 **Code Refactoring**: Complete modularization and improved maintainability
|
|
434
|
+
|
|
435
|
+
### v1.0.0
|
|
436
|
+
- 🎉 **Initial Release**: Basic functionality with boiler, DHW, and heating circuit support
|
|
437
|
+
- 🔐 **OAuth Authentication**: Automatic and manual authentication methods
|
|
438
|
+
- 📊 **Basic Rate Limiting**: Simple retry logic
|
|
439
|
+
- 🏠 **HomeKit Integration**: Full compatibility with Apple Home app
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
---
|
package/README.md
CHANGED
|
@@ -270,20 +270,19 @@ Every refresh appends a row to:
|
|
|
270
270
|
|
|
271
271
|
### 🗄️ MySQL / MariaDB (optional, v2.0.74+)
|
|
272
272
|
|
|
273
|
-
Write history to a local MySQL or MariaDB database for direct Grafana integration. The DB schema adds **
|
|
273
|
+
Write history to a local MySQL or MariaDB database for direct Grafana integration. The DB schema adds **26 extra columns** not present in the CSV (`boiler_water_temp`, `water_pressure_bar`, yearly gas/heat counters, boiler electricity, `status_code`, `wifi_rssi`, `hc_slope/shift`, `holiday_mode_active`, `dhw_circulation_pump`, etc.).
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
sudo npm install --prefix /usr/local mysql2
|
|
278
|
-
```
|
|
275
|
+
> Since **v2.0.75** the `mysql2` driver is installed automatically with the plugin: no manual `npm install` is needed.
|
|
279
276
|
|
|
280
|
-
**Step
|
|
277
|
+
**Step 1 — Create DB user** (example):
|
|
281
278
|
```sql
|
|
279
|
+
CREATE DATABASE IF NOT EXISTS homebridge;
|
|
282
280
|
CREATE USER 'viessmann_rw'@'localhost' IDENTIFIED BY 'your_password';
|
|
283
|
-
GRANT SELECT, INSERT ON homebridge
|
|
281
|
+
GRANT SELECT, INSERT, CREATE, ALTER ON homebridge.* TO 'viessmann_rw'@'localhost';
|
|
284
282
|
```
|
|
283
|
+
`CREATE` lets the plugin create the table on first run, `ALTER` lets it add the new columns automatically when you upgrade the plugin. Without `ALTER` logging keeps working with the existing columns and the Homebridge log shows the exact `ALTER TABLE` statement to run once as DB admin.
|
|
285
284
|
|
|
286
|
-
**Step
|
|
285
|
+
**Step 2 — Enable in plugin config**:
|
|
287
286
|
```json
|
|
288
287
|
"logging": {
|
|
289
288
|
"csv": { "enabled": true },
|
|
@@ -300,7 +299,25 @@ GRANT SELECT, INSERT ON homebridge.viessmann_history TO 'viessmann_rw'@'localhos
|
|
|
300
299
|
}
|
|
301
300
|
```
|
|
302
301
|
|
|
303
|
-
**Step
|
|
302
|
+
**Step 3 — Restart Homebridge.** The table is created automatically. Existing CSV history is imported in the background on first run. On upgrade, new columns are added automatically.
|
|
303
|
+
|
|
304
|
+
**Optional — precise burner ON/OFF events in MySQL**: `viessmann-sync-events.js` reads the boiler event history (S.6 ignition) and, when `logging.mysql.enabled` is true, writes the events to the same table (duplicates are ignored, safe to re-run):
|
|
305
|
+
```bash
|
|
306
|
+
# daily via cron, e.g. 04:00
|
|
307
|
+
0 4 * * * node /usr/local/lib/node_modules/homebridge-viessmann-vicare/viessmann-sync-events.js --installation YOUR_INSTALLATION_ID
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### 📈 Grafana dashboard (Italian / English)
|
|
311
|
+
|
|
312
|
+
A ready-made dashboard is included in the package: `grafana/viessmann-dashboard.json` (also on [GitHub](https://github.com/diegoweb100/homebridge-viessmann-vicare/tree/main/grafana)).
|
|
313
|
+
|
|
314
|
+
1. In Grafana add a **MySQL** data source pointing to the `homebridge` database (a read-only user with `SELECT` is enough).
|
|
315
|
+
2. **Dashboards → New → Import** and upload `viessmann-dashboard.json`.
|
|
316
|
+
3. Pick the data source in the **Database** drop-down and the language in **Lingua / Language** (Italian is the default).
|
|
317
|
+
|
|
318
|
+
Panels: current status (room/outside/DHW temperature, system pressure, burner, modulation, data age, program and modes, starts and hours today, gas this year, status code, boiler Wi-Fi), temperature trends, DHW, program set-points, burner state timeline, modulation, daily starts/hours, daily and monthly gas, monthly heat produced, boiler electricity, estimated efficiency, heating program/mode timeline, holiday/extended comfort, pressure trend, heating curve and Wi-Fi signal.
|
|
319
|
+
|
|
320
|
+
All queries are time-zone safe (timestamps stored in UTC, days computed in local time via the hidden `tz` variable, default `Europe/Rome`: edit it in *Dashboard settings → Variables* if you live elsewhere). The efficiency panel uses the hidden `kwh_m3` variable (default 10.5 kWh/m³ of natural gas).
|
|
304
321
|
|
|
305
322
|
---
|
|
306
323
|
|
|
@@ -1078,6 +1095,22 @@ For issues and questions:
|
|
|
1078
1095
|
|
|
1079
1096
|
## 📈 Changelog
|
|
1080
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
|
+
|
|
1101
|
+
### [2.0.75] - 2026-09-26
|
|
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)
|
|
1103
|
+
- fix: burner update statistics counted debounced updates as attempts (success rate shown ~50%): now only processed updates are counted
|
|
1104
|
+
- fix: `viessmann-api-status.json` reported a hard-coded plugin version (2.0.71): now uses the real version
|
|
1105
|
+
- fix: daily burner starts/hours reference now resets at local midnight (was UTC)
|
|
1106
|
+
- fix: **live data was cached for hours/days**: device feature URLs (`/features/installations/.../features`) matched the *installations* cache rule first, so temperatures, burner state and counters were served from cache with the installations TTL (24 h by default) and only refreshed after a command or a restart. Feature data now uses `featuresTTL`, always shorter than `refreshInterval`. Note: the plugin now really polls the API every `refreshInterval` (≈720 requests/day per device at the 2-min default; Viessmann free plan allows 1450/day)
|
|
1107
|
+
- feat: new MySQL-only columns: `water_pressure_bar`, `gas_heating/dhw_year_m3`, `heat_heating/dhw_year_kwh`, `power_heating/dhw_day/month/year_kwh` (boiler electricity), `status_code` (latest S.xx/F.xx message), `wifi_rssi`
|
|
1108
|
+
- feat: automatic schema migration: missing columns are added on startup (`ALTER TABLE`, requires ALTER privilege, otherwise the SQL to run is logged)
|
|
1109
|
+
- feat: `viessmann-sync-events.js` also writes burner ON/OFF and demand events to MySQL when `logging.mysql.enabled` is true (`--no-mysql` to skip)
|
|
1110
|
+
- feat: bilingual Grafana dashboard (Italian default / English) shipped in `grafana/viessmann-dashboard.json`
|
|
1111
|
+
- chore: `mysql2` moved from `optionalDependencies` to `dependencies`: no more manual `npm install mysql2`
|
|
1112
|
+
- chore: TypeScript sources of 2.0.72–2.0.74 realigned in the repository
|
|
1113
|
+
|
|
1081
1114
|
### [2.0.74] - 2026-06-23
|
|
1082
1115
|
- feat: optional MySQL/MariaDB history logging (`logging.mysql.*` config section) — direct Grafana integration without import scripts
|
|
1083
1116
|
- feat: 13 extra DB-only columns: `boiler_water_temp`, `hc_operating_mode`, `hc_comfort/normal/reduced_temp`, `hc_slope/shift`, `holiday_mode_active`, `extended_heating_active`, `dhw_mode`, `dhw_circulation_pump`, `installation_id`, `gateway_serial`
|
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
|
|
|
@@ -317,12 +317,15 @@ CSV files location: `/var/lib/homebridge/viessmann-history-<installationId>.csv`
|
|
|
317
317
|
|
|
318
318
|
#### **MySQL / MariaDB logging (v2.0.74+)**
|
|
319
319
|
|
|
320
|
-
Optional. Writes every row directly to a local database — ideal for **Grafana** dashboards.
|
|
320
|
+
Optional. Writes every row directly to a local database — ideal for **Grafana** dashboards. Since **v2.0.75** the `mysql2` driver is bundled with the plugin (no manual install).
|
|
321
321
|
|
|
322
|
-
**Step 1 —
|
|
323
|
-
```
|
|
324
|
-
|
|
322
|
+
**Step 1 — Create the database user** (once, as DB admin):
|
|
323
|
+
```sql
|
|
324
|
+
CREATE DATABASE IF NOT EXISTS homebridge;
|
|
325
|
+
CREATE USER 'viessmann_rw'@'localhost' IDENTIFIED BY 'your_password';
|
|
326
|
+
GRANT SELECT, INSERT, CREATE, ALTER ON homebridge.* TO 'viessmann_rw'@'localhost';
|
|
325
327
|
```
|
|
328
|
+
`ALTER` is needed only for the automatic column migration on plugin upgrades. Without it the plugin logs the `ALTER TABLE` statement to run manually.
|
|
326
329
|
|
|
327
330
|
**Step 2 — Enable in plugin config**:
|
|
328
331
|
```json
|
|
@@ -343,6 +346,10 @@ sudo npm install --prefix /usr/local mysql2
|
|
|
343
346
|
|
|
344
347
|
**Step 3 — Restart Homebridge.** The table `viessmann_history` is created automatically. Existing CSV history is imported in the background on first run.
|
|
345
348
|
|
|
349
|
+
**Step 4 (optional) — Burner events and Grafana**
|
|
350
|
+
- Schedule `viessmann-sync-events.js --installation YOUR_INSTALLATION_ID` daily (cron): with MySQL enabled it also writes precise burner ON/OFF events to the table.
|
|
351
|
+
- Import `grafana/viessmann-dashboard.json` in Grafana (Dashboards → Import), select your MySQL data source in the **Database** drop-down and the language in **Lingua / Language** (Italian default, English available). Days are computed in the `tz` variable time zone (default `Europe/Rome`).
|
|
352
|
+
|
|
346
353
|
> `logging.csv.enabled` defaults to `true` — CSV and MySQL can run in parallel. Set `csv.enabled: false` only if you want MySQL exclusively. If both are disabled, Homebridge logs a warning at startup.
|
|
347
354
|
|
|
348
355
|
|
|
@@ -1274,6 +1281,18 @@ sudo systemctl restart homebridge
|
|
|
1274
1281
|
|
|
1275
1282
|
## Changelog
|
|
1276
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
|
+
|
|
1287
|
+
### v2.0.75 (2026-09-26)
|
|
1288
|
+
- fix: zero values (gas, heat, outside temperature) no longer stored as empty/NULL in CSV and MySQL
|
|
1289
|
+
- fix: burner update success rate, api-status plugin version, daily reference at local midnight
|
|
1290
|
+
- fix: live feature data was cached with the installations TTL (hours/days): values now refresh at every `refreshInterval` (≈720 requests/day per device at 2 min; free plan 1450/day)
|
|
1291
|
+
- feat: MySQL columns for system pressure, yearly gas/heat counters, boiler electricity, status code and Wi-Fi signal, with automatic `ALTER TABLE` migration
|
|
1292
|
+
- feat: `viessmann-sync-events.js` writes burner events to MySQL too
|
|
1293
|
+
- feat: bilingual (IT/EN) Grafana dashboard in `grafana/viessmann-dashboard.json`
|
|
1294
|
+
- chore: `mysql2` is now a regular dependency (manual install step removed)
|
|
1295
|
+
|
|
1277
1296
|
### v2.0.74 (2026-06-23)
|
|
1278
1297
|
- feat: optional MySQL/MariaDB history logging (`logging.mysql.*` config section)
|
|
1279
1298
|
- feat: `DbRow` extends CSV schema with 13 extra DB-only columns: `installation_id`, `gateway_serial`, `boiler_water_temp`, `hc_operating_mode`, `hc_comfort_temp/normal/reduced`, `hc_slope/shift`, `holiday_mode_active`, `extended_heating_active`, `dhw_mode`, `dhw_circulation_pump`
|
package/config.schema.json
CHANGED
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
"title": "Enable MySQL/MariaDB logging",
|
|
550
550
|
"type": "boolean",
|
|
551
551
|
"default": false,
|
|
552
|
-
"description": "Write history to MySQL or MariaDB.
|
|
552
|
+
"description": "Write history to MySQL or MariaDB (e.g. for Grafana). The mysql2 driver is bundled with the plugin since v2.0.75 — no manual install needed. New columns are added automatically on upgrade."
|
|
553
553
|
},
|
|
554
554
|
"host": {
|
|
555
555
|
"title": "Host",
|
|
@@ -592,7 +592,7 @@
|
|
|
592
592
|
"title": "Auto-create table",
|
|
593
593
|
"type": "boolean",
|
|
594
594
|
"default": true,
|
|
595
|
-
"description": "CREATE TABLE IF NOT EXISTS on first run,
|
|
595
|
+
"description": "CREATE TABLE IF NOT EXISTS on first run, import existing CSV history automatically, and add new columns when the plugin is upgraded (requires CREATE/ALTER privilege)."
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
}
|
|
@@ -27,6 +27,7 @@ export declare class ViessmannBoilerAccessory {
|
|
|
27
27
|
private pendingPreviousTemp;
|
|
28
28
|
private dailyRef;
|
|
29
29
|
private states;
|
|
30
|
+
private extMetrics;
|
|
30
31
|
constructor(platform: ViessmannPlatform, accessory: PlatformAccessory, installation: ViessmannInstallation, gateway: ViessmannGateway, device: ViessmannDevice);
|
|
31
32
|
private initializeCapabilities;
|
|
32
33
|
private analyzeCapabilities;
|
|
@@ -47,6 +48,17 @@ export declare class ViessmannBoilerAccessory {
|
|
|
47
48
|
private scheduleCommandConfirmation;
|
|
48
49
|
private handleUpdate;
|
|
49
50
|
private updateFromFeatures;
|
|
51
|
+
/** True once a heat production summary feature has been seen (Vitodens gen3 / heat pumps). */
|
|
52
|
+
private hasHeatProduction;
|
|
53
|
+
/** Feature-presence flags (a value of 0 is valid and must not mean "absent"). */
|
|
54
|
+
private hasGasFeature;
|
|
55
|
+
private hasOutsideFeature;
|
|
56
|
+
/**
|
|
57
|
+
* 📊 Collect extended metrics for MySQL history (2.0.75).
|
|
58
|
+
* Values stay undefined when the feature is not exposed by the device,
|
|
59
|
+
* so the DB gets NULL (unknown) instead of a misleading 0.
|
|
60
|
+
*/
|
|
61
|
+
private collectExtendedMetrics;
|
|
50
62
|
getDiagnosticSummary(): {
|
|
51
63
|
burnerHours: number;
|
|
52
64
|
burnerStarts: number;
|