One house, one control plane.
Home Assistant handles the house-wide state, while TightWatt turns live battery, solar, demand and half-hourly Agile prices into safe charger decisions. Together they connect useful conveniences, energy optimisation, security, recovery and hardware protection without pretending every decision has the same importance.
How the house becomes useful
Purple is observation, teal is reasoning, amber is an action in the physical house, and red marks the recovery and protection paths that are deliberately kept separate from convenience.
The control plane is intentionally broader than “smart-home” scenes: energy optimisation, inferred appliance state, contextual security, self-healing infrastructure and configuration management all use the same state model, but critical battery protection keeps an independent hardware backstop.
How the house thinks
The house works in layers: MQTT, integrations and power monitors provide telemetry; automations turn it into decisions; switches, scenes and notifications act on them; watchdogs and independent safety tiers recover when a feed or device disappears. The interesting part is not any single rule, but how those layers fail safely together.
Data in
The battery BMS talks serially to dbus-serialbattery, which publishes SoC, pack voltage, per-cell min/max and current into the VenusOS D-Bus; VenusOS over MQTT then streams that telemetry from the battery shed. Octopus Energy supplies half-hourly Agile pricing, while power-monitoring smart plugs turn raw wattage into appliance state: the house knows the kettle has boiled, the washing machine has run and the air fryer is on without any of them being “smart”.
Decisions out
TightWatt 4.0 beta drives the 40 A battery charger from a cutover-aligned demand forecast, ranked Agile events and a probability-weighted reserve for air conditioning, dishwasher and washing-machine use. Other flexible-load automations still respond to cheap and negative rates independently. Presence from phone trackers arms cameras and security scenes when the last person leaves, and stands them down on arrival.
Design decision: watchdogs over uptime hopes
The failure mode that matters isn't a light not turning on — it's the battery telemetry going quiet while automations keep acting on stale data. So the Victron feed gets a 30-second MQTT keep-alive, and two independent watchdogs power-cycle the VenusOS Pi through a smart plug if the battery load sensor goes stale or unavailable for five minutes. The router gets the same treatment when the WAN drops for one minute. Trade-off: a hard power-cycle is blunt, but it's autonomous — and it turns a 2 a.m. outage into a log entry instead of an incident.
Design decision: tiered battery protection
Battery protection remains layered so no single automation is a point of failure. TightWatt 4.0 requires valid SoC, minimum-cell and temperature signals, blocks cold charging with a resume margin, imposes hard session and cooldown limits, and can emergency-charge from 2.9 V per cell or below 10% SoC at any tariff price. Independent warning and recovery automations remain in place, and the BMS is still the final hardware backstop.
AI where it earns its place
Camera motion events are summarised by a vision LLM into one-line notifications — who or what moved, not "motion detected". And the HA configuration itself syncs into a Claude workspace every 15 minutes, with a separate dev area and a manual deploy step back into the live config: version-controlled, AI-assisted config management with a human gate on production. LLM VisionClaude workflow
Cheap power is only useful when the battery actually needs it.
Every meaningful event rebuilds the charging horizon, ranks real half-hour slots and then lets protection gates overrule the economic plan.
Calculate the real need
Target plus base and likely loads, minus stored energy and forecast solar, aligned to the next cutover.
Rank usable slots
Negative slots first, then price order, with enough real time reserved for hard-session cooldowns.
Replan and veto
Tariff, charger, PV, export and battery changes trigger a fresh decision instead of waiting for a fixed schedule.
Safety wins
Bad sensors, cold chemistry, session limits, minimum cell and SoC rules decide whether charging may happen.
Watch the controller change its mind
A representative Agile day: each half-hour price, the cutover boundary and whether TightWatt held, bought energy or vetoed a charge as the plan moved.
This replay needs JavaScript. The decision ladder above tells the same story.
Representative system views
These privacy-safe recreations use entirely illustrative data. They communicate the shape of the real controls, energy planning and solar analysis without exposing household names, devices or live state.
Favourite little automations
Appliance state from power draw
Kettle >1500 W sets a "boiled" helper; if nobody enters the kitchen within three minutes, the phone gets a nudge. Same pattern infers washing-machine and air-fryer state. Dumb appliances, smart house.
Negative-price harvesting
When Agile goes negative, all flexible loads switch on in one action — charger, dehumidifiers, airers — and switch back off the moment the rate turns positive.
Security that resets itself
Red-alert lighting scenes trigger on person detection while the house is empty — and automatically stand down and restore normal motion lighting when a known phone arrives home.
Everything degrades gracefully
Motion lighting has manual-override modes with a nightly reset, so a party never fights the automation — and the automation always wins the morning after.