Jump to content

programming question


vbsafire1

Recommended Posts

Can you have more than one line under the then? For instance when my garage door opens I want two different lights to go on. Right now I have "set scene" family room lights on. Under that I have "set scene" bedroom lamp on. I want both to go off after 10 min.

So far I can get everything to work correctly except the bedroom lamp will not go on???? Do I need to do a separate program exactly the same just adding bedroom lamp?

 

Thanks for the help

Link to comment

You can have as many lines in each section, If/Then/Else as is needed to so accomplish the tasks.

 

Suggest posting the Program as there may be something changing the Status the If is checking which could prevent all the Then statements from executing when there is a Wait.

Link to comment

If

From 10:10:00PM

To 1:10:00AM (next day)

And Status 'Garage / Garage door-Sensor' is On

 

Then

Set Scene 'Family Room Scenes / Family Room Lamp' On

Set Scene 'Kitchen Scenes / Kitchen Cabinets' On

In Scene 'Hallway Scenes / Hallway' Set 'Hallway / Hallway' 25% (On Level)

 

Else

Wait 2 minutes

Set Scene 'Kitchen Scenes / Kitchen Cabinets' Off

Set Scene 'Family Room Scenes / Family Room Lamp' Off

Set Scene 'Hallway Scenes / Hallway' Off

Link to comment

There does not appear to be any conflicts. What Scene contains the bedroom light? Try running a Scene Test against that Scene to see how reliable communications is with the devices in the Scene.

Have Tools | Diagnostics | Event Viewer with Level 3 running when running the Scene Tests and post the event log.

Link to comment

OK.....everything works great except I ran into one small problem. This program is suppose to run from 10:10pm until 1:10am next day. The family room lamp that is on this program is also on another program that turns the lamp on from 8pm until 10pm just like a regular timer. Unfortunately if I come through the garage door between 8 and 10 it seems the lamp will go off after 2 min. What am I missing. The 8 to 10 program should not be effected because I don't have the other program starting until 10:10pm right?

 

Confused???

Link to comment

An "If Status" triggers the Program any time the Status changes. When the door closes the Status changes to Off triggering the Program. The If is False (Sensor is not On) so the Else clause runs.

 

To clarify something in your last post, the Program is NOT "running" from 10:10 to 1:10. The Program is triggered at the From time, at the To time, and when the Sensor Status changes. Once the Program is triggered the If is evaluated for True or False. When the If is True the Then clause executes, when False the Else clause executes. This is not like a PC Program where the exe is invoked at 10:10 and continues to execute until 1:10. ISY Programs are event driven, triggered by the conditions in the If, driving either the Then or Else when triggered. There is no running ISY Program in the conventional sense.

Link to comment

With that said how can I correct it so that I do not want the else to run when the lamp program is running. Basically I do not want the garage program to execute any light on or off until after 10:10pm. How would I word that? My wording seems to be close but I need to add what? To make that happen.

Link to comment

You can have the lamp program Disable this Program such that it cannot be triggered until the time range of the first Program has passed. This Program can be broken into two Programs, separating the From/To in one Program and the If Status in another Program that is marked Disabled. That way the Program with the If Status never triggers itself. It can only execute when invoked at the From and To times in the first Program. Maybe the reverse of that. Put the If Status in the first Program and have the Then and Else clauses invoke different Programs that have a From/To time frame. That way Program two only runs when in the time range and the door is open. Program three only runs when in the time range and the door is closed.

 

Again, the thinking about Programs has to shift from Programs "running" to Programs being driven by events, time based events or device Status based events, even Variable value based events.

 

I'll provide examples that demonstrate an approach but I don't like to provide a complex solution. You learn nothing from that and the effort to maintain a complex solution goes on forever, Sorry. There are likely others who are willing to provide you with working Programs for anything you want to do but that does not help you learn ISY Programming.

Link to comment
Basically I do not want the garage program to execute any light on or off until after 10:10pm. How would I word that?

I would investigate the use of program folders. With such a folder, you can specify conditions where included programs will be enabled. For example, you could create a folder with the condition that included programs would be enabled between 1010 and 0110 (next day). In that folder, place your current program, with the condition modified to be based only upon the garage door sensor (removing the time-based condition).

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...