No description
  • Go 62.4%
  • Vue 17%
  • TypeScript 8.1%
  • CSS 6.1%
  • Dockerfile 3.2%
  • Other 3.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
HWE70 73f85dc968 Pull pre-built images instead of building the add-on on the device
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>
2026-08-22 00:37:29 +02:00
api Warn on restore if target's config_file/sqlite_file options are wrong (v0.5.1) 2026-08-08 22:17:48 +02:00
deploy/hassio Pull pre-built images instead of building the add-on on the device 2026-08-22 00:37:29 +02:00
dockerapi Add helper-container fallback for fully-removed evcc containers 2026-08-08 00:34:38 +02:00
evccview Rename project to evcc BaRE, stream restore + backup progress live 2026-08-08 08:27:52 +02:00
frontend Add backup export/import as ZIP (v0.5.0) 2026-08-08 19:24:39 +02:00
store Add backup export/import as ZIP (v0.5.0) 2026-08-08 19:24:39 +02:00
supervisorapi Warn on restore if target's config_file/sqlite_file options are wrong (v0.5.1) 2026-08-08 22:17:48 +02:00
.gitignore Fix display name capitalization: evcc BaRe, not evcc BaRE 2026-08-08 09:47:15 +02:00
go.mod Rename project to evcc BaRE, stream restore + backup progress live 2026-08-08 08:27:52 +02:00
go.sum Initial implementation: backup/name/describe/restore evcc config via Docker Engine API 2026-08-07 22:53:43 +02:00
LICENSE Initial commit 2026-08-07 20:29:34 +00:00
main.go Rename project to evcc BaRE, stream restore + backup progress live 2026-08-08 08:27:52 +02:00
README.md Move public mirror from Codeberg to OpenCommit, add AI-assistance notice 2026-08-11 23:43:04 +02:00
repository.json Move public mirror from Codeberg to OpenCommit, add AI-assistance notice 2026-08-11 23:43:04 +02:00
staticfiles.go Initial implementation: backup/name/describe/restore evcc config via Docker Engine API 2026-08-07 22:53:43 +02:00

💾 evcc BaRe

License: MIT AI-assisted

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) and evcc.db straight out of the evcc container via CopyFromContainer, 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.yaml content plus the database-managed devices/settings, decoded from evcc's configs/settings tables, each half marked with a # Quelle: ... comment naming where it came from) both as an in-app popup and into Supervisor's shared /share folder 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.db back 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. Only evcc.yaml/evcc.db are imported as backup content; meta.json supplies 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_api to 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's map: allow-list entirely (which has no entry for another add-on's private /data at all). This gives full read/write access to both evcc.yaml and evcc.db even with zero existing container -- restore then asks Supervisor to (re)create and start it. See DOCS.md for the one genuine limit (a evcc.db that'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.