Heater On/Off Decision Pipeline

Heater On/Off Decision Pipeline A workflow diagram generated by Archify. 01 / Control Cycle & Plug 02 / Forecast to Optimization 03 / Control Policy EX / Fail-Closed Safety Gather Decide + gate Actuate + protect Validate + plan strom CLI · run_control_cycle · Control Cycle & Plug › Gather strom CLI run_control_cycle Discover Plug · DEVICEIP + credentials · Control Cycle & Plug › Gather · fail-fast Discover Plug DEVICEIP + credentials fail-fast Smart Plug · turn_on / turn_off + sleep · Control Cycle & Plug › Actuate + protect Smart Plug turn_on / turn_off + sleep Fetch Inputs · weather + day-ahead prices · Forecast to Optimization › Gather · 24 h horizon Fetch Inputs weather + day-ahead prices 24 h horizon Min-Cost Solve · ZOH thermal model · Forecast to Optimization › Decide + gate · CVXPY · CLARABEL Min-Cost Solve ZOH thermal model CVXPY · CLARABEL Schedule Gate · HeaterOutput ∈ [0, 1] · Control Policy › Validate + plan › Decide + gate · refuse to actuate Schedule Gate HeaterOutput ∈ [0, 1] refuse to actuate Duty-Cycle Plan · on = duty × interval · Control Policy › Validate + plan › Actuate + protect · min pulse 60 s Duty-Cycle Plan on = duty × interval min pulse 60 s Refuse to Actuate · StromError → exit 1 · Fail-Closed Safety › Decide + gate Refuse to Actuate StromError → exit 1 Max-On Watchdog · ≥ 3 h ON → force OFF · Fail-Closed Safety › Actuate + protect · independent Max-On Watchdog ≥ 3 h ON → force OFF independent device reachable ON / OFF segments infeasible / solver error HeaterOutput schedule non-finite / out of range force turn_off Legend User UI Agent logic Policy Cloud service External system

One Validated Plan

  • • The optimizer emits a fractional HeaterOutput in [0, 1] per interval — never a raw switch command
  • • The plug is commanded only from a validated ActuationPlan, never from raw optimizer output
  • • A duty of exactly 0 returns one OFF segment, so the plug is never switched on

Fail-Closed Gates

  • • Discovery returning no device aborts the cycle before any data is fetched
  • • Infeasible comfort bounds or a solver failure return no schedule at all
  • • Every StromError maps to exit code 1 with the plug left untouched

Independent Watchdog

  • • MaxOnWatchdog forces the plug OFF after 3 h of continuous ON
  • • It keeps its own ON/OFF belief and never consults the optimizer
  • • A stale or crashed controller cannot leave the heater on indefinitely