Your home's energy, planned to cost less.
FTW runs on a small computer in your home. It plans your battery, car charging and solar around electricity prices and the weather, then runs them. Control stays on your home network, so your home keeps running when the internet is down.
-
Home Assistant: add the FTW repository, then install FTW (beta), start it and choose Open Web UI. Step by step
-
A Linux computer: run this line on it, then open the address it prints. Step by step
curl -fsSL https://ftw.energy/install.sh | bash -s -- --fresh-host -
Runs on Home Assistant or any 64-bit Linux computer: a Raspberry Pi 3 or newer, a mini PC, an old laptop.
-
You need supported equipment on your home network and a computer that stays on. Look for yours in the device catalog.
-
The app: FTW Energy for iPhone shows your home once FTW runs there. Android is coming.
Have you run FTW before? Start here instead.
The dashboard every install gets, here with simulated devices.
Website · Try the demo · Discord
FTW should make mixed equipment simple to live with: useful first-day planning, reliable daily charging, fast and honest live feedback, and structured access for agents. The default experience should need few choices while keeping expert controls and Lua drivers available.
VISION.md is the product direction set by Fredrik. docs/roadmap.md lists the outcomes and proof needed. These include goals that have not shipped; the capability list below is separate.
Sourceful Energy maintains FTW Community under AGPL-3.0-only with the Energyplan combination permission. Contributions are welcome, preferably starting with issues. Share a short Markdown proposal or a focused fix with relevant test evidence. See CONTRIBUTING.md. Community help is best effort; SUPPORT.md describes separate commercial services.
Join the FTW Discord for questions and community discussions.
The FTW Energy app for iPhone and Apple Watch is free in the App Store. To test new app versions first, ask in Discord to join the beta.
See project statistics for public development activity and anonymous usage totals.
FTW is a local-first home energy management system (EMS). It coordinates solar, batteries, grid power, EV charging and thermal assets on a Raspberry Pi or Linux host. The safety-critical runtime is one Go binary, hardware integrations are sandboxed Lua drivers, and a compiled Energyplan worker handles long-horizon planning.
The control path stays on the local network. Cloud price, weather and device integrations degrade independently; they are not required for safe local operation.
FTW has three explicit modules:
- Core owns configuration, telemetry, state, safety, dispatch, API and UI.
- Drivers translate vendor protocols and power signs in isolated Lua VMs.
- Optimizer proposes plans over a versioned contract; core validates every result and keeps a Go fallback.
Drivers and the optimizer can evolve without moving safety authority out of Core. A new module needs a concrete reason and must reduce the complexity of the whole product. See docs/architecture.md.
- self-consumption, peak shaving and explicit grid targets;
- multi-battery allocation with fuse, SoC, slew and stale-data protection;
- price-, weather-, PV- and load-aware planning;
- EV charging, V2X and thermal planning;
- local web UI, with history and configuration in SQLite;
- Home Assistant MQTT discovery;
- hot-reloadable, independently released Lua drivers;
- a built-in OCPP 1.6J + 2.0.1 server, so OCPP chargers connect with no driver.
The local catalog is generated from DRIVER metadata. The public
srcfl/device-drivers repo is the
editable source and FTW's default signed driver channel.
This repository holds no driver source. drivers/*.lua is gitignored and
fetched with make drivers at the commit pinned in
drivers/BUNDLED_SOURCE.json. Fix a driver
upstream and move the pin; see
The bundled pin.
Requirements are Go and Node.js. Python 3 verifies release artifacts during development; no Python interpreter or service runs the planner.
git clone https://github.com/srcfl/ftw.git
cd ftw
make devUseful checks:
make test # Go tests
npm test # web
make verify # fast test, compose, vet and build checks
make e2e # simulator-backed full stack
make ci # e2e, builds and browser smokeSee docs/development.md for the small set of development workflows.
config.example.yaml and the validation types in
go/internal/config are the configuration reference. Copy the example for a native development setup:
cp config.local.example.yaml config.local.yamlPower values above a driver use one convention: positive means into the site, negative means out. Drivers alone translate vendor conventions. Read docs/site-convention.md before editing power math or writing a driver.
Drivers are plain Lua files and need no compilation. A driver declares its catalog metadata, lifecycle and required capabilities in one file. The Go host provides capability-scoped Modbus, MQTT, serial, HTTP, WebSocket and TCP access.
Which devices are covered, and on what evidence, is published as a searchable
catalog: Device driver catalog.
It is generated from srcfl/device-drivers on every push to that repository's
main, so the versions, tested models and per-target status it shows are the
ones FTW installs. Listing is not an install claim: the page states which
drivers have been confirmed against physical hardware and which have not.
Start with docs/writing-a-driver.md. Send shared
driver changes to srcfl/device-drivers. That repo publishes one signed,
content-addressed asset per driver and version. FTW downloads only the chosen
driver, which can update or roll back without a new FTW core release. Device
Support may consume the same public source later for other products or a higher
support level.
EV chargers that speak OCPP are the exception: they need no driver. FTW runs an OCPP Central System (1.6J and 2.0.1), so the charger connects and registers itself. See docs/ocpp.md.
There are two channels:
- beta receives every merged change in the next beta, aiming for one a week;
- stable promotes the exact commit already published and tested as beta.
There is no edge channel. Beta is the shared playground: run it on a real
site and report what you find as an issue naming the beta version you saw it
on. An issue marked release-blocker stops that line from promoting. A beta
promotes to stable after a week on the home box and at least one other real
site with no open release-blocker.
Changesets produce versions and changelog entries; the native release
workflow builds the checksummed Linux packages that the installer, ftw update and the Docker files use. The repository owner cuts every release.
Details for operators are in docs/self-update.md; the
maintainer rules are in the Releases section of AGENTS.md.
The repository deliberately keeps prose small. Code, types, tests and driver metadata are the detailed reference.
- Install FTW
- Have you run FTW before?
- Install and update FTW: every path and command
- Architecture
- Product roadmap
- Power sign convention
- Safety invariants
- Operations and recovery
- Full backup and safe restore
- Writing a driver
- Device driver catalog — every supported device and the evidence behind it
- OCPP chargers (no driver needed)
- Self-update and release channels
- Status of old Docker upgrades
- Home Assistant
Other files under docs/ are focused installation or
external-integration guides.
FTW spans several repositories. This one is Core; the others are:
| Repository | Role |
|---|---|
srcfl/device-drivers |
Lua driver source, contracts, tests and the signed driver bundle Core pins. Change drivers there. |
srcfl/device-simulator |
Simulated house: inverters, batteries, chargers and meters over Modbus TCP, MQTT and OCPP. |
srcfl/ftw-webapp (private) |
Installable everyday client at app.ftw.energy, closed source since 10 November 2026. Earlier open versions are in srcfl/ftw-webapp-source-archive. |
srcfl/ftw-app (private) |
Native iOS and Android app, closed source since 10 November 2026. Earlier open versions are in srcfl/ftw-app-source-archive. |
srcfl/ftw-cloud (private) |
FTW Cloud: carries the apps' encrypted sessions with the box and, while Cloud is on, keeps a box-signed, readable copy of each home's state. Closed source since 10 November 2026. |
srcfl/home-assistant-addons |
Home Assistant app packaging of each FTW release. |
srcfl/ftw-web |
The project website. |
srcfl/energyplan-demo |
Browser demo running the Energyplan worker in WebAssembly against a simulated home. |
The Energyplan solver source is private; Core receives only its compiled worker and public integration metadata.
Read CONTRIBUTING.md. User-visible changes need a Changeset.
AGPL-3.0-only with the Energyplan combination permission — see LICENSE and LICENSING.md. Energyplan binaries have separate household-use terms; commercial use of those binaries needs a Sourceful agreement. Earlier versions retain their earlier licenses.
