X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: bilyth on May 21, 2008, 09:40:38 AM

Title: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 21, 2008, 09:40:38 AM
i was trying to set up a macro that had a delay time of 9 hours..but got a message saying the limit was 4 hr & 30 min to set a delay. Is there a way around this?

Basically, i'm trying to have a macro turn on a fan for a set period of time (30 min), then have it come on for 5 min every 30 min throughout the night to be turned off in the morning.

I was hoping to do this by setting a flag & then calling a looping macro. Similar to method used for setting up artificial sunrise: http://www.x10community.com/forums/index.php?topic=14985.0  (see called loop approach).

I have it figured out in my head how to run it...but then i ran into a problem of a delay max of 4.5 hrs. I guess one solution would be to have two macros of 4.5 hr delay & somehow going from one to another...but seems complicated. Why is there a delay time limit like this?

thanks.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Tuicemen on May 21, 2008, 10:45:55 AM
There are actually several ways to do this and you found two!
Don't forget you can combine timers into the equation! ;)
You could trigger macros to run every hour thus keeping the macro with a 1 hour span! ;)
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 21, 2008, 11:35:36 AM
There are actually several ways to do this and you found two!
Don't forget you can combine timers into the equation! ;)
You could trigger macros to run every hour thus keeping the macro with a 1 hour span! ;)

ok, let me play wiht it a bit more. But what's the purpose of limiting the delay time?

i can see running a macro every hour..but i want to be able to manually start it & have it stop after x hours (like 9 hours). that's why i was going to have a "starter" macro that would set a flag & then delay for 9 hours before stopping the other macro (which i can't do with the delay limit)...but i'll play with it.

thanks.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Tuicemen on May 21, 2008, 12:02:38 PM
There is a reason for the limit, although it slips my mind right now ::)  :-[ It was posted on the forums shortly after the smartmacro plug-in was released. Doing an advanced search will most likely find it Unless someone else can remember! ;)
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: steven r on May 21, 2008, 01:37:22 PM
...i'm trying to have a macro turn on a fan for a set period of time (30 min), then have it come on for 5 min every 30 min throughout the night to be turned off in the morning....
Are you tied to it having a flexible start time with a shutoff 9 hours later? If so, you'll need to chain 2 or 3 macros. If not, it would be simple to build a loop that you could start at any time that would run until a fixed time in the morning.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 21, 2008, 02:15:04 PM
Are you tied to it having a flexible start time with a shutoff 9 hours later? If so, you'll need to chain 2 or 3 macros. If not, it would be simple to build a loop that you could start at any time that would run until a fixed time in the morning.

That's exactly what i'm trying to do. Although..while it'd be nice to have it auto shutoff 9 hours later; i could manually shut it off. But if i ever get in a situation where i want it to auto shut off in the middle of night like 6 hours later..then i'd like to know how to go about it.

The other thing is i'd like to have the fan run first for a set time (say 40 minutes) & then go into a loop cycle. That complicates it a bit because i can't just build a simple loop i can start manually & have it shutoff at a fixed time.

So, t he ideal situation i'm after is this: flexible start time, run for 40 min, then off & cycle on for 5 min every 25 min for "x" hours (say 9 hrs), then auto off after 9 hrs from the time i manually started.

i'm not sure if i should start a new thread to help set up this macro...since the title no longer matches it..you guys can advise me.

But, for now, i've removed the auto off step (my initial plan was to have a starter macro to start the loop by setting flag..then delay 9 hrs..then clear flag & off fan)...& now i believe i have one macro that will start for 40 min then start the loop & i will have to manually stop it in the morning by clearing the flag & hitting off.

i've attached screen shots.

Let me know if there's a better way to do this..or a way to have it auto off.

(http://img225.imageshack.us/img225/8608/fan1yi4.jpg) (http://imageshack.us)
(http://img229.imageshack.us/img229/9120/fan2ua3.jpg) (http://imageshack.us)
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: steven r on May 21, 2008, 02:42:16 PM
I think you just about have a working solution.

Make sure your starting macro A8 ends with an "A13 On" to call the looping macro. Then build a macro that triggers on "A8 OFF" that clears the flag and turns off the fan. Adding a timed event to the "A8 Off" macro to trigger an off at a given time in the morning. Also you need to take out the redundant 2nd "A12 On" in your loop to make sure the fan is left off.

Make sure you have dummy appliance module defined in AHP for "A13" also.

With the above tweaks to your basic work you'll have a setup that will let you:

Note this arrangement will result in an initial running of the fan for 45 min (40 to start + 5 from the first cycle). If you actually only need 40 min, then change the initial time to just 35 min.

One issue that hasn't been addressed in the above is that of multiple loops running at the same time. i.e. Each time you send an "A8 On" will result in another loop starting and running at the same time. The best way to handle this would be to make the "A8 On" macro conditional on the flag being clear. i.e. Have it only run if a cycle isn't in progress.

...i'm not sure if i should start a new thread to help set up this macro...since the title no longer matches it..you guys can advise me....
I wouldn't worry about that now. I think it's close enough for now and the topic call be moved later if needed.
Get it work and then post what you have in the user macro section for others to find.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 21, 2008, 03:26:46 PM
thanks for that. i think those tweaks pretty much did it.

build a macro that triggers on "A8 OFF" that clears the flag and turns off the fan.

what you're saying here is to create a macro named "A8 OFF" that will clear the flag as well as turn of fan module..right? the wording was a little confusing when you said "a macro that triggers on..."

One issue that hasn't been addressed in the above is that of multiple loops running at the same time. i.e. Each time you send an "A8 On" will result in another loop starting and running at the same time. The best way to handle this would be to make the "A8 On" macro conditional on the flag being clear. i.e. Have it only run if a cycle isn't in progress.

ok, i added this condition. Yes, this issue, as well as the issue of needing an extra macro to clear flags & turn off the module would have been addressed if i could have added a 9 hr delay to my "starter" macro. Too bad, it would have been much simpler & "cleaner" to have done it that way. I'll search around the forums to see why tehre's that 4.5 hr delay limit...

thanks again. yes, i will post my experience.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: steven r on May 21, 2008, 03:52:55 PM
...what you're saying here is to create a macro named "A8 OFF" that will clear the flag as well as turn of fan module..right? the wording was a little confusing when you said "a macro that triggers on..."
Yes that what I meant.
This macro allows an "A8 Off" signal to trigger a shutdown stopping the loop and the turning off the fan.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 21, 2008, 04:02:25 PM
Yes that what I meant.
This macro allows an "A8 Off" signal to trigger a shutdown stopping the loop and the turning off the fan.

ok thanks  :D LOL. it's confusing...is it a macro that triggers ON A8 or a macro that TRIGGERS on A8 or A MACRO that triggers etc... :D

anyways, got it.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 28, 2008, 02:07:54 PM
This is what i got (see attached).

The fan starter runs ok, the fan dummy triggers on. But the loop does not start (the fan never goes into an 'off' stage...& the activity monitor shows fan dummy 'on' then nothing after that...ie no looping).

suggestions?

(http://img76.imageshack.us/img76/8038/fan4ei7.jpg)

(http://img76.imageshack.us/img76/6397/fan3ca9.jpg)
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Puck on May 28, 2008, 03:21:47 PM
Your "Fan Loop" macro (A13) is looking for the "Fan Dummy" switch (A13) to be ON before executing "Fan Loop" (A13).

You might want to consider setting "Fan Loop" to a different address and calling it from "Fan Starter" (A8) right after setting "Fan Dummy" (A13) [maybe after a 1 second delay to ensure "Fan Dummy" is ON by the time "Fan Loop" looks at the conditions.].

To sum it up: It won't execute "Fan Loop" until after A13 is ON, which is most likely not working due to an internal timing issue. The "Fan Dummy" switch should be on an address of its own since it is used as your escape out of the loop.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 28, 2008, 03:43:48 PM
Your "Fan Loop" macro (A13) is looking for the "Fan Dummy" switch (A13) to be ON before executing "Fan Loop" (A13).

thanks for the reply.

isn't fan dummy a13  turned ON at the end of the A8 fan starter?

You might want to consider setting "Fan Loop" to a different address and calling it from "Fan Starter" (A8) right after setting "Fan Dummy" (A13) [maybe after a 1 second delay to ensure "Fan Dummy" is ON by the time "Fan Loop" looks at the conditions.].

To sum it up: It won't execute "Fan Loop" until after A13 is ON, which is most likely not working due to an internal timing issue. The "Fan Dummy" switch should be on an address of its own since it is used as your escape out of the loop.

but isn't the only way to have a macro call another macro is by using a dummy module with the same address of the macro to be called? which is why i have fan dummy a13 the same name as fan loop a13. the fan dummy isn't suppose to be an escape from the loop...it's suppose to be the propagator.

have i mis-understood?
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 28, 2008, 04:19:24 PM
Ok i got it.

you were right about the timing thing. The macros are exactly the same as pictured except all i did was move the fan dummy A13 ON before setting flag 3 (in macro A8).

it works beautifully now! :)%
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Puck on May 28, 2008, 05:26:49 PM
Glad to hear you have it working.

but isn't the only way to have a macro call another macro is by using a dummy module with the same address of the macro to be called? which is why i have fan dummy a13 the same name as fan loop a13.

You are correct, that is how you call & run another macro. It was just using the condition of the switch being on as a condition of the macro running that I seen as a possible problem.

Quote
the fan dummy isn't suppose to be an escape from the loop...it's suppose to be the propagator.

OK. My mis-understanding; I thought you were using that switch as a way out of the loop. That would explain what Flag 3 is for.  ;)

Since your "Fan Dummy" & "Fan Loop" are the same address, I'm not sure you need the "Fan Dummy - ON" condition to run the "Fan Loop" macro.

Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 28, 2008, 06:41:50 PM
Since your "Fan Dummy" & "Fan Loop" are the same address, I'm not sure you need the "Fan Dummy - ON" condition to run the "Fan Loop" macro.

i guess this is where i'm a little confused...can i start the fan loop macro from fan starter macro without the dummy? i thought in order to call the "fan loop" from "fan starter"...i needed a dummy with the same address.

That's my understanding.

i'll play with it a bit...so far it's working...but perhaps i do have extra things i don't need...
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Puck on May 28, 2008, 07:55:12 PM
i guess this is where i'm a little confused...can i start the fan loop macro from fan starter macro without the dummy? i thought in order to call the "fan loop" from "fan starter"...i needed a dummy with the same address.

That's my understanding.

i'll play with it a bit...so far it's working...but perhaps i do have extra things i don't need...

Yes you do need the dummy switch in order to call the macro. Just not sure you need the "Switch ON" (first) condition in the "Fan Loop" macro.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 28, 2008, 09:17:51 PM
Yes you do need the dummy switch in order to call the macro. Just not sure you need the "Switch ON" (first) condition in the "Fan Loop" macro.


hmm...i think...i need that switch ON (fan A4) there..or else it won't turn on every 30 minutes.

the 'fan starter' runs the fan for 25 min then the loop is suppose to turn the fan on for 5 min then off for 25 min every 30 min...

if it's not there..i believe the fan will just be off all the time...i think.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Puck on May 28, 2008, 11:24:23 PM
I'm referring to the first condition in the macro named "Fan Loop". That condition is: Fan Dummy ON, which is the same address A13 as the macro itself. Following the logically flow I don't see that condition being required.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 29, 2008, 12:26:54 AM
Oh, I see..i see. Sorry, when you were referring to 'condition' it didn't register- i kept looking at the modules.

yeah, i guess you're right..i thought it was required..but i guess not.

i'll take it out & see. The simpler the better for sure.

Thanks, i really appreciate the help. i wonder if anyone would be interested if i considered posting this in the user defined macro section.
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: Puck on May 29, 2008, 08:30:07 AM
i wonder if anyone would be interested if i considered posting this in the user defined macro section.

Yes, please do. The more contributions to the user macros the better resource it becomes.

 >!
Title: Re: how to get around 4hr 30 min macro delay limit
Post by: bilyth on May 29, 2008, 01:31:09 PM
you know, it stopped working...but i looked at my macro & intuitively, in the fan starter- i think the flag needs to come on before the dummy...since the fan loop macro runs on condition that there's a flag...

So, i swapped it back (set flag first, then dummy on, which in turn triggers the loop). It seems to be working now. i'll leave it be & do a bit more testing.

ps i did remove the dummy on condition.