Real-time site coordination
Keep the grid meter near target while solar, storage and charging respond as one system.
PI · slew · dispatch
AGPLv3 · Self-hosted · Sourceful maintained
FTW is a local-first home energy management system for solar, batteries, grid and EV charging. Run it on your own hardware, inspect every decision and teach it new devices in Lua.
Get running
curl -fsSL https://raw.githubusercontent.com/srcfl/ftw/master/scripts/install.sh | bash
Architecture
Vendor apps optimize one device at a time. FTW treats the whole site as one energy system and keeps the fast control path on your Raspberry Pi or Linux host.
Signals in
Coordinated out
Site convention Above the driver boundary, positive power means energy flowing into the site. Every device speaks the same language.
Read the architectureInside FTW
Keep the grid meter near target while solar, storage and charging respond as one system.
PI · slew · dispatch
Plan around spot prices, weather, household load, PV production and battery state.
MPC · 48 h horizon
Local PV, load, price and battery models adapt to the home instead of assuming every site is alike.
RLS · ARX · twins
Watchdogs, fuse limits and stale-meter protection return hardware to safe autonomous modes.
fallbacks · clamps
Detailed energy history stays on the box, with storage and recovery managed by FTW Core.
Local history · Core
Use the HTTP API, Home Assistant MQTT discovery and Lua drivers to connect the rest of your home.
HTTP · MQTT · Lua
Build with it
FTW drivers are plain Lua files with capability-scoped access to Modbus, MQTT, HTTP, WebSocket and TCP. Edit a driver on the Pi and reload it without rebuilding the Go runtime.
function driver_init(config)
host.set_make("My Inverter")
host.mqtt_subscribe(config.topic)
end
function driver_poll()
local watts = read_power()
host.emit("battery", {
power_w = watts,
soc = read_soc()
})
return 1000
end
The community edition
Run FTW at home, study it and modify it. FTW's open-source code uses AGPLv3 with a narrow Energyplan exception. Share covered source when the license requires it. The proprietary Energyplan worker permits unmodified use with FTW only for your own private household. Free, noncommercial redistribution with FTW is allowed only for that household use, with its license and notices. Other use or distribution, including commercial use and operation for others, requires a separate written Sourceful license. Sourceful Energy develops and maintains FTW. Contributions are welcome: start with an issue, share a short Markdown proposal or send a focused PR with relevant test evidence.
FTW Community comes without official support, warranty, response times or service-level commitments. Help is best-effort from other users and maintainers.
Report a need, share a Markdown proposal or send a tested fix. Prefer an issue as the starting point. Our agentic-first approach uses clear problems and reproducible results that people and agents can review. Hardware claims need hardware evidence.
For organizations
AGPLv3 permits commercial use of the covered FTW code under its source-sharing terms. Commercial Energyplan use, OEM bundles and paid services involving the worker require a separate Sourceful license. Sourceful also offers deployment, maintenance and support.
Talk to SourcefulSupported deploymentsArchitecture, commissioning, upgrades and operational handover.
Integrations + OEMCustom hardware, certification, white-label and product delivery.
Fleet operationsProvisioning, observability and managed multi-site boundaries.
Long-term supportDefined maintenance, security handling, response times and SLA.
FTW Community
Run it. Explore it. Tell us what would make it better.