Skip to content

Commit 5efa74d

Browse files
authored
Update pool_heater.md
1 parent 0569f58 commit 5efa74d

File tree

1 file changed

+192
-1
lines changed

1 file changed

+192
-1
lines changed

docs/Software_and_control/Appliances/pool_heater/pool_heater.md

Lines changed: 192 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,195 @@ parent: Appliances
44
layout: minimal
55
---
66

7-
# Pool Heater
7+
# Pool Heater
8+
9+
<img src="https://r2cdn.perplexity.ai/pplx-full-logo-primary-dark%402x.png" class="logo" width="120"/>
10+
11+
## User Guide: Integrating a Pool Heater with EMHASS for Home Assistant
12+
13+
This guide explains how to connect your pool heater to Home Assistant and optimize its energy usage using the EMHASS add-on. Learn to schedule heating during low-cost periods, align operation with solar surplus, and automate temperature control.
14+
15+
---
16+
17+
### **1. Prerequisites**
18+
19+
- **Pool Heater**:
20+
- Must support on/off control via a relay (e.g., via a smart switch like Shelly, Sonoff, or Tuya).
21+
- (Optional) Temperature sensor for pool water (e.g., Zigbee/Z-Wave sensor or DIY ESPHome device).
22+
- **Home Assistant**:
23+
- EMHASS add-on installed ([setup guide](https://emhass.readthedocs.io)).
24+
- Integration for controlling the heater (e.g., [Shelly](https://www.home-assistant.io/integrations/shelly/), [localTuya](https://github.com/rospogrigio/localtuya)).
25+
26+
---
27+
28+
### **2. Home Assistant Integration**
29+
30+
#### **A. Connect the Pool Heater**
31+
32+
1. **Smart Switch Setup**:
33+
- Wire the pool heater’s power control to a smart relay (e.g., Shelly 1).
34+
- Integrate the relay with Home Assistant (e.g., via Shelly’s official integration or MQTT).
35+
- Entity example: `switch.pool_heater`.
36+
2. **Temperature Monitoring**:
37+
- Add a temperature sensor (e.g., `sensor.pool_temperature`).
38+
- For DIY solutions, use an ESP32 with a waterproof DS18B20 probe and ESPHome.
39+
40+
#### **B. Verify Entities**
41+
42+
- Confirm these entities exist in Home Assistant:
43+
- Heater control: `switch.pool_heater`
44+
- Power consumption: `sensor.pool_heater_power` (via smart plug or energy monitor).
45+
- Pool temperature: `sensor.pool_temperature`
46+
47+
---
48+
49+
### **3. EMHASS Configuration**
50+
51+
#### **A. Define Pool Heater as a Deferrable Load**
52+
53+
In EMHASS’s `config.json` or web UI:
54+
55+
```json
56+
{
57+
"deferrable_loads": {
58+
"pool_heater": {
59+
"entity_id": "switch.pool_heater",
60+
"max_power": 4000, // Heater power in Watts (e.g., 4kW)
61+
"def_start_time": "06:00", // Earliest allowed start time
62+
"def_end_time": "22:00", // Latest allowed end time
63+
"def_hours": [3, 12] // Min/max daily runtime in hours
64+
}
65+
}
66+
}
67+
```
68+
69+
- Adjust `def_hours` seasonally (e.g., `[^3][^9]` in summer, `[^6]` in winter).
70+
71+
72+
#### **B. (Optional) Thermal Model for Temperature Control**
73+
74+
For precise temperature management, use EMHASS’s thermal model:
75+
76+
```json
77+
{
78+
"def_load_config": {
79+
"pool_heater": {
80+
"thermal_config": {
81+
"heating_rate": 2.0, // Degrees per hour (adjust based on heater capacity)
82+
"cooling_constant": 0.05, // Heat loss rate (adjust for pool insulation)
83+
"start_temperature": 20, // Initial pool temperature
84+
"desired_temperatures": [22, 22, ..., 22] // Target temps for each timestep
85+
}
86+
}
87+
}
88+
}
89+
```
90+
91+
- Provide `outdoor_temperature_forecast` for accurate heat loss calculations.
92+
93+
---
94+
95+
### **4. Automation Examples**
96+
97+
#### **A. Solar-Powered Heating**
98+
99+
Run the heater only when solar production exceeds household load:
100+
101+
```yaml
102+
automation:
103+
- alias: "Pool Heater on Solar Surplus"
104+
trigger:
105+
- platform: numeric_state
106+
entity_id: sensor.pv_power
107+
above: >
108+
{{ states("sensor.house_load") | float + 4000 }} // 4kW surplus
109+
action:
110+
- service: switch.turn_on
111+
target:
112+
entity_id: switch.pool_heater
113+
```
114+
115+
116+
#### **B. Cost Optimization with EMHASS**
117+
118+
1. **Daily Schedule**:
119+
- EMHASS optimizes heater runtime based on tariffs and solar forecasts.
120+
2. **Publish Schedule**:
121+
122+
```yaml
123+
rest_command:
124+
emhass_optimize:
125+
url: "http://localhost:5000/action/dayahead-optim"
126+
method: POST
127+
automation:
128+
- alias: "Update Pool Heater Schedule"
129+
trigger:
130+
- platform: time
131+
at: "04:00:00"
132+
action:
133+
- service: rest_command.emhass_optimize
134+
```
135+
136+
137+
---
138+
139+
### **5. Advanced: Thermal Model Integration**
140+
141+
- Use the `sensor.temp_predicted0` entity (created by EMHASS) to automate temperature setpoints:
142+
143+
```yaml
144+
climate:
145+
- platform: generic_thermostat
146+
name: "Pool Temperature"
147+
heater: switch.pool_heater
148+
target_sensor: sensor.pool_temperature
149+
min_temp: 15
150+
max_temp: 35
151+
target_temp: "{{ states('sensor.temp_predicted0') | float }}"
152+
```
153+
154+
155+
---
156+
157+
### **6. Troubleshooting**
158+
159+
- **Heater Not Turning On**:
160+
- Verify `def_start_time`/`def_end_time` in EMHASS.
161+
- Check smart relay wiring and entity permissions.
162+
- **Inaccurate Thermal Model**:
163+
- Adjust `heating_rate` and `cooling_constant` using historical data.
164+
- **High Energy Costs**:
165+
- Review tariff forecasts and ensure `def_hours` align with off-peak periods.
166+
167+
---
168+
169+
### **7. Resources**
170+
171+
- [EMHASS Documentation](https://emhass.readthedocs.io)
172+
- [Shelly Integration Guide](https://www.home-assistant.io/integrations/shelly/)
173+
- [ESPHome Pool Sensor Example](https://esphome.io/components/sensor/dallas.html)
174+
175+
By integrating your pool heater with EMHASS, you can reduce energy costs, extend swimming seasons, and maintain comfortable water temperatures using solar power and smart scheduling.
176+
177+
<div style="text-align: center">⁂</div>
178+
179+
[^1]: https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126/1020
180+
181+
[^2]: https://emhass.readthedocs.io/en/latest/thermal_model.html
182+
183+
[^3]: https://emhass.readthedocs.io/en/latest/study_case.html
184+
185+
[^4]: https://github.com/davidusb-geek/emhass
186+
187+
[^5]: https://www.reddit.com/r/homeassistant/comments/utczrn/pool_heater_automation_and_control/
188+
189+
[^6]: https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126
190+
191+
[^7]: https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126?page=2
192+
193+
[^8]: https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126/89
194+
195+
[^9]: https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/338126?page=40
196+
197+
[^10]: https://github.com/siku2/hass-emhass
198+

0 commit comments

Comments
 (0)