Jump to content

Help with Program to control pond heater involving both Scheduling and Weather data


rayg

Recommended Posts

Posted (edited)

 

FYI the heater keeps a hole in the ice to allow decomposition gases to exhaust.

So a few times a day I want to check the current temperature and run the heater for a variable amount of time.

IF (   Time is 5am or Time is 8pm )  -- Cheap hours

AND (OpenWeatherMap Temperature <= 0 and > -5.0)   -- Celsius

Then

Set Pond Heater ON,

Wait 1 Hour,

Set Pond Heater OFF;

Unfortunately This program (and the 2 variants I have for running 2 and 3 hours) run more often than 5am and 8pm and often leaves the device ON;

 

What would really like is the equivalent of a CASE statement or the ability to derive and store the Wait time based on the Temperature.  

CASE  Temp between -5 and 0 then Set waitTimeHours  = 1 

CASE Temp Between -10 and -5.1 then Set waitTimeHours  = 2

CASE Temp < -10 THEN Set waitTimeHours  = 3

 

Q1: What are your suggestions for achieving variable Wait times base on Temperature readings?

Q2: Is there a way for the Program Name and Step to be added to the Log for viewing?  Is logging granularity adjustable?

Q3: Is there a way to prevent a program from running if another instance is already running?  Sounds like that is a no but asking just in case.

Many thanks in advance.

...Ray

Pond Heater 1 Hr program.png

Edited by rayg
Posted (edited)

I started to reply but stopped because I figured someone else would have a better idea.....

But I would break it up into several programs

the First

If time is 5:00 AM

or time is 7:00 PM

or time is 12:00 AM

then

Run Temp_Range_1 (if)

 

Program Temp_Range_1

if temp <=0

and temp > -5

then

set pond heater on

wait 1 hour

set pond heater off

else

run Program Temp_Range_2

 

Program Temp_Range_2

if temp <=-5

and temp > -10

then

set pond heater on

wait  hour

set pon2d heater off

else

run Program Temp_Range_3

 

etc........

 

All programs after the first should be disabled so they don't run on temp alone.

 

 

Edited by MrBill
Posted

Thanks I like the idea especially the smart use of the ELSE clause.   

I am testing it now.  

As for Disabling the others do I really have to do that?  They would never run on a temperature change event would they?  

Thanks again for the reply.

...Ray

Posted
1 hour ago, rayg said:

As for Disabling the others do I really have to do that?  They would never run on a temperature change event would they? 

I believe that if you don't disable them they will run every time the temp moves.  Disabling them will cause them only to run when called by the time program.

  • Thanks 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...