Optimizing Solar Energy for Pool Heating with OpenHAB

I wanted to share my experience with automating my pool filtration and heating system using OpenHAB. It’s been a fantastic journey, and I’m excited to see how I can improve it further. Here’s what I’ve done so far:

Current Setup

I’ve set up OpenHAB 3.0.1 on a Synology NAS using Docker. My system reads solar production and consumption data via MQTT and controls my pool pump and heat pump using Shelly devices. The frontend is HabPanel, which makes everything easy to monitor and control.

My rules are straightforward but effective:

  • Turn on the pool pump when solar production exceeds 1 kW.
  • Turn on the heat pump when solar production exceeds 2 kW.
  • Turn off both pumps when solar production drops to zero.

Success So Far

This setup has worked perfectly for optimizing my solar energy usage. I love how it automatically adjusts based on the available solar power, ensuring that I’m making the most of my renewable energy source.

Looking for Improvements

Now, I’m eager to enhance my system further. Here are a few ideas I’m exploring:

  1. Calculate Pump Runtime: I want to track how long the pumps have been running each day. This data is already stored in MariaDB, so I’m thinking of using the sumSince function to calculate the duration. I’d like to use this information to adjust when the pumps turn off, especially if the temperature is high. For example, if the temperature is above 30°C, the pumps should run for at least 12 hours.

  2. Manual Override Button: I’d love to have a button on HabPanel that lets me manually override the automatic rules. This would be useful on days when I want to give the pool an extra heating boost without waiting for the solar production to meet the threshold.

  3. Hysteresis Mechanism: I came across a post about implementing a time-based hysteresis to prevent frequent switching of the pumps. I’m curious if this can be done using the UI-based rule editor or if I need to switch to a more advanced setup like rules.d or JavaScript.

If anyone has experience with these improvements or suggestions on how to implement them, I’d be thrilled to hear from you! I’m excited to take my system to the next level and make it even more efficient and user-friendly.

Cheers,
Luc