Jump to content

Freeze Protection for Pool Equipment


barkster

Recommended Posts

I wrote this to try and prevent my pool equipment from freezing but it never goes off and don't know why.  Everything turns on but nothing ever gets turned off.  What am I missing?

 

Antifreeze - [ID 002C][Parent 003E][Not Enabled]

If
        'PoolTemp' Temperature < 29.0°
 
Then
        Set 'Pool Equipment / SpaValve' Off
        Wait  15 seconds
        Set 'Pool Equipment / FilterPump' On
        Wait  10 seconds
        Set 'Pool Equipment / Polaris' On
        Wait  10 seconds
        Set 'Pool Equipment / Waterfall' On
        Wait  15 minutes 
        Set 'Pool Equipment / Waterfall' Off
        Wait  30 minutes 
        Set 'Pool Equipment / Polaris' Off
        Set 'Pool Equipment / FilterPump' Off
        Set 'Pool Equipment / Waterfall' Off
        Repeat Every  2 hours 
 
Else
   - No Actions - (To add one, press 'Action')
 

 

Link to comment

The problem is likely that each time the temp changes the then body is restarting.  I don't know the nature of where your temp value is coming from or how often it is updated. 

To test that theory, leave it disabled and right click and 'run then' if the then body does what you're expecting under those conditions then the IF body being re-evaluated is the problem.

  • Like 1
Link to comment

to fix the looping problem use 3 programs:

(apologize these have form typos because I did it off the top of my head, i didn't go create sample programs... if that results in questions please feel free to ask.)

antifreeze.on

If

'PoolTemp' Temperature < 29.0°

then

    Run program antifreeze.loop (then)

else

(none)

 

Antifreeze.loop - [ID 002C][Parent 003E][Not Enabled]

If
      (none)  
 
Then
        Disable Anti-freeeze.on
	Repeat Every  2 hours 
        	Set 'Pool Equipment / SpaValve' Off
        	Wait  15 seconds
        	Set 'Pool Equipment / FilterPump' On
        	Wait  10 seconds
        	Set 'Pool Equipment / Polaris' On
        	Wait  10 seconds
        	Set 'Pool Equipment / Waterfall' On
        	Wait  15 minutes 
            	Set 'Pool Equipment / Waterfall' Off
            	Wait  30 minutes 
            	Set 'Pool Equipment / Polaris' Off
            	Set 'Pool Equipment / FilterPump' Off
            	Set 'Pool Equipment / Waterfall' Off
        
 
Else
   - No Actions - (To add one, press 'Action')

antifreeze.off

If

'PoolTemp' Temperature > 30.0°

then

    stop program antifreeze.loop

    Set 'Pool Equipment / Polaris' Off
    Set 'Pool Equipment / FilterPump' Off
    Set 'Pool Equipment / Waterfall' Off

    enable program antifreeze.on

else

(none)

 

the second program antifreeze.loop should be disabled.

Edited by MrBill
Link to comment

I would suggest a little bit different structure. It is often the case that you need two programs when switching "modes" results in long running programs. You'll see the two tier programming structure in a lot of examples around on this site.

Here you need two two-tier programs (four total programs): A FreezeProtectionMode On pair of programs and a FreezeProtectionMode Off pair of programs. The FreezeProtectionMode On pair of programs consists of a "trigger program" that is enabled and uses a state variable:

If
            FreezeProtectionMode = 0
    And PoolTemp <= 34 degrees
Then
    Run Program TurnFreezeProtectionModeOn (Then Branch)
Else
    <--- No Action ---> 

The second program in the pair is disabled, sets the state variable, and performs the actions:

If
Then
     Set FreezeProtectionMode Value = 1
    Set FreezeProtectionMode Default = 1
     Repeat Every 2 Hours
       ...

The FreezeProtectionMode Off pair of programs also has an enabled "trigger program":

If
            FreezeProtectionMode = 1
    And PoolTemp >= 37 degrees
Then
    Run Program TurnFreezeProtectionModeOn (Else Branch)
Else
    <--- No Action ---> 

The "second" program of the Off pair could be it's own program that resets the state variable, kills any running TurnFreezeProtectionModeOn program and performs the necessary functions to restore the pool to normal operating mode, or it could just all go into the Else branch of the TurnFreezeProtectionModeOn program to keep all the statements together. The other good thing about putting it in the Else branch is that any running instance of the TurnFreezeProtectionModeOn is automatically killed (i.e. any Repeat or Wait is preempted) in favor of the new instance of the Else branch of the program. 

Edited by Goose66
Link to comment
19 minutes ago, barkster said:

You mentioned program wasn't making sure everything got turned off.  If it goes above my set point how is it turning off the pumps, etc... it only stops the loop but the pumps are one won't they remain on?

check the edit to the 3rd program above.  I added turning everything off.

  • Like 1
Link to comment
24 minutes ago, barkster said:

thanks for all the help, unfortunately I lost power at 7pm and has been out since.  I had to drain everything.  Let's hope it survived. 

wow... I hope it comes back soon!!   We've had rolling blackouts that make me nervous, but no sustained outage.  

Stay Warm!!

Link to comment

got it back for now 24hours later.  One more question you mention that antifreeze.loop should be disabled.  So when it disable and you call the then statement it will still run the then?  It seems like when I tried first time with it disabled it didn't run but who know.  Just want to confirm that disabled programs can still have the "then" statement executed.  Thanks

  • Like 1
Link to comment
12 hours ago, barkster said:

got it back for now 24hours later.  One more question you mention that antifreeze.loop should be disabled.  So when it disable and you call the then statement it will still run the then?  It seems like when I tried first time with it disabled it didn't run but who know.  Just want to confirm that disabled programs can still have the "then" statement executed.  Thanks

Disable effectively disables the IF portion.   When disabled a program still runs when run manually from the admin console, or Run by another program.   In actuality with no If statement it doesn't matter if the program is enabled or disabled, it just seems most people around here tend to disable and leave them disabled.

Right click My Programs at the top and make sure that Status Icons is set to detailed:

image.png.b332b97e8027a0fc39cd9b20914de3aa.png

With detailed status Icons the icon to the left of the program name will tell you much.  Examples:

image.png.cfd7cef05ff4c6399cdfac1b57852cf5.png

Solid Red: the ELSE block of the program is currently running.

Solid Green: the THEN block of the program is currently running.  (your .loop program would be solid green when the the block is running/active.

Red Strip: the IF last evaluated to false, and if the program has an ELSE block it was run, but its not currently active.

Green Strip: the IF last evaluated to True, and if the program has a THEN block it was the run, but its not currently active.

the international NO symbol (Red Circle with a Red Slash) means that the program is disabled and the IF conditions will not run, but the program can still be run manually or run by another program.

Folders can also have conditions (IF) but do not have actions.  Folder conditions don't work the same way Program If conditions work.  I'll stop there because folder conditions are for an advanced class ? but just recognize they work differently for now.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...