Jump to content
C4 Forums | Control4

Macro with delays


JGLI

Recommended Posts

Once again, thanks for the help you folks have provided.

My shabbos code sort of worked last week but I want to make sure its right.

Here is the main macro for lights going off; the idea is that there are three groups followed by the alarm being set at the end.

Does this look correct?  I wish there was an easier way of creating a delay.

Lightsoff.tiff

Link to comment
Share on other sites


There is, it's called adding a delay (under programming control) - but it's not always recommended to use that for very long delays (ie more than a couple of seconds, MAYBE a few minutes).

That said -  don;t thing your macro is correct? Basically you start a timer every time, then check to se if that timer is NOT running - but it always will be. Oh and one line isn't embedded like it should be.

I believe you're overthinking it here - but I can only guess because I you don't state what you actually want to do - meaning what is the overall desired effect that you are looking for. But it appears like you're doing this backwards...please explain what you want clearer.

Link to comment
Share on other sites

I'm trying to accomplish a simple task.

When that Macro is called (from another macro), start turning off the lights at three separate times, and at the end turn on the alarm.

 

Turn off first group

wait 15 minutes

turn off second group

wait 10 minutes

turn off third group

wait 60 minutes

activate alarm

Seems like there has to be an easy way to do this....

Link to comment
Share on other sites

I would approach this a little differently.

1)Macro 1 = "first group off"

2)Timer - "Group 2 delay"

     15 minutes

1) First group off code:

-Execute scene or lights off

-Start timer "group 2 delay"

on timer programming when timer 2 expires:

Execute macro 2 "2nd group off"

-execute scene or lights off

-start group 2 delay timer

and so on...

 

Link to comment
Share on other sites

msgreenf, will my code work? I'd like to keep it all in one spot so it's easier to add/remove stuff in the future rather than having to go to each timer...

if not I'll break it into those pieces.

Link to comment
Share on other sites

Everyone,

The revised code worked well, but my activate Shabbat code had problems.  Are there issues with Macros calling Macros and there not being enough time to complete them?  My activate Macro calls another macro for thermostats, sends a command to HAI and activates a lighting scene. Not all the lights came on as they should and the HAI macro didn't run.  Should I add a 1 or 2 second delay between them?

Link to comment
Share on other sites

2 minutes ago, eddy.trochez said:

Your Shabbat lights off routine didn't require a macro. In fact, I don't even know how you can accomplish what you want with a macro. 

How would you do it without a macro? FWIW, it worked.

Link to comment
Share on other sites

An advanced lighting scene with delays would do this nicely. Could call a lighting scene after another has been activated or a timer as well.

HAI lighting, what driver do you have ?

 

 

Happy Automating!

Link to comment
Share on other sites

 

 

Light scene with all lights in it. Then for first group zero delay, second group at 15, third at 25 minutes and alarm at 85 minutes

 

 

 

 

 

 

Happy Automating!

 

How long can am advanced lighting scene run? And how many levels?

Thinking about this for rgb leds

Link to comment
Share on other sites

As many delays for as long as you like. I have never run into a roadblock on amount of actions and delays. And fade times as well.

 

Three lights in scene for example.

1 on

1 delay 2 minutes then fade off over 30 seconds

2 on

2 delay 2 minutes then fade off over 30 seconds

3 delay 45 seconds then on

3 delay 15 minutes then off over 30 seconds

 

This is something I do a lot for pathway lighting with a room at the end. Like a welcome home midroom and hallway and kitchen. Kitchen stays on for 15 minutes hall and mudroom 2 minutes and 30 seconds.

 

 

 

Happy Automating!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.