Thinking House Lab
EN

Language

  • English
  • Deutsch
  • Français · coming later
  • Español · coming later
  • 中文 · coming later

The logic map

The whole system on one page. On the left, what the house measures. In the middle, what it makes of it. On the right, what it does.

0 of 77 explained

Coming in episode 1: 3 building blocks

How to read the map

Interactive map

Legend

Areas

  • Solar (PV)
  • Grid & consumption
  • Battery
  • Costs & planning
  • Heating & cooling
  • System & safety

Types

  • Input
  • Function
  • Output

Status

  • Not explained yet – video follows
  • Explained in a video
  • Shadow mode: calculates and logs, but doesn't switch anything yet
  • Still being checked against the real system
Skip the map – go to the list
Solar (PV)Grid & consumptionBatteryCosts & planningHeating & coolingSystem & safetyInputsFunctions – the deeper, the further rightOutputsPV output perinverterWeather forecastHouse load &grid valuesWallbox powerBatterymanagement (BMS)Miner telemetryBattery monitorcharge levelGas price &meter readingWholesaleelectricity priceHeat pump readingsOutdoor sensorsRoom sensors &setpointsAir conditionerpowerHot water tanksensorsGas condensingboiler readingsOperator settingsand rulesPV yield fromphysicsLoad protectionBase loadThermal stepcontrol per minerCompressor startcounterRoom solar gainlearnerOpen windowdetectionBus protectionHouse setpointHot waterusage profileFreshness ruleRead-only safetyswitchFlight recorderValue store(one writer each)Total PV powerConsumption profileBattery currentlimits per packCharge levelsource (30 min)One outdoortemperatureHot water priority& legionellaPV learnerConsumptionforecast from nowCharge levelemergency brakeBattery priceDead-man policy forbattery limitsHeat demandlearnerBuilding modelSolar flowreductionCOP mapFlow temp. fromroom averageHeating/coolingswitchLearned heatingcurveCorrection for eachforecast hourSame-dayadjustmentHeat price decisionFlow temperaturereduction learnerRestoring the targetstateLearning qualityEmergencywatchdog outsideForecast duelFlow setpointevery 20 minAir conditioningdecisionGas valve ruleForecast combinerDaytime surplusminingMining scheduleDischarge plannerGrid charging ondemandCost optimiserSimple day plannerEnergy gatePlausibilitywatchdogBattery limits tothe control unitMiners: power levelGrid chargingcommandHeat pump: flowsetpoint and modeHot water: heatingand setpointAir conditioners:mode and setpointGas boiler: modeand valveDisplay &dashboardAlerts: ticker,display, message

All building blocks as a list

Solar (PV) 7

  • PV output per inverterInput

    Measures how much power each solar inverter delivers right now – the basis for every energy balance and every learner.

    Active9

  • Weather forecast (48 h)Input

    Fetches cloud cover, solar irradiance and outdoor temperature hour by hour from a weather service – the only outside data source for the solar forecast.

    Active2

  • PV yield from physicsFunction

    Calculates hour by hour from the position of the sun, cloud cover and irradiance how much each group of panels facing the same way will produce.

    Active2

  • Total PV powerFunction

    Adds all solar sources up into one number and flags it clearly when a source is missing.

    Active

  • PV learner (correction table)Function

    Learns in a table by month, cloud level and hour how far the physics calculation is systematically off, for example because of shade or dirt.

    Active28

  • Correction for each forecast hourFunction

    Applies the learned correction to every future hour using that hour's own cloud cover, instead of stretching one factor across the whole day.

    Active2

  • Forecast duelFunction

    Compares the raw physics and the corrected forecast every day and only switches the correction on once it has clearly proven to be better.

    ActiveStill being checked against the real system2

Grid & consumption 7

  • House load, grid import, voltage/frequencyInput

    Measures the total household consumption, the power drawn from the public grid, and the voltage and frequency in the house.

    Active411

  • Wallbox power (read only)Input

    Measures how much power the electric car is charging with; the system only watches this and does not control it.

    Active

  • Load protection (load jumps, shedding)Function

    Only allows large consumers to switch on when there is enough reserve, and sheds loads when the house supply reaches its limit.

    Active

  • Base load (house without controllable loads)Function

    Subtracts the heat pump and the miners from the total consumption, so the system does not mistake its own actions for household demand.

    ActiveStill being checked against the real system11

  • Consumption profile (learner)Function

    Learns the typical daily curve of the base load, separately for weekdays and weekends, with a memory of about ten days.

    Active811

  • Consumption forecast from nowFunction

    Turns the learned daily curve into a forecast for the next 24 hours starting now and switches the day type at midnight.

    Active11

  • Same-day consumption adjustmentFunction

    Compares plan and reality of the last few hours and scales up the rest of the day when the house uses more than expected, for example on laundry day.

    ActiveStill being checked against the real system311

Battery 16

  • Battery management (BMS) of the packsInput

    Each battery pack reports voltage, current, cell temperatures and whether charging or discharging is allowed – only it knows the limits of its cells.

    Active6

  • Miner telemetryInput

    Each crypto miner – a computer used here as a flexible power consumer – reports its power draw, computing speed, temperatures and restarts.

    Active11

  • Charge level from the battery monitor (shunt)Input

    Counts every amp-hour flowing into and out of the battery and so provides the charge level the system really trusts.

    Active912

  • Thermal step control per minerFunction

    Steps down only the miner that is too hot, one step at a time, and switches it off only as a last resort.

    Active3

  • Battery current limits per packFunction

    Works out for each battery pack how much current it may take or give right now – never less than a small minimum – and a veto only blocks the affected pack.

    Shadow mode: calculates, but does not switch anything yetStill being checked against the real system6

  • Charge level source with 30-minute grace periodFunction

    Controls only with the battery monitor's charge level; if it goes silent, the last value may still apply the brakes for 30 minutes before the average of the battery packs takes over.

    Active3512

  • Charge level emergency brake with restart hysteresisFunction

    Stops the miners immediately when the battery gets too low and only lets them restart once the charge level is clearly higher again and some time has passed.

    Active312

  • Battery price (weighted average)Function

    Keeps a ledger of what the energy in the battery cost: solar charging is free, grid charging costs its price, and the average per kWh is what counts.

    Active4

  • Dead-man policy for battery limitsFunction

    If the sender of the battery limits fails, the last value is held and then slowly ramped to a generous floor – never to zero.

    Built and tested, not switched on yetStill being checked against the real system6

  • Daytime surplus miningFunction

    Lets the miners run during the day when the sun delivers more than the battery needs to become full, so no solar power is wasted.

    Active3

  • Mining schedule (6-hour blocks)Function

    Turns the energy to be drained into an even power level for the miners, holds it for six-hour blocks and only corrects it at the end of a block.

    Active3

  • Discharge planner (drain)Function

    Searches for the lowest morning charge level from which the sun can still fill the battery to 100 % in the afternoon, so there is room for the coming solar day.

    Active2311

  • Grid charging on demandFunction

    Looks several days ahead, works out how much energy the sun will not deliver and buys just that amount from the grid in the cheapest known hours.

    Under constructionStill being checked against the real system5

  • Battery limits to the control unitOutput

    Would send the current limits of every pack to the central control unit of the inverters – so far only in shadow mode.

    Shadow mode: calculates, but does not switch anything yetStill being checked against the real system6

  • Miners: power levelOutput

    Sets each miner to one of its fixed power levels – this is how the planned room in the battery is actually created.

    Active312

  • Grid charging: minimum charge level / charge commandOutput

    Raises the minimum charge level or switches the charger on, so that the grid charging plan physically happens.

    Built and tested, not switched on yetStill being checked against the real system5

Costs & planning 6

  • Gas price, instalments, meter readingInput

    Knows the gas price per kWh, the standing charge, the account balance and the latest meter reading.

    Active4

  • Wholesale electricity priceInput

    Provides the electricity price for every quarter of an hour of today, and from about midday also for tomorrow.

    Active45

  • Heat price decision (heat pump or gas)Function

    Compares what one kWh of heat costs from the heat pump (battery price divided by COP) and from gas, and lets the cheaper heat source win.

    Active4

  • Cost optimiser (linear program)Function

    Once a day, calculates the cheapest 24-hour plan for battery, grid and generation with a mathematical optimisation.

    ActiveStill being checked against the real system

  • Simple day planner (greedy)Function

    Picks the hours simply by their price rank – easy to explain and fast, but deliberately not perfect.

    ActiveStill being checked against the real system

  • Energy gate (operating mode)Function

    Chooses one of four operating modes from charge level, price and solar outlook – solar direct, arbitrage, avoid grid or emergency – with a buffer so it does not flip back and forth.

    ActiveStill being checked against the real system

Heating & cooling 30

  • Heat pump readings (data bus and power meter)Input

    Reads flow and return temperature, operating mode, error codes and power draw of the heat pump – what the machine really does, not what it was told.

    Active91011

  • Four outdoor temperature sensorsInput

    Four sensors in different places measure the outdoor temperature, because a single one can be fooled by sunshine or waste heat.

    Active1

  • Room sensors and desired temperaturesInput

    Measures the temperature in every room and knows which temperature the operator would like to have there.

    Active

  • Air conditioner powerInput

    A three-phase meter measures the combined power of the split air conditioners – the only reliable sign that they are really running.

    Active

  • Hot water tank sensors (top/bottom)Input

    Measures the temperature at the top and bottom of the hot water tank; cold water flowing in at the bottom reveals that someone is using hot water.

    Active7

  • Gas condensing boiler readingsInput

    Reports the boiler's flow temperature, whether the burner is on and which way the diverter valve points (hot water or heating).

    Active

  • Compressor start counterFunction

    Counts how often the heat pump's compressor really starts each day, because too many starts shorten its life.

    Active

  • Room solar gain learnerFunction

    Learns for each room how much warmer the sun makes it while the heating is off, and lowers that room's setpoint accordingly.

    ActiveStill being checked against the real system1

  • Open window detectionFunction

    Notices a sudden drop in room temperature and briefly lowers the flow temperature, so the heat pump does not heat against an open window.

    Active1

  • Bus protection (rate limiter and emergency stop)Function

    Makes sure the heat pump is not flooded with requests and, after an error, waits longer and longer before trying again.

    ActiveStill being checked against the real system110

  • House setpoint (weighted average)Function

    Forms one target temperature for the whole house from the rooms that count – a lead room has priority, technical rooms never count.

    Active

  • Hot water usage profile and heating timeFunction

    Learns when hot water is usually used and schedules the tank heating so that it is finished shortly before.

    Active78

  • One outdoor temperature for allFunction

    Combines the outdoor sensors into a single value, leaves out outliers and outdated readings – and every other part of the system reads only this value.

    ActiveStill being checked against the real system1

  • Hot water priority and legionella protectionFunction

    Pauses space heating while the hot water tank is being heated and keeps an eye on whether the water regularly reaches 60 °C for hygiene.

    Active7

  • Heat demand learnerFunction

    Learns how many kWh of heating, cooling and hot water the house needs per day at each outdoor temperature.

    ActiveStill being checked against the real system

  • Building model (heat loss and inertia)Function

    Is meant to learn how much heat the house loses per degree and how quickly it cools down, so that heating could be planned ahead.

    Shadow mode: calculates, but does not switch anything yetStill being checked against the real system

  • Solar flow temperature reduction (K_solar)Function

    Lowers the flow temperature by up to 5 degrees during the day, depending on how strongly the sun is shining.

    ActiveStill being checked against the real system

  • COP map (coefficient of performance)Function

    Learns how much heat one kWh of electricity delivers for each combination of outdoor and flow temperature, separately for heating, cooling and hot water.

    Active48

  • Flow temperature from a weighted average of all roomsFunction

    Works out the flow temperature each room would need and averages them by heat demand, so one problem room cannot overheat the whole house.

    Active1

  • Heating/cooling switch (hysteresis)Function

    Decides from a smoothed outdoor temperature whether to heat, cool or rest, with a buffer zone so the mode does not flicker.

    Active

  • Learned heating curveFunction

    Learns for each outdoor temperature range which flow temperature keeps the rooms stable, anchored by one experience value for very cold days.

    Active18

  • Flow temperature reduction learnerFunction

    Learns how much lower than calculated the flow temperature can be without the house cooling down – it may only lower, never raise.

    ActiveStill being checked against the real system1

  • Restoring the target stateFunction

    Compares what the heat pump should be doing with what it is doing and, after a restart or error, restores the right settings step by step.

    Active10

  • Flow setpoint: whole degrees, every 20 minutesFunction

    Combines heating curve, reductions and corrections into one setpoint, rounds it to whole degrees and sends it at most every 20 minutes.

    Active1

  • Air conditioning decision (split unit or heat pump)Function

    Brings three formerly separate air conditioning rules together into one decision about when the split units should run.

    Shadow mode: calculates, but does not switch anything yetStill being checked against the real system

  • Gas valve rule (one owner per actuator)Function

    Exactly one controller sets the boiler's diverter valve – it switches immediately when needed and otherwise only checks back at growing intervals.

    Active4

  • Heat pump: flow setpoint and modeOutput

    Sends the flow temperature setpoint and the operating mode to the heat pump via the protected data bus.

    Active1410

  • Hot water: heating and setpointOutput

    Starts hot water heating and sets the target temperature of the tank, at most 65 °C.

    Active710

  • Air conditioners: mode and setpointOutput

    Would switch the split air conditioners on and off as a third source of heating or cooling – so far mostly in shadow mode.

    Shadow mode: calculates, but does not switch anything yetStill being checked against the real system

  • Gas boiler: mode and valveOutput

    Switches the gas boiler to off, standby or heating and sets its valve – the backup heating for when the heat pump is off or more expensive.

    Active4

System & safety 11

12 chains from sensor to action

  1. Chain 1

    Heating by outdoor temperature

    Four sensors, one outdoor temperature, a learned heating curve, and a flow temperature in whole degrees.

    Steps in order (10)

    Four outdoor temperature sensors → One outdoor temperature for all → Learned heating curve → Flow temperature from a weighted average of all rooms → Open window detection → Room solar gain learner → Flow temperature reduction learner → Flow setpoint: whole degrees, every 20 minutes → Bus protection (rate limiter and emergency stop) → Heat pump: flow setpoint and mode

  2. Chain 2

    Tomorrow's sun, all the way to the battery plan

    Weather forecast, physics, a learned correction, and a duel that decides whether the correction may count.

    Steps in order (7)

    Weather forecast (48 h) → PV yield from physics → PV learner (correction table) → Correction for each forecast hour → Forecast duel → Forecast combiner (24-hour grid) → Discharge planner (drain)

  3. Chain 3

    Making room in the battery overnight

    How low can the battery go by morning and still reach 100 % in the afternoon?

    Steps in order (9)

    Forecast combiner (24-hour grid) → Same-day consumption adjustment → Charge level source with 30-minute grace period → Discharge planner (drain) → Mining schedule (6-hour blocks) → Thermal step control per miner → Charge level emergency brake with restart hysteresis → Miners: power level → Daytime surplus mining

  4. Chain 4

    Heat pump or gas?

    Battery price divided by COP, against the price of gas heat.

    Steps in order (9)

    House load, grid import, voltage/frequency → Wholesale electricity price → Battery price (weighted average) → COP map (coefficient of performance) → Gas price, instalments, meter reading → Heat price decision (heat pump or gas) → Gas valve rule (one owner per actuator) → Gas boiler: mode and valve → Heat pump: flow setpoint and mode

  5. Chain 5

    Grid charging in winter

    Only the shortfall, only in the cheapest known hours. At a price of zero or below, always.

    Steps in order (5)

    Wholesale electricity price → Forecast combiner (24-hour grid) → Charge level source with 30-minute grace period → Grid charging on demand → Grid charging: minimum charge level / charge command

  6. Chain 6

    Battery charge and discharge limits

    What the battery can take, pack by pack, and what happens when the sender goes quiet.

    Steps in order (5)

    Battery management (BMS) of the packs → Freshness rule: every value has an age → Battery current limits per pack → Dead-man policy for battery limits → Battery limits to the control unit

  7. Chain 7

    Hot water

    Learn when hot water is used, and finish heating before that, not after.

    Steps in order (4)

    Hot water tank sensors (top/bottom) → Hot water usage profile and heating time → Hot water priority and legionella protection → Hot water: heating and setpoint

  8. Chain 8

    From learner to grade

    Every learner is graded against reality. The loop closes through a human.

    Steps in order (7)

    Learned heating curve → PV learner (correction table) → COP map (coefficient of performance) → Hot water usage profile and heating time → Consumption profile (learner) → Learning quality (a grade for every learner) → Alerts: ticker, display, message

  9. Chain 9

    Trust in measured values

    Every value has an age. Too old means unknown, never zero.

    Steps in order (4)

    PV output per inverter → Heat pump readings (data bus and power meter) → Charge level from the battery monitor (shunt) → Freshness rule: every value has an age

  10. Chain 10

    When the heat pump “crashes”

    Stop asking, wait a little longer each time, then restore the desired state step by step.

    Steps in order (5)

    Heat pump readings (data bus and power meter) → Bus protection (rate limiter and emergency stop) → Restoring the target state → Heat pump: flow setpoint and mode → Hot water: heating and setpoint

  11. Chain 11

    Consumption profile and daily correction

    What the house uses without the big controllable loads, learned over days and adjusted during the day.

    Steps in order (8)

    House load, grid import, voltage/frequency → Heat pump readings (data bus and power meter) → Miner telemetry → Base load (house without controllable loads) → Consumption profile (learner) → Consumption forecast from now → Same-day consumption adjustment → Discharge planner (drain)

  12. Chain 12

    Safety net for the battery charge

    If the main charge sensor goes quiet, its last value may still brake for 30 minutes, but never release. Then a backup takes over.

    Steps in order (5)

    Charge level from the battery monitor (shunt) → Charge level source with 30-minute grace period → Charge level emergency brake with restart hysteresis → Miners: power level → Flight recorder (who switched what, when)

The map grows

The map shows everything that's known today. When new systems join, or a block turns out to be two, new grey areas appear. That's not a flaw. That's the plan.

Your experience counts

Which system runs in your house, and where does it get stuck? I'd like to hear about your experiences, your doubts and your ideas, in the comments under the videos. Good ideas get picked up and built in public: as a video of their own or as an addition to an existing one.

To the channel