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.

sunrise program question

Featured Replies

Posted

I have the following program and want to revise it so on Sat, Sun it comes on at 8:00. However I do not want it to come on if 8:00 is after sunrise. How do I do this?

 

If

On Mon, Tue, Wed, Thu, Fri

From 5:50:00AM

To Sunrise (same day)

Or On Sat, Sun

From 5:50:00AM

To Sunrise (same day)

 

Then

Set '24.82.CB.1 Library glass' On

Set '24.7A.16.1 outside driveway' On

Set '24.7B.39.1 outside front cans' On

 

Else

Set '24.82.CB.1 Library glass' Off

Set '24.7A.16.1 outside driveway' Off

Set '24.7B.39.1 outside front cans' Off

 

Turns on and then off library/driveway/front outside can lights in the morning

Have you tried the simple approach of:

 

On Mon, Tue, Wed, Thu, Fri

From 5:50:00AM

To Sunrise (same day)

Or On Sat, Sun

From 8:00:00AM

To Sunrise (same day)

 

I must admit that I am unsure what happens with a program when the FROM time is after the TO time. Perhaps you could create a temprary program as an experiment to find out?

 

From

A couple of minutes from now

To A minute from now

Then

Else

 

Then watch the program status as the times pass. If the program stays FALSE, you are golden with the suggested simple approach.

I believe that a program like that where the "to" time ends up being after the "from" time simply doesn't run at all (doesn't trigger). So neither a "then" or "else" will execute.

 

Edit: Oops. I meant to say "from" time is after "to" time. But the fact that it doesn't trigger is correct. Unless you have some other condition, the program doesn't trigger. And if you have another condition, the time clause will be "false"

Neither "Then" nor "Else" runs as evidenced by my chime labelled "Furnace Fan" that didn't beep.

If
       From     9:06:00AM
       To       9:05:00AM (same day)

Then
       Set 'Testing / Furnace Fan' On

Else
       Set 'Testing / Furnace Fan' On


Well...thanks to the input of apostolakisl ald test of larryllix, I would conclude that the codiotion of

 

If time is from 0800

To sunrise (same day)

 

Would be perfect for this application.

  • Author

Thanks everyone!

Interesting - I would have expected a slightly different behavior. Since in other place it has been stated that the program triggers at the from and to times and since the condition is false in this case I would have expected that the program would trigger but the condition would be false and hence the else would run. This is yet more evidence for the need to clarify triggers versus conditionals from the other thread that is running.

Interesting - I would have expected a slightly different behavior. Since in other place it has been stated that the program triggers at the from and to times and since the condition is false in this case I would have expected that the program would trigger but the condition would be false and hence the else would run. This is yet more evidence for the need to clarify triggers versus conditionals from the other thread that is running.

 

The fact that a from time and to time that are backwards causes both times to be non-trigger events demonstrates that ISY is capable of ignoring triggers in certain situations. It would be great if one of those situations was by putting a disable/enable checkbox next to any clause that can be a trigger.

Interesting - I would have expected a slightly different behavior. Since in other place it has been stated that the program triggers at the from and to times and since the condition is false in this case I would have expected that the program would trigger but the condition would be false and hence the else would run. This is yet more evidence for the need to clarify triggers versus conditionals from the other thread that is running.

 

This was how I would have guessed as well, but this would have also been fine for this application. Of course, there would have been a couple of extra (and unnecessary) OFF commands transmitted, but I suspect this would have been unnoticed.

Interesting - I would have expected a slightly different behavior. Since in other place it has been stated that the program triggers at the from and to times and since the condition is false in this case I would have expected that the program would trigger but the condition would be false and hence the else would run. This is yet more evidence for the need to clarify triggers versus conditionals from the other thread that is running.

I got thinking and doubting myself on this one. I began to wonder if I forgot to enable the programme when I ran the tests so I re-ran the test ensuring that the enable was on.

 

It functioned the same with NO triggers of Then or Else occurring, and the programme remained False the whole time, when the From/To times were crossed.

I think that this is an ideal way to deal with crossed from/to times. It is an illogical condition and ignoring it as a trigger is likely to prevent the most un-intended consequences. If there are other triggers then you are forced to make a decision, and "false" is of course the only acceptable one.

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.