Jump to content

Program assistance


intellihome

Recommended Posts

I'm trying to write a program to send an X10 command if it is after 9PM and KeypadLinc button A is already on or is turned on. I'm not sure how to do it. I saw where to select time but not sure how to say "after 9PM".

 

 

If

Control 'Mud Room KP A' is switched On

 

Then

Wait 1 minute

Send X10 'H2/Off (11)'

 

Else

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

 

Any help would be appreciated

-Kevin

Link to comment

Does this look OK? So this will execute at 9PM if the KP A button is already on? Or it will execute if it is between 9PM and 7AM next day whenthe KP A button is turned on?

 

If

Status 'Mud Room KP A' is On

And From 9:00:00PM

To 7:00:00AM (next day)

 

Then

Wait 1 minute

Send X10 'H2/Off (11)'

 

Else

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

Link to comment

Hi,

 

This will execute between 9:00 PM and 7:00 AM next day if and only if the status of the KPL A is "changed" to On. So, if the status if KPL A is already on, and then you press KPL A, this will not execute. If you want that to happen then you must use Control instead of Status.

 

With kind regards,

Michel

 

Does this look OK? So this will execute at 9PM if the KP A button is already on? Or it will execute if it is between 9PM and 7AM next day whenthe KP A button is turned on?

 

If

Status 'Mud Room KP A' is On

And From 9:00:00PM

To 7:00:00AM (next day)

 

Then

Wait 1 minute

Send X10 'H2/Off (11)'

 

Else

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

Link to comment
Does this look OK? So this will execute at 9PM if the KP A button is already on? Or it will execute if it is between 9PM and 7AM next day whenthe KP A button is turned on?

 

 

Both

 

The ISY is event based. The evaluations of programs are event based. When 9pm comes the "If" will get evaluated, if KP A is already on then the "If" is true and the "Then" will execute. Alternately, if you press the KP A then you have changed the status of the KP A switch and so the ISY will again evaluate the "If" in this program. If it is between 9p and 7a then the "Then" will execute. If it is not between 9p and 7a then the "If" statement is still false and the system will have to wait till 9p for it to become true for execution to take place.

 

Not the use of "And" between the conditions. When building programs you can change that to "Or" and dramatically alter the function of the program because either condition being met then would result in the "If" becoming true.

 

Program looks great to me. Looks like it should do exactly what you requested in your first post.

Link to comment

Whoa Michel!

 

If KP A is status On because it had been turned on prior to 9pm, at 9pm the program becomes true and so should execute. If KP A is status off and time is between 9p and 7a and KP A is pressed, then status is changed to On and program should execute.

 

I think this is written correctly for what intellihome wanted to achieve.

Link to comment

Thank you Illusion and Michel.

 

KPL A is a "Home" indicator. When it's on I am home and when it is off I am not home.

 

The X10 signal is to shut off a porch light.

 

If I am home (KPL A is On) and 9PM rolls around I want the program to execute (turn the porch light off).

 

If I am not home (KPL A is Off) and 9PM rolls around, I want the porch light to stay On. When I finally arrive home (between 9PM and 7AM next day) I will press KPL A On and I would like the program to execute (shut the light off).

 

Will the program do this?

 

Thanks again!

Link to comment

Archived

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


×
×
  • Create New...