Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ftw
command
ftw — Home Energy Management System.
|
ftw — Home Energy Management System. |
|
ftw-backup
command
ftw-backup creates, verifies, inspects and restores portable FTW backups.
|
ftw-backup creates, verifies, inspects and restores portable FTW backups. |
|
ftw-cli
command
Command ftw-cli is installed on PATH as `ftw`, the operator command for a native install.
|
Command ftw-cli is installed on PATH as `ftw`, the operator command for a native install. |
|
ftw-driver-repository
command
ftw-driver-repository builds, signs, and verifies the independently published Lua-driver catalog sourced from this monorepo.
|
ftw-driver-repository builds, signs, and verifies the independently published Lua-driver catalog sourced from this monorepo. |
|
ftw-forecast-evaluate
command
ftw-forecast-evaluate reads the bounded forecast archive and prints a causal JSON score report.
|
ftw-forecast-evaluate reads the bounded forecast archive and prints a causal JSON score report. |
|
ftw-launcher
command
|
|
|
sim-ferroamp
command
sim-ferroamp: embedded MQTT broker + realistic Ferroamp EnergyHub simulator.
|
sim-ferroamp: embedded MQTT broker + realistic Ferroamp EnergyHub simulator. |
|
sim-ferroamp/ferroamp
Package ferroamp contains the physical-ish simulation of a Ferroamp EnergyHub + ESO battery + SSO solar strings.
|
Package ferroamp contains the physical-ish simulation of a Ferroamp EnergyHub + ESO battery + SSO solar strings. |
|
sim-ocpp
command
sim-ocpp: OCPP 1.6J / 2.0.1 charge-point simulator for Evify's in-stock home chargers.
|
sim-ocpp: OCPP 1.6J / 2.0.1 charge-point simulator for Evify's in-stock home chargers. |
|
sim-ocpp/ocppcp
Package ocppcp is an OCPP charge-point simulator.
|
Package ocppcp is an OCPP charge-point simulator. |
|
sim-pcs
command
sim-pcs: Modbus TCP server simulating a multi-rack commercial battery plant.
|
sim-pcs: Modbus TCP server simulating a multi-rack commercial battery plant. |
|
sim-pcs/pcs
Package pcs simulates a multi-rack commercial battery plant: N PCS/rack units, each an independent Modbus unit ID with its own SoC, power lag, and injectable faults.
|
Package pcs simulates a multi-rack commercial battery plant: N PCS/rack units, each an independent Modbus unit ID with its own SoC, power lag, and injectable faults. |
|
sim-sungrow
command
sim-sungrow: Modbus TCP server simulating a Sungrow SH-series hybrid inverter.
|
sim-sungrow: Modbus TCP server simulating a Sungrow SH-series hybrid inverter. |
|
sim-sungrow/sungrow
Package sungrow contains the Sungrow SH-series physics simulation.
|
Package sungrow contains the Sungrow SH-series physics simulation. |
|
internal
|
|
|
api
Package api is the HTTP surface for FTW: control endpoints, telemetry queries, config get/set, battery-model introspection, self-tune orchestration, static file serving for the web UI.
|
Package api is the HTTP surface for FTW: control endpoints, telemetry queries, config get/set, battery-model introspection, self-tune orchestration, static file serving for the web UI. |
|
apiauth
Package apiauth says who is asking the box's HTTP API for something.
|
Package apiauth says who is asking the box's HTTP API for something. |
|
appenroll
Package appenroll owns the box's half of app enrollment: the long-lived keys behind the QR code on the lid, and the record of which phones have been let in.
|
Package appenroll owns the box's half of app enrollment: the long-lived keys behind the QR code on the lid, and the record of which phones have been let in. |
|
appenroll/approvaltest
Package approvaltest signs approvals the way an owner phone's Secure Enclave key does, for tests of the box's side.
|
Package approvaltest signs approvals the way an owner phone's Secure Enclave key does, for tests of the box's side. |
|
appproto
Package appproto speaks the FTW web app's client protocol.
|
Package appproto speaks the FTW web app's client protocol. |
|
appproto/gencontract
Package gencontract turns contract/registry.yaml into Go constants.
|
Package gencontract turns contract/registry.yaml into Go constants. |
|
appproto/gencontract/cmd
command
Command gencontract writes the Go constants for contract/registry.yaml.
|
Command gencontract writes the Go constants for contract/registry.yaml. |
|
appuplink
Package appuplink serves the encrypted app sessions FTW Cloud carries: a phone's stream through the tunnel and a watch's exchange.
|
Package appuplink serves the encrypted app sessions FTW Cloud carries: a phone's stream through the tunnel and a watch's exchange. |
|
arp
Package arp resolves MAC addresses for IPv4 hosts on the local L2 segment.
|
Package arp resolves MAC addresses for IPv4 hosts on the local L2 segment. |
|
backup
Package backup creates and restores complete, portable FTW backups.
|
Package backup creates and restores complete, portable FTW backups. |
|
battery
Package battery is per-battery online learning (ARX(1) via RLS) plus the cascade controller glue (inner PI + inverse model + saturation curves).
|
Package battery is per-battery online learning (ARX(1) via RLS) plus the cascade controller glue (inner PI + inverse model + saturation curves). |
|
batteryreturn
Package batteryreturn works out the figure a Swedish household reports to Skatteverket to get back the energy tax on electricity it bought from the grid, stored in a battery and fed back to the same grid (11 kap.
|
Package batteryreturn works out the figure a Swedish household reports to Skatteverket to get back the energy tax on electricity it bought from the grid, stored in a battery and fed back to the same grid (11 kap. |
|
cars
Package cars keeps the cars of a box's owners apart from its chargers (docs/cars.md).
|
Package cars keeps the cars of a box's owners apart from its chargers (docs/cars.md). |
|
cloudlink
Package cloudlink is the box's one link to FTW Cloud.
|
Package cloudlink is the box's one link to FTW Cloud. |
|
components
Package components defines compatibility contracts for independently released FTW modules.
|
Package components defines compatibility contracts for independently released FTW modules. |
|
config
Package config parses and validates the top-level YAML config.
|
Package config parses and validates the top-level YAML config. |
|
configreload
Package configreload applies committed settings to the running system.
|
Package configreload applies committed settings to the running system. |
|
control
Package control is the site's closed-loop control system.
|
Package control is the site's closed-loop control system. |
|
coverage
Package coverage records where each external data source FTW talks to actually returns usable data.
|
Package coverage records where each external data source FTW talks to actually returns usable data. |
|
currency
Package currency fetches daily FX reference rates from the European Central Bank and caches them in state for offline lookup.
|
Package currency fetches daily FX reference rates from the European Central Bank and caches them in state for offline lookup. |
|
devtools
Package devtools hosts developer-only utilities that ship inside the main FTW binary but stay dormant unless explicitly invoked (e.g.
|
Package devtools hosts developer-only utilities that ship inside the main FTW binary but stay dormant unless explicitly invoked (e.g. |
|
drivercontrol
Package drivercontrol owns what is held on a driver: one bounded value at a time, sent and released under one per-driver lock, and handed back to the device's own default when it ends.
|
Package drivercontrol owns what is held on a driver: one bounded value at a time, sent and released under one per-driver lock, and handed back to the device's own default when it ends. |
|
driverinventory
Package driverinventory builds a bounded, secret-free snapshot of the Lua code that FTW has configured and loaded.
|
Package driverinventory builds a bounded, secret-free snapshot of the Lua code that FTW has configured and loaded. |
|
driverrepo
Package driverrepo installs signed, independently versioned Lua drivers.
|
Package driverrepo installs signed, independently versioned Lua drivers. |
|
drivers
Lua driver host.
|
Lua driver host. |
|
energyforecast
Package energyforecast adapts Core's observations and issued weather to the versioned Energyplan forecast worker.
|
Package energyforecast adapts Core's observations and issued weather to the versioned Energyplan forecast worker. |
|
energyreport
Package energyreport sends one energy report a day, with no box id, straight to FTW Cloud.
|
Package energyreport sends one energy report a day, with no box id, straight to FTW Cloud. |
|
events
Package events is a tiny synchronous pub/sub bus used to decouple core loops (control tick, API handlers, watchdog) from cross-cutting subscribers (notifications, future webhooks, future audit log).
|
Package events is a tiny synchronous pub/sub bus used to decouple core loops (control tick, API handlers, watchdog) from cross-cutting subscribers (notifications, future webhooks, future audit log). |
|
fleetping
Package fleetping adds anonymous reports to FTW's daily fleet totals without telling the relay which box sent which report.
|
Package fleetping adds anonymous reports to FTW's daily fleet totals without telling the relay which box sent which report. |
|
fleetping/genshipped
Package genshipped turns drivers/BUNDLED_SOURCE.json into the driver names this build ships with.
|
Package genshipped turns drivers/BUNDLED_SOURCE.json into the driver names this build ships with. |
|
fleetping/genshipped/cmd
command
Command genshipped writes the driver names drivers/BUNDLED_SOURCE.json pins.
|
Command genshipped writes the driver names drivers/BUNDLED_SOURCE.json pins. |
|
forecast
Package forecast fetches hourly weather + derives a PV production estimate for the next ~48 hours.
|
Package forecast fetches hourly weather + derives a PV production estimate for the next ~48 hours. |
|
forecasting
Package forecasting defines portable forecast records and causal evaluation.
|
Package forecasting defines portable forecast records and causal evaluation. |
|
ftwcli
Package ftwcli is the ftw operator command for a native install.
|
Package ftwcli is the ftw operator command for a native install. |
|
gatewayidentity
Package gatewayidentity defines FTW's one gateway identity contract.
|
Package gatewayidentity defines FTW's one gateway identity contract. |
|
gridcost
Package gridcost contains the shared import/export pricing model used by planner decisions, plan reporting, and historical savings calculations.
|
Package gridcost contains the shared import/export pricing model used by planner decisions, plan reporting, and historical savings calculations. |
|
gridstate
Package gridstate tells whether the site is on the grid or islanded, from what its inverters report (#2125).
|
Package gridstate tells whether the site is on the grid or islanded, from what its inverters report (#2125). |
|
ha
Package ha is the Home Assistant MQTT bridge: MQTT autodiscovery + periodic state publish + command subscriber for mode/target/peak/ev.
|
Package ha is the Home Assistant MQTT bridge: MQTT autodiscovery + periodic state publish + command subscriber for mode/target/peak/ev. |
|
heatplan
Package heatplan proposes when a heated zone should take its heat.
|
Package heatplan proposes when a heated zone should take its heat. |
|
journal
Package journal records how the box's answer to "Are we in control?" changes, so a warning can be explained after it has passed.
|
Package journal records how the box's answer to "Are we in control?" changes, so a warning can be explained after it has passed. |
|
loadmodel
Package loadmodel maintains the existing local household-load predictor.
|
Package loadmodel maintains the existing local household-load predictor. |
|
loadpoint
Package loadpoint models an EV charge point as a first-class entity the planner can reason about.
|
Package loadpoint models an EV charge point as a first-class entity the planner can reason about. |
|
localzone
Package localzone keeps the household's clock: the zone every wall-clock rule reads, and its name for clients.
|
Package localzone keeps the household's clock: the zone every wall-clock rule reads, and its name for clients. |
|
mdnsresolve
Package mdnsresolve resolves RFC 6762 ".local" host names for outbound connections, and provides a dialer that uses it.
|
Package mdnsresolve resolves RFC 6762 ".local" host names for outbound connections, and provides a dialer that uses it. |
|
modbus
Package modbus provides a Modbus TCP capability wrapper for drivers.
|
Package modbus provides a Modbus TCP capability wrapper for drivers. |
|
modelstate
Package modelstate versions the learned-model state FTW keeps on disk.
|
Package modelstate versions the learned-model state FTW keeps on disk. |
|
mpc
Package mpc is a receding-horizon energy scheduler.
|
Package mpc is a receding-horizon energy scheduler. |
|
mqtt
Package mqtt provides an MQTT capability wrapper for per-driver binding.
|
Package mqtt provides an MQTT capability wrapper for per-driver binding. |
|
notifications
Package notifications delivers operator-facing push notifications via a pluggable provider (ntfy today; future providers register via RegisterProvider).
|
Package notifications delivers operator-facing push notifications via a pluggable provider (ntfy today; future providers register via RegisterProvider). |
|
nova
Package nova is the opt-in federation client that publishes FTW telemetry into Sourceful's Nova Core backend.
|
Package nova is the opt-in federation client that publishes FTW telemetry into Sourceful's Nova Core backend. |
|
ocpp
Package ocpp is the OCPP Central System for FTW, speaking 1.6J and 2.0.1.
|
Package ocpp is the OCPP Central System for FTW, speaking 1.6J and 2.0.1. |
|
ocpp/chargersocket
Package chargersocket is the WebSocket client every simulated or test charger in this module dials Core with.
|
Package chargersocket is the WebSocket client every simulated or test charger in this module dials Core with. |
|
onboarding
Package onboarding keeps an unfinished setup on the box.
|
Package onboarding keeps an unfinished setup on the box. |
|
optimizercontract
Package optimizercontract holds stable values shared by Core's configuration and optimizer wire protocol.
|
Package optimizercontract holds stable values shared by Core's configuration and optimizer wire protocol. |
|
prices
Package prices fetches spot electricity prices from external providers and persists them to the state DB.
|
Package prices fetches spot electricity prices from external providers and persists them to the state DB. |
|
proxy
Package proxy implements an optional dev-mode reverse proxy for the HTTP handler.
|
Package proxy implements an optional dev-mode reverse proxy for the HTTP handler. |
|
pvmodel
Package pvmodel is a self-learning digital twin for a PV array.
|
Package pvmodel is a self-learning digital twin for a PV array. |
|
redact
Package redact builds what an agent may read of the box's logs and configuration (docs/agents.md, Redaction on the box).
|
Package redact builds what an agent may read of the box's logs and configuration (docs/agents.md, Redaction on the box). |
|
savings
Package savings reconstructs how much money the EMS optimizer saved on a given historical day, by re-pricing the measured grid flow with the same cost model the live MPC planner uses (mpc.SlotGridCostOre) and comparing it to a no-battery counter-factual.
|
Package savings reconstructs how much money the EMS optimizer saved on a given historical day, by re-pricing the measured grid flow with the same cost model the live MPC planner uses (mpc.SlotGridCostOre) and comparing it to a no-battery counter-factual. |
|
scanner
Package scanner discovers devices on the local network by TCP-dialing common energy-device ports (Modbus 502, MQTT 1883, HTTP 80, HTTPS 8443) across all /24 subnets attached to non-loopback, non-virtual interfaces.
|
Package scanner discovers devices on the local network by TCP-dialing common energy-device ports (Modbus 502, MQTT 1883, HTTP 80, HTTPS 8443) across all /24 subnets attached to non-loopback, non-virtual interfaces. |
|
selftune
Package selftune is the per-battery step-response calibration flow.
|
Package selftune is the per-battery step-response calibration flow. |
|
selfupdate
Package selfupdate resolves the stable and beta 0.x releases a native install can take, and stages a verified release package in its slots (ADR 0007).
|
Package selfupdate resolves the stable and beta 0.x releases a native install can take, and stages a verified release package in its slots (ADR 0007). |
|
sitepower
Package sitepower is the site-boundary power identity used by charging policy tests and (later) by planner/dispatch.
|
Package sitepower is the site-boundary power identity used by charging policy tests and (later) by planner/dispatch. |
|
sitesim
Package sitesim is a simulated house behind one main fuse, for testing Core in a closed loop.
|
Package sitesim is a simulated house behind one main fuse, for testing Core in a closed loop. |
|
state
Package state — heal.go: SQLite integrity gate + corruption recovery.
|
Package state — heal.go: SQLite integrity gate + corruption recovery. |
|
statsrelay
Package statsrelay posts the box's daily reports, each alone.
|
Package statsrelay posts the box's daily reports, each alone. |
|
statsrelay/statsrelaytest
Package statsrelaytest is a fake FTW Cloud energy route, and a fake relay and gateway, for tests.
|
Package statsrelaytest is a fake FTW Cloud energy route, and a fake relay and gateway, for tests. |
|
sunpos
Package sunpos computes solar position (zenith/azimuth) and plane-of-array irradiance for arbitrary panel orientations.
|
Package sunpos computes solar position (zenith/azimuth) and plane-of-array irradiance for arbitrary panel orientations. |
|
telemetry
Package telemetry is the central DER data store plus per-signal Kalman smoothing and per-driver health tracking.
|
Package telemetry is the central DER data store plus per-signal Kalman smoothing and per-driver health tracking. |
|
thermal
Package thermal is the vocabulary heat controls are declared in: which heat store an asset is, and which lever a driver offers on it.
|
Package thermal is the vocabulary heat controls are declared in: which heat store an asset is, and which lever a driver offers on it. |
|
thermaltwin
Package thermaltwin learns how a heated zone behaves, in shadow.
|
Package thermaltwin learns how a heated zone behaves, in shadow. |
|
units
Package units is the source of truth for physical quantities in FTW core.
|
Package units is the source of truth for physical quantities in FTW core. |
|
v2x
Package v2x evaluates the operator policy envelope for bidirectional EV chargers.
|
Package v2x evaluates the operator policy envelope for bidirectional EV chargers. |
|
protocol
module
|
|
|
test
|
|
|
fixtures/measurement-api
command
measurement-api serves the real Core read handlers with synthetic telemetry and temporary SQLite data for the paired Cloud MCP integration tests.
|
measurement-api serves the real Core read handlers with synthetic telemetry and temporary SQLite data for the paired Cloud MCP integration tests. |
|
site/runner
command
siterig-runner runs FTW's site test (go/test/site) on a machine of its own and publishes the result as a GitHub commit status on the exact commit: siterig/full on each new master commit, siterig/short on the head of each open pull request that touches code on the control path (watchedPaths), and siterig/random for a night's random seeds.
|
siterig-runner runs FTW's site test (go/test/site) on a machine of its own and publishes the result as a GitHub commit status on the exact commit: siterig/full on each new master commit, siterig/short on the head of each open pull request that touches code on the control path (watchedPaths), and siterig/random for a night's random seeds. |
Click to show internal directories.
Click to hide internal directories.