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

Tips and Techniques for using MLServer's Automation Rules
User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

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

Postby mcascio » Mon Sep 18, 2006 7: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
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Tue Oct 03, 2006 10: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
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Wed Oct 04, 2006 10: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 Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Wed Oct 04, 2006 11:07 am

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 Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Postby jjjukebox » Thu Oct 05, 2006 1:03 pm

Thanx Dave

This worked great
J.J. Jukebox

Member

User avatar
gregoryx
Simply Incredible
Simply Incredible
Posts: 6599
Joined: Tue Sep 30, 2003 10:15 pm
Location: Newport Beach, CA
Contact:

Postby gregoryx » Thu Oct 05, 2006 10: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