Changing lights while away - complex

Linwood

Active Member
I want to cycle lights on and off while away, at night. It seems strangely complex to do. The below seems to work (there is another section which sets "Dark" between sunset and sunrise).

Posting to see if there's a better overall approach I am missing (e.g. if I want 5 or so sets of lights doing this, it is 5x this much code).

================== Cycle Bar Lights On when Armed - Away =================
Uses outputs 205 and 206
Cycle in a 10 minute on, 3 off period

WHENEVER HomeArea (Area 1) IS ARMED AWAY
THEN TURN Output 206 ON FOR 10 MINS
THEN TURN Output 205 OFF

WHENEVER Output 206 STATE IS TURNED OFF
AND HomeArea (Area 1) IS ARMED AWAY
THEN TURN Output 205 ON FOR 3 MINS

WHENEVER Output 205 STATE IS TURNED OFF
AND HomeArea (Area 1) IS ARMED AWAY
THEN TURN Output 206 ON FOR 10 MINS

WHENEVER Output 206 STATE IS TURNED ON
AND Dark (Counter 1) IS EQUAL TO 1
THEN TURN Bar Lights [1 (A1)] ON, FADE RATE = 0 FOR 10 MINS
 
I use a standalone UPB timer expressly for this purpose.
I can place different lights on different schedules on different days and it has a random function that varies the scheduled times by plus or minus up to 20 minutes.

It was too cumbersome to do in the controller.
 
I'd like to find away to introduce some random elements to the lighting when I am away -

Something like

If ARMED AWAY
AND after sunset
AND before 11pm
Turn on light#1

After between 10-30 minutes (random) turn off light#1

After between 5-10 minutes (random) turn ON light#1

After 11pm, stop




Any ideas how to do this in the Elk M1 rules?
 
I couldn't find anything like that, but what I did was put each light on a different rotation, e.g.

Light one is on 8 minutes off 5
Light two is on 14 minutes off 5
light three is on 4 minutes off 3

Something like that, where the sum of the two for each light are NOT multiples of the other time periods, which then cause them to look a bit more random. I tried to get a time frame that if someone were watching just a few minutes some light would change.

I didn't stop at 11pm. I wonder if I should. I just figure anyone who stops to see what's going on is probably opportunistic, and if they see a few lights change (even if 3am) they will just go somewhere else, and not say "it's 3am, it must be someone with home automation". :blush:

But doing this with the Elk sure is complicated, and takes a LOT of code. I think I'm going to look into the type of randomizer mentioned above.
 
This doesn't seem much more helpful, but this is from Elk's programming examples section:
Security
In this example, lights will be used to give the premises an occupied appearance when the customer is away for an extended period of time. When the system is armed to vacation mode, the following rules turn on several lights at different times to simulate the normal activities of the resident. At sunset the living room lights will turn on.

WHENEVER SUNSET
AND Area 1 (Area 1) IS ARMED VACATION
THEN TURN LivingRm Lights [1(A1)] ON

The kitchen lights will turn on at 7:00pm and stay on for 35 minutes. At 7:30pm the dining room lights will turn on for 25 minutes. This simulates the resident preparing and eating dinner.

WHENEVER THE TIME IS 7:00 PM
AND Area 1 (Area 1) IS ARMED VACATION
THEN TURN Kitchen Lights [2(A2)] ON FOR 35 MINS

WHENEVER THE TIME IS 7:30 PM
AND Area 1 (Area 1) IS ARMED VACATION
THEN TURN DiningRm Lights [3(A3)] ON FOR 25 MINS

Finally, after sunset the bathroom lights will turn on for 2 minutes every hour and 17 minutes. The unusual interval and the variance in the time sunset occurs will help to achieve a seemingly random pattern.

WHENEVER EVERY 1 HOUR AND 17 MINUTES
AND Area 1 (Area 1) IS ARMED VACATION
AND THE TIME IS LATER THAN AT SUNSET
THEN TURN Bathroom Light [4(A4)] ON FOR 2 MINS

At 11:00pm (bed time) all lights with Housecode A will be turned off.

WHENEVER TIME IS 11:00 PM
AND Area 1 (Area 1) IS ARMED VACATION
THEN TURN ALL LIGHTS OFF, HOUSECODE A

Create a similar sequence for the morning to create a “lived in” appearance.
Using Sunset as the initial trigger will cause some variation, as the time does change at least a little bit each day; and using random intervals seems to help. I'm sure you could go a lot trickier but it'll definitely eat a lot of code.
 
Back
Top