Jump to content

program events


boser

Recommended Posts

Posted

I use several "programs" as flags to indicated the status of doors and windows (open/close, set through the rest interface). Based on these I control lights, e.g.

 

If

Program 'Staircase Door' is True

Then

Set 'Light Staircase' On

Wait 3 minutes

Set 'Light Staircase' Off

Else

- No actions

 

PROBLEM:

Whenever the staircase door is opened, it's associated program becomes true and the above program is run. Oddly enough, the light turns on also if it was previously off and the staircase door is closed. I.e. it appears as if program 'Staircase Door' turning false triggers the then clause of the above program. How can I avoid this?

 

Bernhard

Posted

Bernhard, would you be kind enough to post the contents of your Porogram Staircase?

 

With kind regards,

Michel

I use several "programs" as flags to indicated the status of doors and windows (open/close, set through the rest interface). Based on these I control lights, e.g.

 

If

Program 'Staircase Door' is True

Then

Set 'Light Staircase' On

Wait 3 minutes

Set 'Light Staircase' Off

Else

- No actions

 

PROBLEM:

Whenever the staircase door is opened, it's associated program becomes true and the above program is run. Oddly enough, the light turns on also if it was previously off and the staircase door is closed. I.e. it appears as if program 'Staircase Door' turning false triggers the then clause of the above program. How can I avoid this?

 

Bernhard

Posted

Sure. Is there a convenient way to copy and paste programs?

(Or any other means short of retyping?)

 

Thanks,

Bernhard

 

Bernhard, would you be kind enough to post the contents of your Porogram Staircase?

 

With kind regards,

Michel

Posted

Program Staircase Auto on/off

 

If

Program '*Z 1 Laundry Door' is True

Or Program '*Z 15 Entry Downstairs' is True

Or Program '*Z 17 Motion Downstairs' is True

Or Program '*Z 18 Staircase Door' is True

 

Then

Run Program 'Staircase light on at appropriate level' (If)

Wait 30 seconds

Set 'Light Staircase' Off

 

Else

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

 

 

Program Staircase light on appropriate level

 

 

If

From 6:00:00AM

To 9:00:00PM (same day)

 

Then

Set 'Light Staircase' On

 

Else

Set 'Light Staircase' 25%

 

 

 

 

 

 

You can right-click the Program and choose "Copy To Clipboard".
Posted

Below is program Staircsae Door. Since it's used as a flag (controlled from the rest interface), the program is empty.

 

It just occurred to me that switch bounces would result in the program being set/unset multiple times in rapid succession. I'll look at the log to determine that.

 

Bernhard

 

If

- No Conditions - (To add one, press 'Schedule' or 'Condition')

 

Then

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

 

Else

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

 

 

 

 

Hi,

 

Thanks so very much. But, I am very much interested in the program Staircase Door as well. Can you copy paste that as well?

 

With kind regards,

Michel

Posted

Hi Bernhard,

 

Thanks so very much. You see, the issue is that you have:

If
Program '*Z 1 Laundry Door' is True
Or Program '*Z 15 Entry Downstairs' is True
Or Program '*Z 17 Motion Downstairs' is True
Or Program '*Z 18 Staircase Door' is True 

 

Which means that if any of these conditions are true, then the Then path is executed. Now, the main question is: are you certain that none of these conditions are true when you expect the Else path to run?

 

I think the best way to test this is to use one condition at a time to isolate which one is actually true when it should NOT be. This way, you can work on the offending condition.

 

With kind regards,

Michel

Posted

Michel,

 

You are right, the first condition (*Z 1 Laundry Door) is often true since that door is not always closed.

 

I'm still puzzled about what's happening:

When is the program run?

Is it when any of the conditions changes? That would explain that when '*Z 18 Staircase Door' turns false, the Then condition is run as long as any of the other conditions (e.g. '*Z 1 Laundry Door') is true.

 

How can I write the program such that the Then condition is run only when any one of the conditions turns true? Presumably 4 separate programs would do that? Is there a solution with just one program also?

 

Bernhard

 

Hi Bernhard,

 

Thanks so very much. You see, the issue is that you have:

If
Program '*Z 1 Laundry Door' is True
Or Program '*Z 15 Entry Downstairs' is True
Or Program '*Z 17 Motion Downstairs' is True
Or Program '*Z 18 Staircase Door' is True 

 

Which means that if any of these conditions are true, then the Then path is executed. Now, the main question is: are you certain that none of these conditions are true when you expect the Else path to run?

 

I think the best way to test this is to use one condition at a time to isolate which one is actually true when it should NOT be. This way, you can work on the offending condition.

 

With kind regards,

Michel

Posted

Hello Bernhard,

 

Usually I would suggest that you use Control rather than Status as the program would only be triggered on a change. I don't know why you are using the REST interface though.

 

In any case it would be easier to use 4 programs. Copy program is very useful in that case.

 

Rand

 

Michel,

 

You are right, the first condition (*Z 1 Laundry Door) is often true since that door is not always closed.

 

I'm still puzzled about what's happening:

When is the program run?

Is it when any of the conditions changes? That would explain that when '*Z 18 Staircase Door' turns false, the Then condition is run as long as any of the other conditions (e.g. '*Z 1 Laundry Door') is true.

 

How can I write the program such that the Then condition is run only when any one of the conditions turns true? Presumably 4 separate programs would do that? Is there a solution with just one program also?

 

Bernhard

  • 3 weeks later...
Posted

I use REST to communicate status changes from the security system to the ISY by setting a program (e.g. '*Z 1 Laundry Door'). Presumably I could call actions from '*Z 1 Laundry Door' directly but prefer not to since that would spread the code controlling the lights all over the place.

 

Bernhard

 

Hello Bernhard,

 

Usually I would suggest that you use Control rather than Status as the program would only be triggered on a change. I don't know why you are using the REST interface though.

 

In any case it would be easier to use 4 programs. Copy program is very useful in that case.

 

Rand

Guest
This topic is now closed to further replies.

×
×
  • Create New...