HAI Expertise required for this condition

htsource

Active Member
Since I'm a newbie in HAI programming, I'm try to get this to work but the flags in HAI is over my head :rolleyes:

I want to automate the porch light at night when away, and here are the conditions:

a) when it's dark and someone opens the frontdoor, front porch light turns on for 5 minutes
:rolleyes: when it's dark and someone opens the garage door, front porch light turns on and stay on
c) when it's dark and someone closes the garage door, front porch light turns off in 5 minutes
d) when it's dark and in AWAY mode, front porch light turns on automatically and stay on until disarms
e) when set AWAY mode and dark, front porch light turns on and stay on

My problem is, in AWAY mode, I have a code to issue ALL OFF commands to all lights in the house (X10) so the front porch light will get turned off too. And in other conditions, it seems like if someone opens/closes the door, but other door still opens (say frontdoor opens/closes, but garage door remains opens), lights may turn off or doesn't turn off after the garage is closed. Or in the case of the AWAY mode, since someone will still be opening/closing the garage door and one of the conditions will be met, so light will turn off automatically after a few minutes.

Or I should just walk up to the switch to turn on/off the light, but that takes away the fun of programming :rolleyes:

Any guidance would be greatly appreciated. So far I have 2 flags set up with this. I can post what I have so far tonight when I get home. Thanks.
 
Here's what I have for codes:

WHEN Front Door NOT READY &IF DARK: F Prh Flag 1 ON
WHEN F Prh Flag 1 ON &IF Front Porch OFF: Front Porch ON
WHEN F Prh Flag 1 ON: SET F Prh Flag 1 TO 5
WHEN F Prh Flag 1 ON: F Prh Flag 2 ON FOR 1 MINUTE
WHEN F Prh Flag 2 OFF &IF Front Door SECURE &IF F Prh Flag 1 ON: DECREMENT F Prh Flag 1
WHEN F Prh Flag 2 OFF &IF Front Door SECURE &IF F Prh Flag 1 ON: F Prh Flag 2 ON FOR 1 MINUTE
WHEN F Prh Flag 2 OFF &IF Front Door NOT READY &IF F Prh Flag 1 ON: SET F Prh Flag 1 TO 5
WHEN F Prh Flag 2 OFF &IF Front Door NOT READY &IF F Prh Flag 1 ON: F Prh Flag 2 ON FOR 1 MINUTE
WHEN F Prh Flag 1 OFF &IF OFF: Front Porch OFF
 
Here is a similiar Rule set for the M1 as a comparison. Of course there
is a thousand ways to write it.

Build a Task to handle front porch light ON if Dark
1 WHENEVER TurnOnPorchLight (Task 1) IS ACTIVATED
AND IT IS DARK OUTSIDE
THEN TURN FrontPorchLight [1 (A1)] ON FOR 5 min

Front Door Opening
2 WHENEVER FrontDoor (Zn 1) BECOMES NOT SECURE
THEN ACTIVATE TurnOnPorchLight (Task 1)

Garage door is opened
3 WHENEVER GarageDoor (Zn 2) BECOMES NOT SECURE
AND IT IS DARK OUTSIDE
THEN TURN FrontPorchLight [1 (A1)] ON

Garage door is closed, turn off front porch light in 5 min
4 WHENEVER GarageDoor (Zn 2) BECOMES SECURE
THEN TURN FrontPorchLight [1 (A1)] ON FOR 5 min

Make sure the front porch light stays on if garage is open
This will turn off the light when LIGHT outside
5 WHENEVER EVERY 1 MINUTE
AND GarageDoor (Zn 2) IS NOT SECURE
AND FrontPorchLight [1 (A1)] IS OFF
THEN ACTIVATE TurnOnPorchLight (Task 1)

If armed away, turn on porch light, will turn off 5 min after disarming
Renews the timeout every 4 minutes.
Does not allow light to turn off if armed away.
Need to add the DARK AND statement or use Task 1 to only allow light
to be on while DARK
6 WHENEVER EVERY 4 MINUTES
AND Area 1 (Area 1) IS ARMED AWAY
THEN TURN FrontPorchLight [1 (A1)] ON FOR 5 min
 
Hi, my name is Ralph. Martin sent me a copy of your note and I would like to try to help you. If you would, send me an exported copy of your system configuration (after you change all of the codes to temp. code to keep your system secured). E-mail the exported file to me at [email protected]

Since I'm a newbie in HAI programming, I'm try to get this to work but the flags in HAI is over my head :rolleyes:

I want to automate the porch light at night when away, and here are the conditions:

a) when it's dark and someone opens the frontdoor, front porch light turns on for 5 minutes
:rolleyes: when it's dark and someone opens the garage door, front porch light turns on and stay on
c) when it's dark and someone closes the garage door, front porch light turns off in 5 minutes
d) when it's dark and in AWAY mode, front porch light turns on automatically and stay on until disarms
e) when set AWAY mode and dark, front porch light turns on and stay on

My problem is, in AWAY mode, I have a code to issue ALL OFF commands to all lights in the house (X10) so the front porch light will get turned off too. And in other conditions, it seems like if someone opens/closes the door, but other door still opens (say frontdoor opens/closes, but garage door remains opens), lights may turn off or doesn't turn off after the garage is closed. Or in the case of the AWAY mode, since someone will still be opening/closing the garage door and one of the conditions will be met, so light will turn off automatically after a few minutes.

Or I should just walk up to the switch to turn on/off the light, but that takes away the fun of programming :rolleyes:

Any guidance would be greatly appreciated. So far I have 2 flags set up with this. I can post what I have so far tonight when I get home. Thanks.
 
Back
Top