0.3.0 — 2026-10-15¶
The Home Assistant add-on works properly: the panel renders under ingress, the add-on has its own icon, and setup asks where the site is. Battery dispatch is now gated on a Modbus path that has been confirmed rather than merely configured.
Fixed¶
-
The Home Assistant add-on panel renders properly. Every asset and API call in the UI is relative and resolves against
<base href>, which was hardcoded to/— so under ingress (/api/hassio_ingress/<token>/) they all resolved to the root of the Home Assistant host, outside ingress, and 404ed. The panel came up as unstyled HTML with oversized raw SVGs; the add-on log showedGET /and then not a single/static/…request. The base path is now read per request from the Supervisor'sX-Ingress-Pathheader (the token rotates, so it can never be cached), and the standalone install is unchanged. -
The add-on has its own icon, and a description that is not clipped. It was showing the Supervisor's generic puzzle piece, and the store cut the description mid-phrase at "…over the Direct Connect".
icon.png(128×128) andlogo.png(250×150) are generated bytools/make_addon_icons.pyfrom the same mark as the web UI's favicon. -
The setup wizard no longer opens on a bridge that is already working. Adding the site-timezone step as required made "something required is missing" true on every existing install, and that was what decided whether to prompt — so installs that had been running for weeks were offered first-run setup. The rule is now what the wizard always meant: it prompts only when no real gateway is configured. Completeness is still reported on Settings → Setup, where the user went looking for it.
Added¶
-
Battery dispatch is gated on a CONFIRMED Modbus path, in four states.
not_configured/unreachable/no_sunspec/ready, because the remedy differs in each case and a single "unavailable" sends people to the network when the gateway's own SunSpec setting is what is off. Confirmation is a SunSpec read that returns — a socket that opens is not a dispatch path. The API refuses a force unless the state isready(the UI disabling the buttons is not the gate), while Release is never blocked: refusing to stop a dispatch because the path looks unhealthy is the wrong way round. The Control tab now names the state and the fix instead of greying out. -
The setup wizard offers the FranklinWH app account, optionally, and says why. It is checked by SIGNING IN and stored only if that works — an unverified password means discovering months later that a reserve-SoC write has been failing. The step states what an account actually adds (the reserve SoC, which has no proven local write; naming a VPP dispatch the local channel reports as plain charging; cross-checking a grid-limit write), that credentials are stored in plain text in the bridge's settings file, and that skipping is fine.
-
A mock gateway no longer publishes to Home Assistant by default. The Settings UI already sent
publish_ha: falsefor mocks; the setup wizard did not, and the API defaulted to true — so three mock gateways created on a live install published three fake FranklinWH devices (63 entities, energy sensors included) to the owner's Home Assistant. The default is now decided server-side fromis_mock, which fixes every caller. Passingpublish_ha: trueexplicitly still works. -
The gateway switcher shows each gateway's operating mode and battery direction. SELF / TOU / EMGY, and an up or down arrow for charging or discharging, read from the same run-status enum as the top-bar pill. On a multi-gateway site the switcher is where you choose between gateways, so it is where the difference has to be visible. Unknown shows nothing — no reading is not "idle".
-
The wizard's last step reports every gateway, not one. Solar, generator and backup wiring are per-gateway facts — one aGate can have 6.6 kWp of PV and another none — and a single profile at the end of setup silently claimed they were alike. Each gateway now gets its own card, with its solar stated plainly (including "No solar reported").
Changed¶
- The sidebar says "Direct Connect", not "Local Bridge". The project was renamed; the
dashboard's own name badge and the Network topology diagram were still on the old one.
The Home Assistant device name is deliberately NOT renamed — it is identity, not a label
(see
publish/entities.py), and changing it would orphan every discovered entity.
Documentation¶
-
docs/HA_HISTORY.md— keeping your Home Assistant history. What is possible when you switch to this bridge or reinstall it: keep the entity id (recommended), start clean (also recommended), or merge series by hand (discouraged, with the reasons and the third-party tools named but not endorsed). Includes the four things that must match before any two series may be joined — the one that catches people is a daily counter against a lifetime one, which matching units will not reveal. -
INSTALL.md now warns about reinstalling. An upgrade keeps your Home Assistant entities; a remove-and-reinstall can leave Home Assistant holding the old entity id and give the newly discovered one a
_2suffix, which restarts its history. The remedy — free the old id, rename the new entity to it, and Home Assistant carries history and long-term statistics across the rename — is written out, with the units/state_classcaveat and the Developer Tools → Statistics fix for a jumped total.
Added¶
- The setup wizard asks where the site is, and every gateway uses that one zone. Nothing
on the Direct Connect channel supplies a timezone — the aGate reports an OFFSET and leaves
timezoneStrempty — so it is asked, defaulting to the browser's zone. Mock gateways are started on it (the bridge owns their clock, so there the rule is enforced literally); a real gateway whose clock disagrees is named in the wizard's timezone step rather than silently corrected, because there is no verified write for the aGate's clock.
Fixed¶
-
A gateway with a wrong clock no longer kills every scheduler tick. The site offset is derived from the aGate's wall-clock minus UTC; a gateway answering with a stale date made that 571 days,
datetime.timezone()refuses anything past ±24 h, and the exception took out the tick that was supposed to run the schedule. Offsets outside the real range (UTC-12:00 to UTC+14:00) are now refused — falling back to the gateway's reported base offset, or to "could not be established", which callers already handle. -
The wizard builds the site you described. Declaring 3 aGates created exactly one mock, every mock was called "Mock aGate" so the switcher could not tell them apart, and finishing left the UI on Site · All Gateways, where the per-gateway tabs (Battery, Device, Grid & Inverter) error against an empty host. It now creates one numbered mock per declared aGate, each with the declared aPower count, and selects a real gateway when it finishes.
-
A mock gateway can answer the grid and clock reads. The emulator had no 1701
install_profileor live 1201time_location, so Grid & Inverter reported the gateway unreachable against a mock that was plainly online, and the site clock came from the reference capture's date. Both are now synthesised (franklinwh-direct-connect-api), withfhpRatePower/genRatePowerleft at 0 to mirror the real firmware. -
Battery dispatch over the Modbus Bridge REST API now authenticates. It never had: the Modbus Bridge requires a session with the
controlcapability and we sent nothing, so this path could not have worked against any secured install — while reporting itself available, because availability was probed with an unauthenticated/api/healththat a secured bridge answers200. Newmodbus_bridge_username/modbus_bridge_passwordsettings (also in the add-on options), a cookie session that re-authenticates once on 401, and availability measured on authorised access. Four states are reported distinctly —unreachable,unauthenticated,forbidden,ready— because avieweraccount signs in happily and still cannot dispatch, and no connectivity error would ever point at that remedy. (#56) -
A simulated island and a real outage are no longer the same badge. The top bar now reads OFF-GRID · SIMULATED when the island was requested (
1723 offgridSet = 1) and OFF-GRID · OUTAGE when it was not — the same electrical state, completely different news. Unknown stays plain OFF-GRID rather than guessing. (#45) -
Off-grid is detected again. The bridge reported on-grid throughout a real island on 2026-10-15: it decided from
1301 run_status in (5,6,7)alone, and on this firmware that field never carries the off-grid codes. It now uses every signal —1723 offgridState(primary),dspRunstatus,main_sw[0]and the1707main relays — and reports which fired, plus whether they disagree.1709 gridRelayOpenis no longer consulted: it read 0 for the whole island. (#45) -
Schedules and tariff windows are evaluated on the site's clock, not the container's.
docs/TIMEZONES.mdhas always said a schedule rule is authored in gateway wall-clock; the scheduler used naive container-local time. Standalone Docker hid it by mounting/etc/localtime, so the two clocks agreed — but as a Home Assistant add-on nothing sets a timezone, and a gateway can sit in a different zone from the host in any case. Affects cron windows andtariff.demand/bonus/charge_window_active, which gate dispatch. (#41) -
Modbus reachability is no longer reported as "Down" when it was never probed. Two reachability paths opened TCP to the aGate's
:502with no disable guard, so loading the Network tab made "Modbus is off" untrue; both now honour the switch.Nonemeans not probed and renders as Not probed across the dashboard, health, network and control views, instead of asserting the port is enabled and unreachable. (#30, #32, #34) - A clean clone can be built again.
docker build .failed atCOPY wheels/for anyone who cloned the repository, including the Home Assistant add-on builder running on the user's own host, because that directory only existed on a developer's machine. The Direct Connect API library now resolves from PyPI like any other dependency, with no sibling checkouts. (#37) - An accepted reserve shows immediately. The aGate takes ~8s to reflect a cloud reserve write, and until it did the row behind the modal still showed the old value beside a success message. (#39)
Changed¶
- A Mosquitto add-on installed after this one is now found. MQTT auto-configuration ran once at startup; the poller's existing retry then reconnected to the same unset broker for ever. It re-asks the Supervisor before each attempt, so the broker is picked up without a restart. User-supplied credentials are still never overwritten. (FEAT-HA-ADDON-PARITY)
-
The add-on container takes the host's timezone, read from the Supervisor in Python. Nothing set one before, so it ran UTC and every log line and rendered local time was hours out. Schedules are unaffected either way — since #41 those follow the aGate's clock. (FEAT-HA-ADDON-PARITY)
-
Dependencies come from
pyproject.tomlalone. The Dockerfile used to repeat the list and install with--no-deps, so an end-user image could silently differ from a developer's. (#37) README.mdseparates Run it yourself from Develop. The old instructions required a sibling checkout and recommendeddocker compose up --build, which does nothing here. (#37)
Added¶
-
First-run setup. A dashboard prompt when required steps are outstanding, and a Settings → Setup view that is re-runnable by design: each step reports whether it is already satisfied, so a second pass is a review rather than a blank form. The install profile is read from the gateway and each field is marked
READorSET BY YOU, so a default is never presented as a measurement — and anything derived can be contradicted. Optional steps say "you can set this up later" and skipping disables nothing. (FEAT-SETUP-WIZARD) -
A copy-paste Home Assistant dashboard card, on Home Assistant → Published by bridge. Grouped or single layout, diagnostics opt-in, with a Copy button that falls back to selecting the text when
navigator.clipboardis unavailable — which it is on HA ingress, because that is plainhttp. Shape agreed with the other FranklinWH integrations: plain core cards, no custom cards, no theme line. Entity ids are never guessed: each one is confirmed against Home Assistant, a_2collision suffix is followed, and anything that cannot be found is listed rather than written into the YAML. (FEAT-HA-DASHBOARD-YAML) -
tools/dev.shbuilds the image, restarts the container and proves the container is running the current working tree, exiting non-zero if not.GET /api/versionreports the same stamp assource_sha. A fix had been "verified" against a container that was never rebuilt. (#35) - Working rules in
CLAUDE.md, agreed across the FranklinWH repositories: evidence and citation, claims from other sessions, publishable evidence, testing, verification of critical changes, and defect tracking. Withtools/pii_check.py, severity and nature labels, and a pull-request template. (#29, #31, #33) test/mqtt-shared/run.shfails loudly when a harness container does not stay up. One had been crash-looping unnoticed for eight days. (#38)- This file, and a rule in
CLAUDE.mdrequiring it to be updated in the same commit as any user-facing change. The project had no changelog at all until now.