Jump to content

"Time is Last Run Time + X" is too literal, How to do "Time > Last Run Time + X"


Recommended Posts

Posted

I'm trying to control an AirConditioner, and I don't want it to run within 5 minutes of it's prior power down ...

"AC OFF": if ( temperature < 75 ) then set "AC off"
"AC ON": if ( temperature > 75 && "Time is Last Run Time for 'AC Off' +  5 minutes" )

won't work, since the "Time is Last Run Time" is too literal.  if the temperature doesn't exceed 75 until 6 minutes later, then the "Time is last run" condition is false.

I've tried things like ...

"AC OFF": if ( temperature < 75 ) then set "AC off"; variable Delay=1
"AC Delay" if ("Time is Last Run Time for 'AC OFF' +  5 minutes" ) then variable Delay=0
"AC ON": if (temperature > 75 && Delay=0) then set "AC on"

This allows for "AC ON" to trigger at some later point when the temperature exceeds 75 ... But for some reason, occasionally "AC Delay" doesn't always trigger, so it doesn't always set Delay=0.  (This especially occurs if/when the ISY has a power outage during the "Time is Last Run" window. )

Is there a way to say "Time > Last Run Time + XXX" ? (and yes, the above program is trivial, but I have multiple programs that use the "Time is Last Run", that have the same issue.

@shley
 

 

Posted

Program AC_Off_Thermostat

If

     temp < 75

then

    Set AC off

    Disable Program AC_On_Thermostat

    Wait 5 minutes

    enable Program AC_On_Thermostat

----------------------------------

Program AC_On_Thermostat

If

      temp > 77

then

      set AC On

----------------------------------

Program AC_Reset (Disabled) (Run at startup)

If

  (none)

then

     Wait 5 min

     enable Program AC_On_Thermostat

 

   

 

Posted

If you are trying to control a window shaker style A/C, they usually have a time delay built into the thermostat.

If you are trying to control a central A/C unit you need a proper thermostat to avoid this fast cycling. You are playing with an expensive piece of equipment and a compressor starting backwards due to a mistake i programming, controls, or bad comms, can cost you a lot of money and agravation.

Get a proper thermostat and control it with programs.

Posted

  

Just now, larryllix said:

If you are trying to control a window shaker style A/C, they usually have a time delay built into the thermostat

In this instance, it is for window units .. but (a) only the digital ones haves timers, and (b) their timers don't withstand power outages cause by the ISY turning off the outlet.  I'm using Ecobees (and remote sensors) to manage the temperatures based on time and occupancy ... (and effectively centrally manage and control ~8 window units.)
 

6 minutes ago, MrBill said:

Program AC_Off_Thermostat

If
     temp < 75
then
    Set AC off
    Disable Program AC_On_Thermostat
    Wait 5 minutes
    enable Program AC_On_Thermostat

----------------------------------

Program AC_On_Thermostat

If
      temp > 77
then
      set AC On

----------------------------------

Program AC_Reset (Disabled) (Run at startup)

If
  (none)
then
     Wait 5 min
     enable Program AC_On_Thermostat

For some reason, I assumed that "run at startup" required "enabled Program" ... (probably because of the way it's presented in the admin tool)

I also hadn't thought of enabling/disabling programs as a way to control their ability to be executed. With the example above, I assume that the "Enable program" will cause it to evaluate the conditional immediately? or will it wait until the next time it sees a change in the temp? (ie, if temp=78 when AC_On_Thermostat is re-enabled, would it turn on the AC? or will it just wait until temp=79 ?

 

 

Posted (edited)
23 minutes ago, albrandwood said:

  

In this instance, it is for window units .. but (a) only the digital ones haves timers, and (b) their timers don't withstand power outages cause by the ISY turning off the outlet.  I'm using Ecobees (and remote sensors) to manage the temperatures based on time and occupancy ... (and effectively centrally manage and control ~8 window units.)
 

For some reason, I assumed that "run at startup" required "enabled Program" ... (probably because of the way it's presented in the admin tool)

I also hadn't thought of enabling/disabling programs as a way to control their ability to be executed. With the example above, I assume that the "Enable program" will cause it to evaluate the conditional immediately? or will it wait until the next time it sees a change in the temp? (ie, if temp=78 when AC_On_Thermostat is re-enabled, would it turn on the AC? or will it just wait until temp=79 ?

 

 

Mechanical thermostats on window shakers have thermal time delays built into the stats to protect themselves, usually. Not a foolproof method but it works 99.99% of the time if controlled from the knob. You want remote switching though.

Run at Startup does not require  program triggers to be enabled although things may have changed so testing would be the best. Not easy to test and requires rebooting your ISY unfortunately.

I temporarily disable programs but it's usage should be done with care as a power interruption can leave programs locked out permanently until they are manually enabled again.

Here is one technique I use to assure programs are enabled at startup.

Program
If     [Run at startup enabled]
   some device is Switched On <----- switched constructs are always False unless device triggers this line
Then
    do whatever you usually do
Else
   enable program (self)
   run (then) program(self)  <---- if Then run is desired

Edited by larryllix
Posted (edited)
1 hour ago, albrandwood said:

  

In this instance, it is for window units .. but (a) only the digital ones haves timers, and (b) their timers don't withstand power outages cause by the ISY turning off the outlet.  I'm using Ecobees (and remote sensors) to manage the temperatures based on time and occupancy ... (and effectively centrally manage and control ~8 window units.)
 

For some reason, I assumed that "run at startup" required "enabled Program" ... (probably because of the way it's presented in the admin tool)

I also hadn't thought of enabling/disabling programs as a way to control their ability to be executed. With the example above, I assume that the "Enable program" will cause it to evaluate the conditional immediately? or will it wait until the next time it sees a change in the temp? (ie, if temp=78 when AC_On_Thermostat is re-enabled, would it turn on the AC? or will it just wait until temp=79 ?

 

 

Disabling a program only disables the "sensing aspects" of the IF statement.  Disabled programs will still run if called by another program or if run at startup.  (the run at startup program doesn't really need to be disabled either since the If body is blank). 

It will wait until the next time a temp change is detected.  or you could add this:

Program AC_Off_Thermostat

If

     temp < 75

then

    Disable Program AC_On_Thermostat    <--I just reversed these two.  (this order is better for the original program)

    set AC Off                               <-- I Just reversed these two.  (they should have been in this order originally)

    Wait 5 minutes

    enable Program AC_On_Thermostat

    Run Program AC_On_Thermostat (If)          <-- Force immediate detection

Edited by MrBill
fixed an error
Guest
This topic is now closed to further replies.

  • Recently Browsing

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

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...