From: R P <ne...@ya...> - 2002-10-02 16:03:49
|
perhaps if ((state_now $Camera_Motion eq 'motion') and $Dark) would work for you? I'll double check my coding tonight, in fact I think I used a "if motion and $Dark" bit in one of my prior E-mails if you keep the list.. --- Britton Bridewell <bri...@ya...> wrote: > Here is the code that I am trying to use to turn on > my outdoor lights > when it is dark and motion has been detected. It > doesnt work when I > add the $Dark variable. It works without the $Dark > variable > statement. Hmmmm. Any ideas? > > $Outside_Front_Lights = new X10_Item('L1'); > > $Camera_Motion = new Serial_Item ('XL2LJ', > 'Garage On'); > $Camera_Motion -> add ('XL2LK', 'Garage > Off'); > > if ((my $state = state_now $Camera_Motion) and > $Dark) > { > set_with_timer $Outside_Front_Lights ON , 600; > } > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com |