0.5.32 — 2026-11-05¶
0.5.31 was built but never released: a defect found by its release gates (#491) went in, and published image tags are not rebuilt.
Added¶
- API tokens and the api role (#457 phase 4). An admin adds an api account (no
password; it can't sign in or use the web UI) and, under Settings → Admin → Security →
API tokens, makes a token for it: named, valid 30, 90 or 365 days, shown once (it starts
fwhdc_), kept as a hash. Callers sendAuthorization: Bearer <token>to the HTTPS port and get the account's role: an api account reads everything and sends battery commands, not settings or schedules. The list shows each token's account, last four characters, expiry and last use, with Revoke; disabling or deleting the account stops its tokens. A bad token gets 401. Port 8101 ignores tokens.GET/POST /api/security/tokens,DELETE /api/security/tokens/{id}. - Home Assistant users get the role of their HA group (#457 phase 3b). Every Home
Assistant user can now open the bridge from the sidebar (the add-on sets
panel_admin: false; HA's default showed it to administrators only). HA administrators and owners are admin, read-only users are viewer, other users are user: they can send battery commands and manage schedules but not change settings. This applies with Security on or off. The group comes from the Supervisor (2026.10.4 or later); with an older one the user stays admin while Security is off and is user while it is on, and Settings says why. - Accounts, sign-in, roles and the Security switch (#457 phase 3). Settings → Admin →
Security has a Security switch: on, browsers and API callers sign in on the HTTPS
port, port 8101 redirects there (503 with the reason if HTTPS isn't running), and each
account's role decides what it can do. admin: everything. user: battery commands (force,
release, mode, reserve, off-grid, acknowledging alerts) and schedules; everything else
read-only. viewer: read-only. Anything else that changes something is admin only; a
refused request gets 403 "Your role (…) can't do this." Off for an upgraded install, on
for a new one; it can only be turned on with an admin account and a running HTTPS port.
Accounts adds, edits (role, expiry, disable), resets and deletes accounts and shows
sign-in activity; the last admin can't be removed. Passwords are argon2id hashes; 5
failed sign-ins in 15 minutes lock an account for 60 s; sessions last 30 days. The first
admin: on Docker and pip from
ADMIN_USERNAME/ADMIN_PASSWORD, else (with Security on)adminwith a generated password printed to the log once; on the add-on you add it from the sidebar.franklinwh-direct-connect-bridge reset-password <name>resets a password. Home Assistant's sidebar panel needs no sign-in and is admin for now. The bridge now depends onargon2-cffi. - The HTTPS port (#457 phase 2). The bridge serves the same web UI and REST API over
HTTPS on port 8102, next to 8101, on every install; trusted networks apply, and there is
no sign-in yet. The certificate is your own (
ssl_certfile/ssl_keyfile; on the add-on a bare name is looked up in Home Assistant's/ssl, which the add-on now maps read-only) or a self-signed one the bridge makes for its host name and addresses, valid 825 days and renewed 30 days before it runs out or when the address changes. Settings → Admin → Security → HTTPS port shows whether it runs, the certificate, its SHA-256 fingerprint and Download certificate (GET /api/security/certificate). If HTTPS can't start, the reason shows there and 8101 carries on.HTTPS_PORTchanges the port, 0 turns it off. The add-on publishes 8102, the Docker image exposes it, and the bridge now depends oncryptography. - Trusted networks (#457 phase 1). Settings → Admin → Security lists the networks
allowed to reach the bridge; a request from anywhere else gets 403 "Your network is not
trusted by this bridge", pages and API alike, and one log line per address every 10
minutes. An upgraded install starts with Any network, so nothing changes. A new install
(no install date yet on its first start) starts with the private ranges and loopback, IPv4
and IPv6. Home Assistant's sidebar panel (the add-on's ingress proxy with HA's ingress
header) and
/api/livealways get in. A list that leaves out the address saving it is refused.GET /api/security,PUT /api/security/trusted-networks. The Security switch, the HTTPS port, sign-in and tokens come in later phases. - Guide: Security (#457). A new page for all of the above: upgrades keep today's behaviour and new installs start with Security on (it can be turned off); trusted networks; the HTTPS port and its certificate, including how to trust it on a phone; Home Assistant users' roles; the first admin; the roles admin, user, viewer and api; API tokens. The REST API guide's Authentication section and Control's read-only section now point to it.
Fixed¶
- A pip install has its whole web UI (#487). The package listed only the top-level files of
static/andtemplates/, sopip install(INSTALL.md, "Without Docker") left out thecss/,js/,tabs/andpartials/folders: the page's styles and scripts answered 404 and the main page failed. Docker and the Home Assistant add-on were not affected (they install from the source tree). Found by the new standalone release gate. - Under Podman the bridge keeps its data on the /data volume (#491). It looked only for
Docker's
/.dockerenvto know it runs in a container; Podman makes/run/.containerenvinstead, so the bridge wrote its database, settings, gateways and (from 0.5.32) accounts to/app/datainside the container, and lost them whenever the container was recreated (an image update). Docker and the Home Assistant add-on were not affected. A Podman install that has been running already has its data in the container's/app/data. Before updating, copy it to the folder mapped to/data(./datawithdocker-compose.yml):podman cp <container>:/app/data/. ./data/. Otherwise set things up again after the update.