X10 Community Forum

📱🖥️PiX10Hub => 🏥Help and Trouble Shooting => 🧞 ⛑HomeGenie Help => Topic started by: spacenut on February 10, 2023, 08:46:50 AM

Title: Tring to Get a Macro to Run between a time range
Post by: spacenut on February 10, 2023, 08:46:50 AM
Can someone Please try to help me with this. I want to run a macro only between the hours of 21:00 and 07:00. I tried every which way to do this but i cannot get it to work. Attached is a picture of the trigger code, The way it is written it works all the  time but when I try to enter a time range I cannot get it to work. Can some tell me what the trigger code should look like?
Thank You
Title: Re: Tring to Get a Macro to Run between a time range
Post by: brobin on February 10, 2023, 12:40:29 PM
I know absolutely nothing about HG programming so this may not apply, but in some systems crossing over midnight can be a problem. So instead of "21:00 to 07:00" as one range, maybe "21:00 to 23:59 OR 0:00 to 07:00" stated as two ranges might be worth a try.
Like I said, this is just a shot in the dark.
Title: Re: Tring to Get a Macro to Run between a time range
Post by: petera on February 10, 2023, 05:15:15 PM
Read this. It will explain in simple terms what you are trying to do. Just copy/paste this link into your browser bar

old.homegenie.club:8080/www.homegenie.it/forum/index9d63.html?topic=2231.0
Title: Re: Tring to Get a Macro to Run between a time range
Post by: petera on February 10, 2023, 05:47:47 PM
Familiarise yourself with the Scheduler https://homegenie.it/content/docs/scheduling/
It covers all the automations that can be created based on times. You can also write simple C# scripts to perform automations based on conditions. There’s plenty of examples of these in the Demo programs that come with Homegenie.