Skip to content

Latest commit

 

History

History
180 lines (125 loc) · 14.6 KB

README.md

File metadata and controls

180 lines (125 loc) · 14.6 KB

RoomMind

HACS Default Home Assistant License Tests Coverage GitHub Release

ko-fi

Intelligent room climate control for Home Assistant - self-learning thermal model, proportional valve control, and a dedicated management panel.

Dashboard

Features

  • Self-Learning MPC - Per-room thermal model (Extended Kalman Filter) that learns your home's heating/cooling behavior over time. Automatic fallback to on/off control while learning.
  • Proportional Valve Control - TRVs receive calculated setpoints instead of simple on/off, producing smoother temperature curves with less overshoot.
  • Solar Gain Awareness - Estimates solar irradiance from sun position and weather data. The model learns each room's solar response and reduces unnecessary heating.
  • Multi-Scheduler - Multiple schedule.* entities per room with selector switching via input_boolean or input_number.
  • Manual Override - Boost, eco, or custom temperature with configurable duration and instant UI feedback.
  • Presence Detection - Link person.*, device_tracker.*, binary_sensor.*, or input_boolean.* entities globally or per room. Eco temperature is used when all assigned persons are away.
  • Ignore Presence per Room - Rooms can opt out of presence detection to always follow their schedule.
  • Vacation Mode - Global setback temperature with end date for all rooms.
  • Window/Door Pause - Pauses climate control when windows or doors are open, with configurable open/close delays. After a restart, RoomMind waits until the window sensors report a state (at most 5 minutes; a sensor that is still unavailable then counts as closed). A sensor that no longer exists at all (deleted or renamed) counts as closed right away once Home Assistant has finished starting, with a warning in the log. A sensor that drops out briefly keeps its last state.
  • Mold Risk Detection & Prevention - Surface humidity estimation using the DIN 4108-2 method. Configurable notifications and automatic temperature raise to prevent mold growth.
  • Automatic Blind/Cover Shading - Smart cover deployment based on predicted solar overheating. Includes night close, manual override detection, and cover schedules.
  • Valve Protection - Periodic cycling of idle TRV valves to prevent seizing and calcification.
  • Heat Source Orchestration - Rooms with both TRVs and ACs automatically route heating demand to the most efficient device based on temperature gap and outdoor conditions.
  • Compressor Group Protection - Define groups of climate devices sharing an outdoor compressor. Enforces minimum run and off times to prevent short-cycling. Until min_run_minutes has elapsed, a device keeps its last active setpoint, including a boost setpoint, so the room can overshoot its target further than without protection. A target that changes on purpose in the meantime (override, vacation, schedule off, presence) is passed on to the device right away (a device with a single heat/cool setpoint only when that cannot push the room the wrong way).
  • Fan-only & Setback Idle Modes - AC and heat pump devices can switch to fan-only or setback mode instead of turning off, keeping air circulation or low-load operation active. Setback still turns the device off after a long pause with no demand ahead.
  • Per-Device Setpoint Mode - Choose proportional (boost setpoint) or direct (exact target) control per device for optimal results with different hardware. For direct devices whose internal sensor reads differently from your room sensor, a setpoint offset shifts the temperature sent to the device.
  • Direct Valve Control - TRVs that expose their valve opening as number entities (e.g. SONOFF TRVZB) are held at the opening the room needs instead of switching between fully open and closed: fewer valve movements, quieter and steadier heat.
  • Separate Heat/Cool Targets - Independent comfort and eco temperatures for heating and cooling in auto mode, creating a natural dead-band.
  • Per-Room Climate Toggle - Disable climate control for individual rooms while keeping other rooms active.
  • Outdoor Areas - Mark rooms as outdoor (e.g. balcony) to disable climate control while keeping monitoring.
  • Analytics Dashboard - Temperature charts with heating power, solar irradiance, and model predictions over 24h to 90 days.
  • Mobile Ready - Responsive layout with HA-native toolbar for the companion app.
  • Multilingual - English and German, auto-detected from your HA language setting.

Installation

Open your Home Assistant instance and open RoomMind inside HACS.

HACS (Recommended)

  1. Open HACS in Home Assistant
  2. Search for "RoomMind" and install
  3. Restart Home Assistant
  4. Go to Settings > Devices & Services > Add Integration > RoomMind

Manual

  1. Copy custom_components/roommind/ to your config/custom_components/ directory
  2. Restart Home Assistant
  3. Go to Settings > Devices & Services > Add Integration > RoomMind

Quick Start

After installation, RoomMind appears as a panel in the HA sidebar.

  1. Open RoomMind from the sidebar - you'll see all your HA areas as room cards
  2. Click a room card to open the detail view
  3. Add devices - assign at least one thermostat or AC (climate.* entity)
  4. Add a temperature sensor (optional but recommended) - enables Full Control with proportional valve control
  5. Add a schedule - create a schedule.* helper in HA and assign it
  6. Set temperatures - configure comfort (schedule on) and eco (schedule off) temperatures

RoomMind starts controlling immediately. If MPC is enabled (default), the thermal model begins learning in the background.

Analytics

Analytics

Select a room and time range (24h / 7d / 30d / 90d / custom) to view temperature history, heating/cooling power, solar irradiance, and model predictions. Export as CSV or diagnostics report.

How It Works

Target Temperature Priority

Manual Override > Vacation > Presence Away > Schedule Block > Comfort / Eco  (+Mold Delta)

Full Control vs. Managed Mode

An external temperature sensor is really where RoomMind starts to shine. It is the single most impactful addition for any room, unlocking the full potential of the thermal model, MPC optimization, and proportional device control.

Full Control Managed Mode
When External temperature sensor assigned No external sensor
How RoomMind decides heating/cooling/idle Device self-regulates
Setpoints Proportional boost (e.g. 28°C to force heating at 80% power) Exact target sent to device
Thermal model EKF learns room behavior, MPC optimizes No learning, no optimization

In Full Control, RoomMind dynamically calculates device setpoints based on MPC power output. Instead of sending 22°C to a TRV or AC, it might send 28°C to force the device to heat at full capacity. This solves common issues where devices with inaccurate internal sensors or built-in deadbands refuse to turn on. Each room shows its current mode ("Full Control" or "Managed") in the detail view.

MPC Climate Control

The Extended Kalman Filter observes temperature changes and learns each room's heat loss rate, heating/cooling power, and solar responsiveness. Once calibrated (prediction accuracy < 0.5 C), the MPC optimizer plans ahead and calculates proportional power for smoother control.

Until calibrated (~60 idle + ~20 active samples), RoomMind falls back to simple on/off control with hysteresis.

Settings -> Control -> Control Mode decides whether MPC is used at all. Intelligent (MPC) is the default. Simple keeps every room on the on/off control with hysteresis; the thermal model still learns in the background and feeds the analytics prediction, but it never makes heating or cooling decisions. Automatic blinds then shade from a simpler solar estimate instead of the MPC forecast.

For a more detailed explanation of the Priority slider, device types, setpoint modes, idle behavior, and smart source selection, see the Control and Device Guide.

Entities Created

Entity Description
climate.roommind_{area_id} The room as one thermostat, see Room climate entity
switch.roommind_vacation Global vacation mode toggle
switch.roommind_{area_id}_cover_auto Per-room automatic cover control toggle
binary_sensor.roommind_{area_id}_cover_paused On when manual cover override is detected

These can be used in HA automations, dashboards, or other integrations.

Room climate entity

climate.roommind_{area_id} shows and controls a room the way a thermostat card, an automation or a voice assistant expects:

Climate feature In RoomMind
Target temperature (range in Auto mode) The targets currently in force. Changing it sets an override that holds until the next change of the active schedule, like a thermostat's temporary hold. Without a schedule it holds until you pick the preset none. Sending the value already in force changes nothing. A single temperature in Auto mode (e.g. from a voice assistant) sets the heating side and keeps the cooling side at least at comfort cooling.
Presets Comfort / Eco Comfort or eco override, also until the next schedule change
Preset Manual Shown while a custom temperature is held (set here, in the panel or on the old override entity); picking it holds the targets in force until the next schedule change
Preset Schedule (none) Ends the override and returns to the schedule
HVAC mode heat / cool / heat_cool Climate mode Heat only / Cool only / Auto, and turns control on. climate.turn_on turns control on and keeps the climate mode.
HVAC mode off Switches the room's devices off and stops controlling them
hvac_action What RoomMind is doing: heating, cooling, idle or off
Current temperature and humidity The room's readings

Attributes: override_until, window_open, presence_away, vacation. An open window shows as idle with window_open: true.

The entity is placed in the room's area once when it is created, so it shows up on area cards and Assist finds it by the area ("set the temperature in the living room to 22"). An area you change or remove later is kept. For voice control, hide the room's own thermostats and ACs from Assist (Settings → Voice assistants → Expose), otherwise Assist finds several climate entities in the room and cannot pick one.

Like every override, one set here also lifts the outdoor temperature limits for heating and cooling while it lasts.

A wall display or a thermostat RoomMind does not control can be linked with an automation: its setpoint → climate.set_temperature on the room entity, and the room entity's target → the display, so the display always shows what applies.

Deprecated entities

These per-room entities still work but will be removed in a future release. If automations or scripts reference them directly, Home Assistant shows a repair notice listing them; uses inside templates or dashboards are not detected, but every service call to an old entity logs a warning once.

Old entity Use instead
sensor.roommind_{area_id}_target_temp Target temperature of climate.roommind_{area_id}
sensor.roommind_{area_id}_mode hvac_action of climate.roommind_{area_id}
climate.roommind_{area_id}_override climate.set_temperature or a preset on climate.roommind_{area_id}. Unlike the old entity, an override there ends at the next schedule change.
switch.roommind_{area_id}_climate_control climate.turn_on / climate.turn_off on climate.roommind_{area_id}. Unlike the old switch, off also switches the devices off.

Troubleshooting

MPC shows "learning" for a long time - The model needs ~60 idle and ~20 heating/cooling observations. This can take a few days for rooms that heat rarely. Check progress in the Analytics tab.

Room not heating/cooling when expected - Check outdoor gating thresholds in Settings > Control. Default: no cooling below 16 C, no heating above 22 C. An active manual override ignores these limits.

Override entity switched on without a temperature - Turning climate.roommind_{area_id}_override on creates an override from the targets currently in force. Because an override ignores the outdoor limits, RoomMind waits 3 seconds for the follow-up temperature before acting on it; a repeated turn_on within that time does not shorten the wait. Reloading the integration within those 3 seconds drops the wait, and the seeded targets are then used right away, as for a plain turn_on without a follow-up temperature.

Thermal model seems wrong after room changes - If you've changed insulation, radiators, or moved sensors, reset the model in Settings > Reset Thermal Data.

Frontend not updating after update - Hard-refresh: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows/Linux).

Requirements

  • Home Assistant 2026.2+
  • At least one HA area with a climate.* entity
  • Optional: temperature sensor, humidity sensor, window sensors, weather entity, schedule helpers, person entities

No cloud services required - everything runs locally.

Feedback & Contributing