Home Assistant + TightWatt

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.

91
Automations in production
30s
Victron telemetry keep-alive interval
48
Agile price slots ranked by TightWatt each day
3
Tiers of battery protection before anything fails
Follow the signals

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.

TwoWaters Home Assistant architecture Battery telemetry, electricity prices, power monitors, sensors, presence and cameras feed Home Assistant. Four automation domains make energy, household, security and resilience decisions. Commands reach chargers, appliances, cameras and recovery switches, while state feeds back into the next automation pass. ENERGY TELEMETRYBMS → serial-batteryVenusOS D-Bus → MQTTSoC · cells · load · PV · 30 s ping MARKET + FORECASTOctopus and VRM48 half-hourly Agile slotssolar forecast today + tomorrow HOUSE SENSORSPower, climate and contactappliance watts · doors · motiontemperature · humidity PEOPLE + INFRASTRUCTUREPresence, cameras and WANphone trackers · vision eventsinternet and device health HOME ASSISTANT · CONTROL PLANE 91 automations share one event and state model entity state · helpers · timers · scenes · history · dashboards freshness checks and explicit availability are part of every important decision ENERGY DECISIONSBuy, store or waitTightWatt 4.0 beta · Agile fallbackcutover + high-load forecastingcell / cold / session safety gates LIVING AUTOMATIONSInfer, schedule and simplifykettle / washer state from wattslighting scenes · climate loadscheap-window appliance runs SECURITY + CONTEXTDecide what matterslast-person / first-person scenescamera motion + vision summaryuseful alerts instead of raw events RESILIENCE + CHANGERecover before escalatingMQTT and WAN stale watchdogs15 min config workspace syncdev area + manual production gate BATTERY GUARD RAILwarn → force-fill → hardware BMS ENERGY HARDWARE40 A charger + battery4 kW + 3.5 kW invertersserial-BMS · hardware backstop FLEXIBLE HOUSE LOADSSwitches, scenesand applianceslights · dishwasher · drying PEOPLE + SECURITYPhones, camerasand security scenessummaries · presence-aware modes RECOVERY + WORKFLOWSmart-plug resets+ human deploy gatePi · router · reviewed deploy purple: observations + feedbackteal: automation decisionsyellow: physical actionsred: recovery and protectionevery action returns as new state

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 it works

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

TightWatt · energy decision engine

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.

01 · HORIZON

Calculate the real need

Target plus base and likely loads, minus stored energy and forecast solar, aligned to the next cutover.

02 · SESSIONS

Rank usable slots

Negative slots first, then price order, with enough real time reserved for hard-session cooldowns.

03 · REALITY

Replan and veto

Tariff, charger, PV, export and battery changes trigger a fresh decision instead of waiting for a fixed schedule.

04 · PROTECTION

Safety wins

Bad sensors, cold chemistry, session limits, minimum cell and SoC rules decide whether charging may happen.

Stand downDisabled, manual or invalid data
ProtectCold, session, cell or SoC emergency
ControlSafety, negative price, planned—or off
One day, replayed

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.

Loading the day…

This replay needs JavaScript. The decision ladder above tells the same story.

holdingboughtvetoedcutover
Dashboards

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.

Representative overview with synthetic energy, battery and automation status.
Representative energy planner with synthetic storage, load and tariff data.
Representative solar analysis with synthetic generation, forecast and flow data.
Highlights

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.