PC Access automation structure

wdeertz

Active Member
As there seems to be no way to group items in PC Access automation, I am not sure how it interprets the or statements.  As an example:
 
When x.....
       If A.....
       If B.....
       If C.....
          or
       If D.....
Then .......
 
Does PCA compare Conditions (A + B + C) or D  or is the "or" only on Conditions C or D?   If its the latter is there a way to have multiple conditions grouped together?
 
Thanks for any assistance.  I'm still trying to get up to speed on javascript to I can utilize the power of HaikuHelper.
 
The OR condition is for the whole set before and after the OR.  e.g.  (A + B + C) OR (D).  
 
JonW said:
The OR condition is for the whole set before and after the OR.  e.g.  (A + B + C) OR (D).  
 
Jon, thanks for confirming this programming logic.  This probably explains why some of the automations weren't properly working.  Is the 'or' logic necessary when trying to isolate a time span which goes across the midnight hour?  An example may make it easier to understand my question, I'd like to set my thermostat to certain settings between 11pm and 7am:
 
Every 15 minutes.......
If Alarm away....
If Outside Temp < 65...
If Current Time >= 2300
or
If Current Time <=700
Then Set Heatsetpoint to 72.....
 
I originally tried the above without an 'or" but then I guess it would never be true as a current time can't be both > 11pm and < 7am since it rolls over at midnight.  It seems inefficient but is the way to go to repeat the first two 'If' lines?  So
 
Every 15 minutes.......
If Alarm away....
If Outside Temp < 65...
If Current Time >= 2300
or
If Alarm away....
if Outside Temp < 65...
If Current Time <=700
 
Then Set Heatsetpoint to 72.....
 
This seems really inefficient.  I really need to complete my javascript web tutorials so I can use HaikuHelper.  Thanks
 
wdeertz said:
Jon, thanks for confirming this programming logic.  This probably explains why some of the automations weren't properly working.  Is the 'or' logic necessary when trying to isolate a time span which goes across the midnight hour?  An example may make it easier to understand my question, I'd like to set my thermostat to certain settings between 11pm and 7am:
 
Every 15 minutes.......
If Alarm away....
If Outside Temp < 65...
If Current Time >= 2300
or
If Current Time <=700
Then Set Heatsetpoint to 72.....
 
I originally tried the above without an 'or" but then I guess it would never be true as a current time can't be both > 11pm and < 7am since it rolls over at midnight.  It seems inefficient but is the way to go to repeat the first two 'If' lines?  So
 
Every 15 minutes.......
If Alarm away....
If Outside Temp < 65...
If Current Time >= 2300
or
If Alarm away....
if Outside Temp < 65...
If Current Time <=700
 
Then Set Heatsetpoint to 72.....
 
This seems really inefficient.  I really need to complete my javascript web tutorials so I can use HaikuHelper.  Thanks
 
What Tstats are you using?
That logic can be performed inside an RC2000 using the occupancy mode.
Using the Away status as the trigger point and programming Away setpoints (unless you want different day/night away settings which would require fewer programming lines used in conjunction with the RC2000 anyway).
 
A Timeclock can be used to set the time window you want, and then you only need to check the status Active or Inactive of the time clock.
 
 
Every 15 minutes
AND If Alarm away
AND If Outside Temp < 65
AND If TimeClock 1 Active  (where the parameters for Timeclock 1 are on at 2300 and off at 0700)
THEN Set Heatsetpoint to 72
 
 
Otherwise
Since you want to set your Tstat At night, why are you using a EVERY 15 Minutes trigger?  That will continuously set the Tstat every 15 minutes when the conditions are true.
Why not use the time as the trigger?
 
Desert_AIP said:
 
What Tstats are you using?
That logic can be performed inside an RC2000 using the occupancy mode.
Using the Away status as the trigger point and programming Away setpoints (unless you want different day/night away settings which would require fewer programming lines used in conjunction with the RC2000 anyway).
 
A Timeclock can be used to set the time window you want, and then you only need to check the status Active or Inactive of the time clock.
 
 
Every 15 minutes
AND If Alarm away
AND If Outside Temp < 65
AND If TimeClock 1 Active  (where the parameters for Timeclock 1 are on at 2300 and off at 0700)
THEN Set Heatsetpoint to 72
 
 
Otherwise
Since you want to set your Tstat At night, why are you using a EVERY 15 Minutes trigger?  That will continuously set the Tstat every 15 minutes when the conditions are true.
Why not use the time as the trigger?
I am using 2 RC1000 thermostats. I have setup different heat/cool set points for day/night and Summer/winter depending on outside temperature. The two thermostats also have different heat/cool set points as one is in an area less used in the house. I've used the every 15 minute routine since I am also using a manual override flag (since if I have guests I'd need to adjust the back thermostat to make it more comfortable) so if the flag is turned off it will get back to auto temp mode within 15 minutes. I've probably over complicated the programming but it seems to be working. Does the every 15 minute logic put an undue load on the system?
 
The every trigger shouldn't overload the system unless you use too many, even then I don't know what the practical limit is since the controller continuously scrolls through the program's looking for changes (with a 200ms response).

It's just kludgy to me from a programming standpoint. I use them in a few cases, but I usually try to find a trigger from the event I'm trying to monitor.

So if the set point is usually changed by a time event and you can check for a manual change.

I have a party flag I enable that over rides a lot of automated daily routines. Same with an overnight guests flag.


Try the time clock to reduce the number of lines you'll need.
 
wdeertz said:
I am using 2 RC1000 thermostats. I have setup different heat/cool set points for day/night and Summer/winter depending on outside temperature. The two thermostats also have different heat/cool set points as one is in an area less used in the house. I've used the every 15 minute routine since I am also using a manual override flag (since if I have guests I'd need to adjust the back thermostat to make it more comfortable) so if the flag is turned off it will get back to auto temp mode within 15 minutes. I've probably over complicated the programming but it seems to be working. Does the every 15 minute logic put an undue load on the system?
 
I assume you don't cool in Winter nor heat in Summer, but you have heat and cool set points for the temperature band you want to maintain and the system is in auto so it can choose which mode to operate in.
But it sounds like you are using the timed program rather than occupancy mode, is that correct?
 
You can also set setpoints into the outdoor temperature sensor and use it's status when it goes SECURE or NOT READY to trigger actions.
So if you want something to happen when the temperature outside drops below 65 degrees you can trigger off of that.
You can also still use it as a conditional checking either it's status Secure/NOT READY or the actual value.
 
Desert_AIP said:
I assume you don't cool in Winter nor heat in Summer, but you have heat and cool set points for the temperature band you want to maintain and the system is in auto so it can choose which mode to operate in.
But it sounds like you are using the timed program rather than occupancy mode, is that correct?
 
You can also set setpoints into the outdoor temperature sensor and use it's status when it goes SECURE or NOT READY to trigger actions.
So if you want something to happen when the temperature outside drops below 65 degrees you can trigger off of that.
You can also still use it as a conditional checking either it's status Secure/NOT READY or the actual value.
 
I live in a location with moderate temperatures but we can get large swings from morning lows to afternoons highs.  When its cold outside I want to heat to a higher temperature than I want to cool to when its hot outside.  So when the outside temperature is lower than 65F I use my winter cool/heat set points as I want to heat to 74F (cool 78F) (however at night the set points are 71/78 as I prefer a cooler temp to sleep).  If the outside temperature is greater than 65F then I cool to 72F (heat 68F).  So as you indicated  I am using the outside temperature to trigger my winter/summer set points, note that its winter now but with daytime highs I am often seeing my summer set points.  Thanks for the recommendation on using the Time Clock, I wasn't familiar with how this worked but after reading the manual I've implemented and saved myself a few lines in my automation.
 
I should also mention that I originally had all my heat/cool set points hard coded in my automation but have now changed to user settings so they are more easily changed on the fly.  
 
Timeclocks are very useful, I wish there was more than 3.
 
I use the occupancy mode of the tstat.
So the Day, Night and Away setpoints change based on the arming condition.
Automation changes the arming mode, if I don't do it manually, based on a number of criteria (which affects other things besides HVAC).
 
And I use the Auto mode so the system decides whether or not to heat or cool based on the setpoint window - and compared to the outside temp.
If it's warmer inside than the setpoint, the system engages cooling, if it's cooler it engages heating.
If it's cool outside but the house is too warm, the HVAC won't engage and I get a prompt to open some windows.
Also, if I open a window for more than 5 minutes the HVAC shuts down and won't reengage until all windows are closed.
 
The night setpoints are cooler than day, and the away setpoints are also cooler.
I based the setpoints initially on a research paper I read regarding efficiencies/running times/setbacks and then tweaked them for comfort and energy savings as I needed.
I also use some User Settings setpoints that are modified automatically if the Party or Overnight Guests modes are active. 
(we tend to keep it cooler in the house in winter than most people are used to for example.)
 
Back
Top