Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

 

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

  • Author

I thought for sure I'd get several suggestions.  :-(

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

  • Author

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

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.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.