| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | Re: [ECS] why won't my lights go off? Bill Walters Sun, 23 Jan 2000 01:59:41 -0600 |
No problem at all AJ, that's what this group is all about...... No such thing as a trivial question. As far as BEGINIF stuff, well, I'm a little slow..... I prefer to code an event so it will work (mind NEVER do the first time!) and when I get it working 100%, THEN if I want to, I'll go back and re-code to make it more "elegant" (hmm, but seems like I never do that, oh well)...... Most "logical" of programming in ECS I've ever seen is Garnet Bailey's stuff in the ECS archives.... Some of the things he did, waaaayyyyy back in ECS 3 days (even before?), well, I can always learn something from looking at both his examples, and Mark G's examples...... Welcome to the crowd! Bill ----- Original Message ----- From: A.J. Griglak <aj@griglak.com> To: <ecs-list@netbloc.com> Sent: Saturday, January 22, 2000 10:09 PM Subject: RE: [ECS] why won't my lights go off? > Yep, Bill... that did it - thanks! I'm sorry if this seems trivial to > everyone, but every time I go to set up an event, I get stuck like this, so > hopefully this will help with all my events. ;-) It's been a while since I > did this kind of crap in college (Fortran and Pascal hee hee) It seems > like every time I get stuck, I just change everything to BEGINIF's ;-) > > Thanks again > > -=A.J. > > -----Original Message----- > From: Bill Walters [mailto:wtwalters@home.com] > Sent: Saturday, January 22, 2000 8:58 PM > To: ecs-list@netbloc.com > Subject: Re: [ECS] why won't my lights go off? > > > AJ, > > Hmm,,, well, it might have to do with your BEGINIF statement. > I prefer "brute-force" method..... > > Remember > > Why not structure it like this? > > If front porch motion Is Now On > And Daytime Is False > Then Front Porch Lights Set On > Then Front Porch timer Set 10 > > Else If front porch motion Is Now On > And Daytime Is True > Then A/V - Stereo Set Off > > If Front Porch timer Is Now 0 > Then Front Porch Lights Set Off > Then Event-Exit Set True > > > You don't say what kind of device is setting your "front porch motion" item > ON... Just to make sure that there isn't "random" motion that keeps kicking > this device on (thereby re-setting the Front Porch timer to 10), I'd create > an item in one of my Group screens to monitor the state of this item..... > just while "debugging". > > Bill Walters > > > > ----- Original Message ----- > From: A.J. Griglak <aj@griglak.com> > To: <ecs-list@netbloc.com> > Sent: Saturday, January 22, 2000 5:03 PM > Subject: [ECS] why won't my lights go off? > > > > They come on OK, the stereo turns off OK during the day, the timer is > > working right, yet when it gets to 0, the lights stay on... anyone? > > > > -=A.J. > > > > > > BEGINIF Daytime Is False > > And front porch motion Is Now On > > Then Front Porch Lights Set On > > Then Front Porch timer Set 10 > > > > IF Front Porch timer Is Now 0 > > Then Front Porch Lights Set Off > > > > If Front Porch timer Is 0 > > Then Event-Exit Set True > > ENDIF > > > > BEGINIF Daytime Is True > > If front porch motion Is Now On > > Then A/V - Stereo Set Off > > ENDIF > > >