@pellebot/homebridge-fritz-platform-hb2 1.2.0 → 1.2.1
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 +17 -0
- package/package.json +1 -1
- package/src/platform.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
> **Hinweis zum Format:** Releases ab `v1.0.0` werden unter dem npm-Paket `@pellebot/homebridge-fritz-platform-hb2` veröffentlicht. Die `6.1.0-hb2patch.x` Pre-Releases sind Vorstufen unter dem alten Paketnamen `@pellebot/homebridge-fritz-platform` (deprecated). Die `registerPlatform`-Kennung bleibt durchgängig `homebridge-fritz-platform`, sodass cached Accessories über den Rename hinweg matchen — kein Re-Pairing nötig.
|
|
4
4
|
|
|
5
|
+
# v1.2.1 — 2026-11-14 (Bugfix: Absturz bei offenem Fenster)
|
|
6
|
+
|
|
7
|
+
**Behebt #2.** Sobald ein Thermostat ein offenes Fenster meldete (`windowOpen: 1`) oder ein Kontakt-/Fenstersensor öffnete, stürzte die Child-Bridge mit `TypeError: historyService.getInitialTime is not a function` ab. Nach fünf Abstürzen stoppte Homebridge die Child-Bridge, und das ganze Plugin fiel aus, solange das Fenster offen war.
|
|
8
|
+
|
|
9
|
+
## Ursache
|
|
10
|
+
|
|
11
|
+
Der NoOp-Ersatz für fakegato-history in `src/platform.js` bildete nur `addEntry`, `cleanPersist`, `setExtraPersistedData` und `getExtraPersistedData` nach. Die Handler für `smarthome-contact` und `smarthome-window` rufen zusätzlich `getInitialTime()` auf, um die Eve-Werte `LastActivation` und `ClosedDuration` zu berechnen.
|
|
12
|
+
|
|
13
|
+
## Änderung
|
|
14
|
+
|
|
15
|
+
- Der Stub merkt sich beim Erzeugen den Zeitpunkt (Unix-Sekunden) und gibt ihn über `getInitialTime()` zurück. Die Eve-Dauerwerte zählen damit ab Start der Bridge.
|
|
16
|
+
- Abgleich aller `historyService.*`-Aufrufe in den aktiven Pfaden (`smarthome/`, `router/`, `extras/`): verwendet werden nur `addEntry` und `getInitialTime` – beide sind jetzt im Stub vorhanden.
|
|
17
|
+
|
|
18
|
+
## Breaking Changes
|
|
19
|
+
|
|
20
|
+
Keine.
|
|
21
|
+
|
|
5
22
|
# v1.2.0 — 2026-05-14 (Wizard Edit-Mode / Phase G)
|
|
6
23
|
|
|
7
24
|
**Setup-Wizard erhält Aktualisierungs-Routine.** Beim erneuten Aufruf des Wizards (z.B. um ein weiteres Gerät hinzuzufügen) werden die in `config.json` gespeicherten Einstellungen jetzt vorgeladen statt überschrieben. Damit ist der Hauptschmerz aus v1.1.x adressiert: manuell vergebene Tile-Namen, gewählter `accType` (z.B. `energy-light` statt `energy-temperature`) und Router-Switch-Zustände überleben einen Wizard-Re-Run unverändert.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellebot/homebridge-fritz-platform-hb2",
|
|
3
3
|
"displayName": "Homebridge FRITZ!Box Platform (HB2)",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Homebridge 2.0 plugin for AVM FRITZ!DECT devices (thermostats, lamps, sensors, OBIS smart-meter readers) and FRITZ!Box router switches (Guest WLAN, WPS). Node 22 / 24 ready.",
|
|
6
6
|
"icon": "https://raw.githubusercontent.com/PelleBot/homebridge-fritz-platform-ng/main/branding/Icon.png",
|
|
7
7
|
"type": "module",
|
package/src/platform.js
CHANGED
|
@@ -72,8 +72,16 @@ function FritzPlatform(log, config, api) {
|
|
|
72
72
|
// Functional impact: Eve App will not show historical graphs for
|
|
73
73
|
// thermostats, temperature, humidity, contact/window, outlet energy.
|
|
74
74
|
// HomeKit core functionality (control, current state) is unaffected.
|
|
75
|
-
|
|
75
|
+
// getInitialTime() is used by the contact/window handlers (Eve
|
|
76
|
+
// LastActivation/ClosedDuration). The stub returns the construction time
|
|
77
|
+
// in Unix seconds, so durations count from bridge start (issue #2).
|
|
78
|
+
HistoryService = function NoOpHistoryService() {
|
|
79
|
+
this.initialTime = Math.floor(Date.now() / 1000);
|
|
80
|
+
};
|
|
76
81
|
HistoryService.prototype.addEntry = function () {};
|
|
82
|
+
HistoryService.prototype.getInitialTime = function () {
|
|
83
|
+
return this.initialTime;
|
|
84
|
+
};
|
|
77
85
|
HistoryService.prototype.cleanPersist = function () {};
|
|
78
86
|
HistoryService.prototype.setExtraPersistedData = function () {};
|
|
79
87
|
HistoryService.prototype.getExtraPersistedData = function () {
|