mcascio

Example: Turning a Light on when an ElkM1 Zone is Violated

Mon Sep 18, 2006 8:51 pm

Description:
Turns Light#5 on when the Elk Zone 16 is Violated

Usage:
When opening a Garage or Door, automatically turn specified light on if it is dark outside.

Rule:
Whenever mlelkm1_zone_016_statusmsg changes value
- And mlelkm1_zone_16_statusmsg equals Violated - Open
- And currenthmmil is nighttime
--- Then MLServeCmd.MLLighting|On~005

User avatar
jjjukebox
Is there life beyond myServer?
Is there life beyond myServer?
Posts: 1026
Joined: Sat May 22, 2004 10:54 pm
Location: Toronto
Contact: Send private message

Tue Oct 03, 2006 11:34 pm

Mario,

When do you get currenthmmil equal to nighttime?

I have a post from a couple of months ago where I am trying to set a variable to nighttime 30 mins after sunset and to daytime 30 mins after sunrise.

How can I do this?

Thanx
J.J. Jukebox
Member

User avatar
AllonisDave
Founder
Founder
Posts: 11480
Joined: Fri Feb 07, 2003 8:56 am
Location: Newport Beach, CA
Contact: Send private message

Wed Oct 04, 2006 11:07 am

Whenever currentdate equals sunrise +30
Then Macro|SetVariable|IsDayTime~1!SetVariable|IsNightTime~0

Whenever currentdate equals sunset +30
Then Macro|SetVariable|IsDayTime~0!SetVariable|IsNightTime~1

should do it.

User avatar
jjjukebox
Is there life beyond myServer?
Is there life beyond myServer?
Posts: 1026
Joined: Sat May 22, 2004 10:54 pm
Location: Toronto
Contact: Send private message

Wed Oct 04, 2006 12:07 pm

Thanx Dave.

I just looked at the rules and did not know about the "is equal sunrise +" etc.

I will give this a try.

Jim
J.J. Jukebox
Member

User avatar
jjjukebox
Is there life beyond myServer?
Is there life beyond myServer?
Posts: 1026
Joined: Sat May 22, 2004 10:54 pm
Location: Toronto
Contact: Send private message

Thu Oct 05, 2006 2:03 pm

Thanx Dave

This worked great
J.J. Jukebox
Member

User avatar
gregoryx
Simply Incredible
Simply Incredible
Posts: 6605
Joined: Tue Sep 30, 2003 11:15 pm
Location: Newport Beach, CA
Contact: Send private message

Thu Oct 05, 2006 11:59 pm

... of course, if one has an Elk and attaches a lighting controller to it, one has firmware-based reliability of this function. :P

Return to “Automation Rules”

Who is online

Users browsing this forum: No registered users and 1 guest