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