Please login or register.

Login with username, password and session length

Author Topic: Can anyone tell me why this does not work ?  (Read 6305 times)

FernVeilleux

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Can anyone tell me why this does not work ?
« on: June 15, 2010, 09:39:39 AM »

Hi,

Here is the kind of things I though would be possible with macros and could not succeed yet.

For over 12 years I have been using Borland Delphi (BDS 2010 currently) and found macros very different without procedures and function calls, limited arguments, etc. it seems very primitive to me.

Here is what I want to do :

At the flick of a switch turn the shower light on and at the same time the bathroom fan. When I turn the light off, I want the fan to continue for 15 minutes. If my wife leaves the bathroom after a shower, the fan would still be running. If I then enter the shower I will turn the light on but the fan might still be running and I do not want it to stop after the timer comes to end. After I turn the light off the fan will stop at the end of the timer.

Should I be able to do this with macros ?

Here what we have :

We live in a cottage with an attached garage. Our children all left home years ago. I installed an XPCR, one XPF for the Sanyo heat pump, another XPF for the Sanyo A/C, 2 filters for low voltage lamps, 1 filter for the Panasonic plasma TV, 28 modules, some XPT and one IR543.

Here are the macros

Macro name  : Start fan
Trigger : G3 On
Modules : G6 On(Shower light)
   G5 On (fan)
   Clear Flags [8] (means the timer is not valid and the fan should not stop at the end of the timer)

Result : Light turns on ok and fan also but I do not know about flags and if I run from the computer it does not show in the activity monitor
 
Macro name : Stop fan
Trigger : G3 Off
Modules : G6 Off(Shower light)
   (using a delay here did not changed anything)
   G9 Off ( macro )

Result : Light turns off

Macro name : Stop fan option 1 (the 1st time I press Off it starts a timer)
Trigger : G9 Off and Flag Status Off exactly 8 ( flag 8 was cleared when it was turned on to invalidate the timer )
Modules : Set Flags [8] (means a valid timer exists)
   Delay for 15:00
   G10 Off ( macro )

Result : I think the timer starts but the fan never stops

Macro name : Stop fan option 2 (this I want to execute if I press the off button a second time, it will not wait for the end of the timer)
Trigger : G9 Off and Flag Status On exactly 8 ( flag 8 was set to indicate a valid timer )
Modules : G10 Off ( macro ) go directly to the end of the required action

Result : It will not stop the fan immediately

Macro name : Stop fan last action
Trigger : G10 Off and
   Flag Status On exactly 8 (this means the timer is valid and the fan should be stopped)
Modules : G5 Off ( fan )
   Clear Flags[8]

Result : Unknown

Logged

mbettez

  • Newbie
  • Helpful Post Rating: 7
  • Posts: 9
Re: Can anyone tell me why this does not work ?
« Reply #1 on: June 15, 2010, 08:42:19 PM »

This will not work because once you call G9 off the timer will start and cannot be interrupted therefore you will never get to the else g9 off with flag 8 on.  Here is a way to do it.  Your G3 on and off should be fine.

trigger: G9 off, condition: flag 8 off, action: set flag 8 & G10 off
else
trigger: G9 off, condition: flag 8 on, action: G5 off & clear flag 8

trigger: G10 off, action: delay 15 & G5 off & clear flag 8

Give this a try, it should work.
Logged

FernVeilleux

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Can anyone tell me why this does not work ?
« Reply #2 on: June 16, 2010, 01:40:03 AM »

Thanks for your help,

However it did not work and the repeater always did like I press the off button more than once. I tried many (>15) ways with flags to block subsequent calls without success and I finally drop the idea of turning it off immediately.

I dropped the option 2 and now in the conditions it does not say "Flag Status exactly" but simply "Flag Status", WHY ? ???

Except for the possibility of turning off the fan immediately, it works now and if I turn the light on when the fan is running, the timer will not stop when it comes to end.

Thanks again



 
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.