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.

Setting AC

Featured Replies

Posted

I have 4 different time settings for my AC: Morning, Leave for Work, Arrive Home & Sleep. The Morning is at 6 AM and the "Leave for Work" is at 9 AM. Which is better:

 

A) If

From 6:00:00AM

To 9:00:00AM (same day)

 

Then

Set 'AC - 1st Floor' Mode Cool

Set 'AC - 1st Floor' Fan Auto

Set 'AC - 1st Floor' 70° (Cool Setpoint)

 

Else

- No Actions - (To add one, press 'Action')

 

Or

 

B) If

Time is 6:00:00AM

 

And then an IF for Time is 9:00:00AM for the "Leave for Work" program?

 

Thanks.

You could accomplish all 4 set points with 2 programs as follows:

 

If
From 6:00:00AM
To 9:00:00AM (same day)

Then
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 70° (Cool Setpoint)

Else
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 75° (Cool Setpoint)

 

If
From 
To  (same day)

Then
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 70° (Cool Setpoint)

Else
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 72° (Cool Setpoint)

 

Each program will trigger twice each day. Once at the From time (running then) and once at the To time (running else).

 

-Xathros

  • Author

Wow. That is extremely interesting.

 

1) So the ELSE command is really just a trigger that occurs at the TO time?

2) It is not that the system is always monitoring the time?

3) Your explanation makes much more sense as, now that I think about it, how could the system be constantly checking if it is between (or outside) a certain time range, right?

4) But, if the command doesn't trigger for one reason or another, how can I build in a fail-safe?

 

Thank you so much for your assistance.

Xathros, if the ISY is rebooted for whatever reason wont the two programs run and possibly set the tstat incorrectly?

ISY is event driven. The From and To times are the events that drive these particular programs. The only way I see an event like these being missed is if the power were to fail and a fro or to time passes while its out.

 

There is a setting in the ISY configuration "Catch up schedules at restart" that forces the ISY to run all time based programs in sequence starting from the previous midnight. This will resolve this for you but may have other side effects if you have other time driven programs. Many of us do not use the catch up feature for this reason.

 

If really necessary, we could add a state variable to the if sections of your programs to act as an extra trigger and build another program to increment that mvar once a minute or every 5 minutes as follows:

 

Time Trigger program. Set this one to Run at Startup.

 

If 
  Time is From 12:01 am
  To 11:59 pm (same day)

Then
  Repeat every 5 minutes
      s.TimeTrigger =+ 1

Else

 

Then modify your other 2 programs as follows:

If
From 6:00:00AM
To 9:00:00AM (same day)
and s.TimeTrigger > 0

Then
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 70° (Cool Setpoint)

Else

 

If
From 9:00 am
To  (same day)
and s.TimeTrigger > 0

Then
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 75° (Cool Setpoint)

Else

 

This way, the program triggers at both the from and to times and every 5 minutes in between. You will need to create 2 more programs to handle the remaining time slots:

 

If
From 
To  (same day)
and s.TimeTrigger > 0

Then
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 70° (Cool Setpoint)

Else

 

If
From 
To 6:00 am (next day)
and s.TimeTrigger > 0

Then
Set 'AC - 1st Floor' Mode Cool
Set 'AC - 1st Floor' Fan Auto
Set 'AC - 1st Floor' 72° (Cool Setpoint)

Else

 

Since we are using a State variable here, and programs that reference state variables in their If sections are triggered anytime the value of the state variable changes, we are able to force the evaluation of all for setpoint programs whenever we change the value of s.TimeTrigger. The first program simply increments the value of that variable every 5 minutes. We can't use the Else blocks anymore because all of the setpoint programs will trigger every 5 minutes and three of the four programs should evaluate to false each time.

 

-Xathros

Xathros, if the ISY is rebooted for whatever reason wont the two programs run and possibly set the tstat incorrectly?

 

Assuming "Catch up schedules" is enabled, depending on the time at startup, one or both may run but my understanding is that they would run in sequence. As long as comms are good to the thermostat, then it should work as planned. If catchup schedules is NOT enabled, then the stat will remain at its last set point until the next trigger time rolls around.

 

Unless, both programs are selected to Run at Startup in which case there will be a race condition between the two else sections and the stat will most likely be set wrong. Neither of these programs should be set to run at startup.

 

All of that said, my last post (above) details another method that should enforce the correct setting every 5 minutes but requires 3 more programs to pull it off.

 

-Xathros

Assuming "Catch up schedules" is enabled, depending on the time at startup, one or both may run but my understanding is that they would run in sequence.
Ah, I was not aware the programs would run in sequence during catch up schedules! And sorry for my short question, it was based on the assumption that the op's catch up schedules was checked.

 

Thanks,

Tim

  • Author

But is there a reason why 2 programs (using THEN and ELSE) is better than 4 (using just THEN)? Would there be more stability or is it just "cleaner"?

But is there a reason why 2 programs (using THEN and ELSE) is better than 4 (using just THEN)? Would there be more stability or is it just "cleaner"?

 

The reason to use 4 over 2 is illustrated in my second example where we force a check every 5 minutes. If we don't need that, then there is no difference and is simply a matter of preference.

 

-Xathros

  • Author

Unless I am missing something, in your example above using the TimeTrigger, you still told me that I needed 4 :).

Correct. If using the state variable to force a check every 5 minutes, we need to break it into 4 set point programs to avoid conflicts with the else blocks.

 

If you don't need the forced check every 5 minutes then you can use either the original 2 programs or the 4 program version (without the state mvar) to achieve the same result. In that case, its just a matter of what you like better. There are often several ways to accomplish the same end result with the ISY and often it comes down to a matter of style or what you find easier to read. I sometimes use more programs than I need to just to make things easier to follow.

 

-Xathros

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.