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.

Very Basic Programming Question

Featured Replies

Posted

New ISY-99i user here, and I have a very basic question about programming.

 

For one of the lights I have, I setup two programs. One will turn the light on one hour before sunset, and another will turn it off one hour after sunrise. In going back through the User Guide, I found this sample program:

 

If

From Sunset + 20 minutes

To 10:00:00PM (same day)

Then

Set Scene 'FrontDoor' On

Else

Set Scene 'FrontDoor' Off

 

While this is a lot neater than having two separate programs, doesn't this method constantly send On or Off signals to that switch? Or does this program only run twice per day, once at Sunset + 20 minutes, and again at 10:00pm?

 

Thanks

Hi John -

 

It runs twice per day. At Sunet + 20 minutes the THEN portion is run, and at 10:00pm the ELSE portion is run.

  • Author

Thanks Mike.

 

Just to be sure I have this right, I took a program that turns a light on 2 hours before sunset, and merged it with one that turns that light off 2 hours after sunrise. Here's what I have now:

 

If

From Sunset - 2 hours

To Sunrise + 2 hours (next day)

 

Then

Send X10 'J9/On (3)'

 

Else

Send X10 'J9/Off (11)'

 

So, if I understand correctly, the "Then" clause will run at Sunset - 2 hours, and the "Else" clause will run 2 hours after sunrise the next day? I'd hate to look at the log and see that every few seconds the ISY is sending the same command (on or off), over and over again to the J9 X10!

Yes, looks correct to me.

  • Author

Thanks for the info. I do appreciate it.

You can also do some elegant program saving steps with something as simple as a control switch like:

 

If
       Control 'Bedroom ControLinc.1' is switched On
   And Control 'Bedroom ControLinc.1' is not switched Off

Then

       Send X10 'E1/On (3)'

Else

       Send X10 'E1/Off (11)'


 

As a new user it took a while for me to get used the the fact that the ISY is event based.

 

This is why it does not keep sending commands. It runs the then when the conditions become true and the else when the conditions become false.

 

This is important to remember when building new programs because this efficiency does have some unexpected consequences for the uninitiated. For example, in your program, if you were to turn off the J9 manually when it was on because the program had turned it on, the light would stay off till the next event changed the condition of this program. IE: J9 would not get turned on by the ISY until the next night, when the conditions once again became true.

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.