First off, I'm a rule machine novice, still learning how it works. So, I think I've bitten off a little more than I can chew with this project, but I'm pretty sure that if I can get some help and advice, my understanding of Rule Machine will be tremendously increased in the process.
The Goal: Use Rule Machine to heat my inground pool as much as possible using my Solar Pool Heating system.
The Problem: I can get a decent amount of heat from the solar system. However, it can cool the pool just as effectively as it can heat it. Meaning, when the system is under manual control and I forget that it is running, I can heat the pool up a few degrees during the day, and then cool it right back down again by leaving it running overnight! When it is sunny out, it absorbs solar radiation and heats the water, but when the sun isn't out, and the ambient temperature is lower than the pool water it just radiates heat and cools the water!
Compared to manual control, a very simple program to turn the solar system on in the afternoon and then off at night should be a step forward.
The Twist to Make it Interesting: However, here in Seattle, I'm really trying to get the most out of this system in the spring and fall when it might be sunny, but with an outdoor ambient temperature that is often lower than the pool temp setpoint (80 degrees). In this conditions it is little more complicated. If there is minimal solar radiation to absorbed, running the system can cause cooling. So, to really get good use of this system I need to understand and figure out how to control the system to heat the pool during parts of the year when the ambient temperature is below the pool set point of 80 degrees. Iāve found that on REALLY sunny days, even down to 65 degrees, I can get heat.
The Hardware Setup:
-Zooz MultiRelays are setup to control the variable speed pool pump (lo, med, high speeds) and to operate all the pool valves.
-A Qubino Thermostat and a Qubino Multirelay are connected to temperature probes in the pool plumbing. Probe 1 Measures the water coming directly from the pool - I call this one Pool Temp. Probe 2 measures the water coming down from the solar heating system - I call this one Solar Temp.
-Ecowitt PWS measures outdoor temperature, illuminance, UV index, wind, precipitation, etc and reports it all to Hubitat.
My Current Rule Machine Rules:
So far, Iāve made two rules, one to turn the system on, and one to turn the system off.
Turn On:
My thinking is that there must be an absolute minimum ambient temperature that is needed for heating to work. I donāt know yet what that is, but I presume that over time I will empirically figure it out. For now, I chose 55 degrees, which I suspect is quite a bit too low. Then, and I think more importantly, is illuminance. If itās not sunny, no heat. Iāve seen this sensor report as high as 100,000. I chose 40,000 as a starting point.
So, Iāve set
Illuminance > 40,000
AND
Temperature > 55 degrees as predicate conditions.
Then, for the trigger event, Iāve actually chosen a pool temp set point of 85 degrees and tell the system to trigger when the Pool Temp is < 85.
If that trigger is met, it opens the solar pool heating valve, waits 30 seconds and then turns on the pool pump.
(Or at least thatās what I think this rule is doing)
Turn Off
Now, do I even need a separate rule to turn off? This is one of the things that I donāt understand well about rule machine. If the trigger event of the Turn On rule is met, would the Turn On rule turn the valve off and turn the pump off?
Anyway, for the Turn off Rule, Iāve set a predicate condition of the Solar Pool Heating being on. If its not on, why bother, right?
Then, if the solar heat is on, it is set to turn the system off if ANY of these conditions are met:
-its too cold, PWS temp < 54
-Pool is warm enough, Pool Temp > 85.5
-No sun, Illuminance < 38,000
If those conditions are met, it turns off the solar valve and turns off the pool pump. I have it turn off Pump Med and Pump Hi because I have another rule that turns the pump up to high if there is a large delta between Pool Temp and Solar Temp.
====
Currently, this seems to work, but I have found some issues:
-there are times that I expect the system to be on and its not. It is as if the on rule isnāt firing all the times that it should.
-Do I actually need two rules?
-Clouds cause trouble. A cloud passes by, illuminance plummets, and the system shuts off. So, I can have these partly cloudy days where I can get heat, but the system spends all day short cycling on and off. Is there way to stop that? Iāve thought of trying UV index instead of illuminance since clouds donāt filter UV light nearly as well as visible light.
-Iād also love to be able to use the delta (as suggested by another user here) between Pool Temp and Pool Solar as a shut off condition. But, again, short cycling is an issue. It needs to let the system run for at least a few minutes before checking because right when the system starts it usually reads low until water starts coming in from the solar.
Anyway, I think Iāve got a good setup here with sensors, motor control, pump control. Now its just figuring out how to best program rule machine