Real-time site coordination
Keep the grid meter near target while solar, storage and charging respond as one system.
PI · slew · dispatch
Apache-2.0 · Self-hosted · Community 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
SQLite telemetry and compressed Parquet rolloff keep detailed energy data under operator control.
SQLite · Parquet
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, modify it and use it commercially under Apache-2.0. Development happens in public and Sourceful Energy maintains the core together with project contributors.
FTW Community comes without official support, warranty, response times or service-level commitments. Help is best-effort from other users and maintainers.
Add a device, reproduce a hardware edge case, improve the planner or sharpen the docs. Open an issue before a large change, then build in public.
For organizations
Apache-2.0 already gives you permission to use the Community code. A Sourceful engagement buys delivery ownership, additional capabilities and an accountable support relationship.
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
Install it. Read it. Break it safely. Send the fix upstream.