-
Notifications
You must be signed in to change notification settings - Fork 16
Smart solar water heating using Home Assistant
This page will guide you how to convert your old solar water heater into a smart one.
-
Monitor the water temperature
-
Turn on the electric heater automatically
-
Notify in case of a solar panels issue or a heater issue (effectiveness issue)
-
Indirectly saves water consumption.
![600](https://user-images.githubusercontent.com/13034429/58249852-9f0cd580-7d68-11e9-9c17-892d7aa505f4.png)
In Israel it is common to find solar water heater (this project could with a small changes on electrical heater too)
![58248489 f0b36100 7d64 11e9 9291 336f812fbb7b](https://user-images.githubusercontent.com/13034429/58248489-f0b36100-7d64-11e9-9291-336f812fbb7b.png)
In this system, there is a place to put a mechanical thermostat. The objective of this device is to identify that the heater was left opened and to turn it off so the boiler won’t blowe due to heat.
![58248789 c57d4180 7d65 11e9 8fd8 576844f0f404](https://user-images.githubusercontent.com/13034429/58248789-c57d4180-7d65-11e9-8fd8-576844f0f404.png)
It is located at the bottom of the boiler (see #1)
Using this project we will convert this mechanical thermostat to a digital temperature monitor while keeping the mechanical thermostat (in case of a bug in the software)
![150](https://user-images.githubusercontent.com/13034429/58249057-826f9e00-7d66-11e9-83bc-cbacf072281a.png)
-
HA
-
Appdaemon
-
Sonoff TH16 with DS18B20 sensor
![150](https://user-images.githubusercontent.com/13034429/58249215-f6aa4180-7d66-11e9-8df6-496e78887159.png)
-
You should have wifi signals near your boiler
-
TH16 + DS18 should be connected to the boiler power input (before the thermostat) the DS18 should be inserted into the thermostat (it is not simple to keep them both due to the cable, but it is possible if you replace the cable to a smaller cable)
-
Keep the main power always on (it will power the TH16). Now HASS will take charge of things (don’t worry, it is a good thing)
This configuration should be done once. The rules make sure the boiler failsafe. E.g. in case of a network issue or mqtt/HA restart/stuck it will turn off automatically
Rule1 on Power1#state==1 do RuleTimer1 7200 endon on Rules#Timer=1 do power off endon on Power1#state==0 do RuleTimer1 off endon
Rule1 on
poweronstate 0
TelePeriod 60
SetOption36 20
Another better alternative is to use pulseTime tasmota command (without complex rules)
poweronstate 0
TelePeriod 60
SetOption36 20
pulsetime 7200
Copy this project <config directory>/custom_components/
folder to your <config directory>
directory
make sure you are in sync with the the right version of hass (see above)
after you copy the data you should reboot/restart HA
The switch configuration
switch:
- platform: tasmota
name: b0
stopic: b0
It is important to use the custom component (tasmota) see discussion here
The sensors
sensor:
- platform: mqtt
name: "btemp0"
state_topic: "tele/b0/SENSOR"
value_template: "{{value_json['DS18B20'].Temperature }}"
qos: 1
unit_of_measurement : "C"
- platform: statistics
entity_id: sensor.btemp0
max_age:
minutes: 600
- platform: accumulator
name: boiler_total_hours2
entity_id: switch.b0
state_on: 'on'
state_off: 'off'
full configuration can be found here boiler
When the app is enabled, the algorithm works as follow.
-
If the water temperature is lower than user-min and UV index is lower than 1 ( no sun right now) turn on the heater
-
If the water temperature is higher than user-max stop the heater.
-
Calculate some variables - for Grafana chars
-
watchdog the time the switch is opened
In simple words keep the water always hot. In case there is a Sunlight let the Sun heat it (UV index is higher than 1)
Note
|
I found that the energy waste is negligible beacuse the heat is saved. Only when you are going to vacation it is better to disable the app. |
boiler_timer_off:
module: heat_app
class: SimpleTimerOff
input_start: switch.b0
input_time: input_number.boiler_timer_time
switchs : [switch.b0]
boiler_automation:
module: heat_app
class: CBoilerAutomation
switch: switch.b0 #input . switch on/off
temp: sensor.btemp0 # input: temp sensor
input_automation: input_boolean.boiler_auto_enable # input: GUI enable/disable
input_temp_min: input_number.boiler_temp_min # input: GUI tune
input_temp_max: input_number.boiler_temp_max # input: GUI tune
sensor_eff_power: variable.boiler_eff_power0 # # output: variable to calc effectiveness
sensor_eff_solar: variable.boiler_eff_solar0 # output: variable to calc effectiveness
input_uv: sensor.dark_sky_uv_index # input: UV index
I found that turning it to minimum (input min/max) save a lot of water. The reason is that one of my sons loves to shower and he consumes all the hot water he could. So tuning it high value means very long showers. Keeping it low indirectly tune the maximum time of the shower 😄
I wish I could have a mechical water switch that could switch the hot water with icy cold water.
![700](https://user-images.githubusercontent.com/13034429/58251334-1001bc80-7d6c-11e9-9a9f-4773b16d331f.png)
The yellow stands for the speed the water is heating up. in case this number is dropping it means that the effectiveness of the solar panels or heater is going down.
![58251613 b5b52b80 7d6c 11e9 9ac0 188bf941380f](https://user-images.githubusercontent.com/13034429/58251613-b5b52b80-7d6c-11e9-9ac0-188bf941380f.png)
The b stand for kwh for the boiler based on the hours the switch was working.
![500](https://user-images.githubusercontent.com/13034429/58251844-63283f00-7d6d-11e9-9963-7de56db026b2.png)
notes: It wasn’t possible to use the integral of the switch.on.off due to a bug in InfluxDb, So I’ve used diff function on the accumulation that works.
see this defect integral does not work