- Go 62.4%
- Vue 17%
- TypeScript 8.1%
- CSS 6.1%
- Dockerfile 3.2%
- Other 3.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
config.yaml now carries `image: hwe70/evcc-bare-{arch}`, so Supervisor
pulls ready-made amd64/aarch64 images rather than building on the target.
Images for 0.5.6 are pushed and verified (amd64 42.5 MB, arm64 41.6 MB).
Committed only now, after the images exist: with `image:` set Supervisor
never builds again, so publishing has to precede the field or the next
update breaks on every installation at once. Same ordering applies to
every future version bump -- see build-images.sh.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
| api | ||
| deploy/hassio | ||
| dockerapi | ||
| evccview | ||
| frontend | ||
| store | ||
| supervisorapi | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
| repository.json | ||
| staticfiles.go | ||
💾 evcc BaRe
BaRe = Backup Restore. A Home Assistant add-on to back up, name, describe and restore the
configuration of another evcc add-on: both
evcc.yaml (if present) and evcc's own SQLite database (devices/settings
added later via evcc's web UI). Built to make it safe to try out
different evcc configurations and reliably get back to a known-good
state.
This project was developed with the assistance of Claude (Anthropic).
🧭 Why an add-on, not an integration
evcc runs as its own Home Assistant add-on with its own container --
/config/evcc.yaml and /data/evcc.db live inside that container, not
in Home Assistant's own config directory. A regular HA integration
(custom_components) runs inside HA Core's own process with no access to
another add-on's files. The only practical way to reach them is
docker_api: true (Docker Engine API access) from a separate add-on --
which is what this is. See the Security note
for what that implies.
⚙️ How it works
- Instances: on start, discovers every installed evcc add-on (e.g. "evcc" + "evcc (nightly)") via Supervisor's API and lets you pick which one to work with -- each shown with Supervisor's own state (läuft/ startet/gestoppt/...) and an icon for whether it's YAML-, database-, or hybrid-configured (📄/🛢️). Works the same regardless of whether the instance is running, mid-restart-loop, or fully stopped -- see "Stopped instances" below.
- Backup: reads
evcc.yaml(if present) andevcc.dbstraight out of the evcc container viaCopyFromContainer, stores them as raw byte copies under this add-on's own/data, alongside a name + description you provide and which instance it came from. - View: renders a combined, read-only YAML view (the
evcc.yamlcontent plus the database-managed devices/settings, decoded from evcc'sconfigs/settingstables, each half marked with a# Quelle: ...comment naming where it came from) both as an in-app popup and into Supervisor's shared/sharefolder for the File editor add-on. A button opens File editor with that file already loaded, via File editor's own undocumented?loadfile=support -- reached through a direct ingress link rather than Home Assistant's normal/app/<slug>route, which can't forward it (see DOCS.md). Falls back to just opening File editor's UI if that fails (e.g. File editor isn't installed). - Restore: writes a backup's stored
evcc.yaml/evcc.dbback into the evcc instance and (re)starts it. Raw bytes back in, verbatim -- no reconstruction, so nothing the tool doesn't know about the database schema can get lost in translation. Restoring a backup onto a different instance than it came from works but warns first. - Export/Import: any backup can be downloaded as a ZIP (
evcc.yaml+evcc.db+ the same rendered combined view "Ansehen" shows, included purely for documentation +meta.json) and such a ZIP can be uploaded again to create a new backup elsewhere -- e.g. to move a backup to a different host, or keep an offline copy. Onlyevcc.yaml/evcc.dbare imported as backup content;meta.jsonsupplies the new backup's name/ description but isn't stored as-is, and the combined view is ignored on import. - Stopped instances: Supervisor removes an add-on's container
entirely when it's stopped, so there's nothing for
docker_apito read/ write directly. For that case, evcc BaRe creates its own throwaway helper container bind-mounting the exact host directories Supervisor itself uses for that instance -- since it already holds the Docker socket, it can hand dockerd any host path as a mount source for a container it creates, sidestepping Supervisor'smap:allow-list entirely (which has no entry for another add-on's private/dataat all). This gives full read/write access to bothevcc.yamlandevcc.dbeven with zero existing container -- restore then asks Supervisor to (re)create and start it. See DOCS.md for the one genuine limit (aevcc.dbthat's never existed at all).
One evcc BaRe instance manages every evcc instance installed on the same host -- install it separately on each host where you want this, same as you would with controlbox-emulator or mgcp-meter-bridge.
📦 Installation
Add an add-on repository in Home Assistant Supervisor pointing at either:
https://opencommit.eu/HWE70/evcc-bare-- works from anywhere.https://git.highwire.de/HWE70/evcc-bare-- only reachable from inside that Forgejo instance's own home network (its public DNS record resolves to a private address), but otherwise identical.
Then install evcc BaRe and start it -- it discovers installed evcc
instances on its own. The evcc_slug option only sets which instance is
preselected.
Development happens on git.highwire.de; OpenCommit is a public push mirror of it, kept in sync automatically on every push, never written to directly. The add-on's own build step tries git.highwire.de first and falls back to OpenCommit automatically, so it builds either way regardless of which of the two URLs above Supervisor was pointed at (confirmed live 2026-08-08: without this fallback, a Home Assistant Green outside the home network failed with "Could not resolve host" during the build, even though the repository itself had been added via the Codeberg URL -- the mirror moved from Codeberg to OpenCommit on 2026-08-11).
See deploy/hassio/DOCS.md for all options.
🛠️ Development
# Backend
go build ./...
# Frontend (must be built before `go build .` at the repo root, since
# main.go embeds frontend/dist)
cd frontend && npm install && npm run build
deploy/hassio/ contains the add-on manifest/Dockerfile/run.sh; it
builds by cloning this repo's own git ref (see the Dockerfile), since
Supervisor's git-repo add-on build context is limited to that subfolder.