X10 Community Forum

🖥️ActiveHome Pro => ActiveHome Pro General => Topic started by: Rocket J Squirrel on April 22, 2006, 11:48:32 AM

Title: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 22, 2006, 11:48:32 AM
If I create a timer to turn on a light on Tuesday at 8:00 pm and off at 1:00 am, will it do the right thing, namely turn off the light on Wednesday morning? Or will the 1:00 am Off command be sent on Tuesday, prior to the On command?
Title: Re: What happens when a timer spans midnight?
Post by: Dan Lawrence on April 22, 2006, 02:10:05 PM
You betcha!!  I have timers on 11 modules that span midnight. They all turn on at dusk and turn off between Midnight and 1:00AM.
Title: Re: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 22, 2006, 03:37:46 PM
Dan, do your timers run the same every day? If so, you wouldn't notice an issue. (Because, e.g., Wednesday's 1:00 am OFF would handle turning off Tuesday's 8:00 pm ON.)
Title: Re: What happens when a timer spans midnight?
Post by: Dan Lawrence on April 22, 2006, 05:03:50 PM
Yes, they are 7 day a week timers.
Title: Re: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 22, 2006, 08:05:27 PM
So I'm guessing that if I need to turn on at 8pm Tuesday evening and off at 1am Wednesday morning, I need two separate timers.
Title: Re: What happens when a timer spans midnight?
Post by: Dan Lawrence on April 23, 2006, 12:32:39 AM
No, one timer (on at 8:00 PM and off at 1:00AM seven days a week) will suffice.
Title: Re: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 23, 2006, 01:15:07 AM
Sorry, I was unclear. My intention is a timer which happens one or two days a week, not every day.
Title: Re: What happens when a timer spans midnight?
Post by: steven r on April 23, 2006, 01:16:41 AM
So I'm guessing that if I need to turn on at 8pm Tuesday evening and off at 1am Wednesday morning, I need two separate timers.

If you want this to happen every day as in Dan's case, no.
If this is a one time event, as I think you're saying, yes.
Title: Re: What happens when a timer spans midnight?
Post by: roger1818 on April 24, 2006, 11:25:36 AM
Sorry, I was unclear. My intention is a timer which happens one or two days a week, not every day.

In that case you will need to create two timers, one to turn the light on and another to turn the timer off a day later.  I have a similar situation where I have one timer to turn the lights on at dusk 7 days a week, a second timer to turn the the lights off at 11:00pm Sunday-Thursday and third timer to turn them off at midnight on Weekends (Saturday and Sunday).
Title: Re: What happens when a timer spans midnight?
Post by: arf1410 on April 24, 2006, 11:59:27 AM
This issue was reported many months ago.  I assumed (I guess incorrectly) that X10 had fixed it with a more recent AHP release.  X10 Pro - when will this issue be fixed?
Title: Re: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 24, 2006, 12:10:13 PM
Thanks for all the replies. I understand why timers behave this way, so I can't really consider this to be a "bug".

But the behavior is counter-intuitive. AHP ought to at least display a warning when the user tries to create a timer which spans midnight because it's probably not going to do what he wants unless it's 7 days a week.
Title: Re: What happens when a timer spans midnight?
Post by: roger1818 on April 24, 2006, 12:21:38 PM
This issue was reported many months ago.  I assumed (I guess incorrectly) that X10 had fixed it with a more recent AHP release.  X10 Pro - when will this issue be fixed?

This isn't a bug, you just have to know what day you want the lights to turn on or off.  Just like when you program your VCR, if you want to record after midnight, you have to set the date to the next day.
Title: Re: What happens when a timer spans midnight?
Post by: arf1410 on April 24, 2006, 04:29:39 PM
Software developers ought to be smart enough to make timers work as intended.  And bad analogy with the VCR...If I tell mine to start recording at 11:00 pm, and stop at 1:00 am, it will record for 2 hours, then stop ...

PS  - this post I've linked to  is another of numerous examples that we're are still dealing with sloppy programing 18+ months after rollout! -  http://www.x10community.com/forums/index.php?topic=8552.msg51785#msg51785
Title: Re: What happens when a timer spans midnight?
Post by: roger1818 on April 24, 2006, 05:28:44 PM
Software developers ought to be smart enough to make timers work as intended.  And bad analogy with the VCR...If I tell mine to start recording at 11:00 pm, and stop at 1:00 am, it will record for 2 hours, then stop ...

I thought you might say that.  With a VCR timer you are always wanting to first start recording and then stop it a short time later (the normal state is to not record).

With home automation you might want to first turn something off for a short while and then turn it on again later.   For example, lets say I want to make it so that the kids can't watch TV between midnight and 7:00am on weeknights, I would set up a timer to turn the module on at 7:00am and off at 12:00am Monday through Friday.  With your "smart timers" the TV would turn off in the middle of their Friday night movie and let them watch TV into the wee hours Monday morning.

If you try to correct for a user's mistakes in software, other users will complain that the software isn't doing what you are telling it to do.
Title: Re: What happens when a timer spans midnight?
Post by: Dan Lawrence on April 24, 2006, 05:49:08 PM
So I'm guessing that if I need to turn on at 8pm Tuesday evening and off at 1am Wednesday morning, I need two separate timers.

No.

AHP will allow you to creat a timer for specific days.  When you creat a timer for a module (or modules), when the timer disigner opens, click on the View Adavanced Layout (which is underlined). When the Advanced Layout opens, you will see you can create timers for a single day, weekdays, weekends or any combination. You can select certain days, Sunday to Saturday of each week.  Try it, you will see how easy and flexible timers can be, from every day to once a week on Tuesdays, creating is a breeze.
Title: Re: What happens when a timer spans midnight?
Post by: arf1410 on April 24, 2006, 05:50:47 PM
TV plugged into a lamp module that is on at 7:00 am, off at midnight, 15 hours later.  You've lost me on how that is a problem...
Title: Re: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 24, 2006, 06:55:36 PM
I must be having trouble expressing myself.

I want to turn ON a light every Friday at 8pm. I want the light to turn OFF the same night at 1am, 5 hours later.

However, because 1am is after midnight - i.e., the following day - I must set one timer for Friday 8pm ON and a second timer for Saturday 1am OFF.

If I were to use a single timer for Friday ON at 8pm and OFF at 1am, the OFF command would precede the ON command by 19 hours, which is not what I want to happen.
Title: Re: What happens when a timer spans midnight?
Post by: steven r on April 24, 2006, 07:00:33 PM
I must be having trouble expressing myself.
It's clear to me what you're trying to do!

So I'm guessing that if I need to turn on at 8pm Tuesday evening and off at 1am Wednesday morning, I need two separate timers.

No.

AHP will allow you to create a timer for specific days.  When you create a timer for a module (or modules), when the timer disigner opens, click on the View Adavanced Layout (which is underlined). When the Advanced Layout opens, you will see you can create timers for a single day, weekdays, weekends or any combination. You can select certain days, Sunday to Saturday of each week.  Try it, you will see how easy and flexible timers can be, from every day to once a week on Tuesdays, creating is a breeze.

Actually Yes.
While the day timers are useful, to only have it do the specific example Bob uses above he will need an on timer for 8pm Tuesday and an off timer for 1am Wednesday.

eg. Setting a single timer to come on at 8pm and off at 1am Tue.
Also it is never turned off on Wed.

eg. Setting a single timer to come on at 8pm and off at 1am for days Tue and Wed will result in...

Not restricting to any particular day, as others have mentioned, will result in an 8pm ON and a 1am OFF for everyday.
Title: Re: What happens when a timer spans midnight?
Post by: Dan Lawrence on April 24, 2006, 08:08:57 PM
You are incorrect.

The Advanced Layout allows you to make a timer for a specific day of the week (say Tuesday @ 7:00 PM on to Wednesday @ 1:00 AM). That timer will turn the module on at 7:00 PM Tuesday and turn that module off at 1:00 AM Wednesday.

You could create a timer that does the same thing on Thursday and off on Friday morning.

I've got timers that turn certain lights on at 6:30 AM and turns all the house lights off at 7:30 AM weekdays only. The timers don't run on the weekends.
Title: Re: What happens when a timer spans midnight?
Post by: Rocket J Squirrel on April 24, 2006, 09:57:27 PM
The Advanced Layout allows you to make a timer for a specific day of the week (say Tuesday @ 7:00 PM on to Wednesday @ 1:00 AM). That timer will turn the module on at 7:00 PM Tuesday and turn that module off at 1:00 AM Wednesday.
I still can't see how to do this. I'm looking at the Advanced Layout. It appears to me that both ON and OFF will occur on the same day. Sorry I'm being dense; can you tell me exactly what to do to implement your example in a single timer?
Title: Re: What happens when a timer spans midnight?
Post by: steven r on April 25, 2006, 01:50:46 AM
...The Advanced Layout allows you to make a timer for a specific day of the week (say Tuesday @ 7:00 PM on to Wednesday @ 1:00 AM). That timer will turn the module on at 7:00 PM Tuesday and turn that module off at 1:00 AM Wednesday.
Prehaps your Advanced Layout looks different than mine or we have a different definition of multiple timers. To set a "timer will turn the module on at 7:00 PM Tuesday and turn that module off at 1:00 AM Wednesday" requires two timers for the module on my layout.

Further more I put a time for Fri to turn on at 11:00pm and off again at 1:35am. It's Sat at 1:50am here and the light is still on. It works like I said earlier.

...It appears to me that both ON and OFF will occur on the same day...
They will. Go ahead and make the 2 timers.
Title: Re: What happens when a timer spans midnight?
Post by: steven r on April 25, 2006, 02:11:38 AM
..I've got timers that turn certain lights on at 6:30 AM and turns all the house lights off at 7:30 AM weekdays only. The timers don't run on the weekends.
This is our point exactly!
That will work with 1 timer because you're not crossing the midnight hour.
On the other hand, if your range had been on at 6:30 PM and turns all the house lights off at 7:30 AM weekdays only, your lights would still be on at 7:35 AM Sat morning.
Title: Re: What happens when a timer spans midnight?
Post by: roger1818 on April 25, 2006, 10:03:43 AM
On the other hand, if your range had been on at 6:30 PM and turns all the house lights off at 7:30 AM weekdays only, your lights would still be on at 7:35 AM Sat morning.

That is correct, and that is the way it should work.  The software shouldn't be trying to correct for this since maybe you do want the module to be on all weekend long.  It would be even more confusing if you told the timer to turn modules off M-F and the software actually turned the modules off T-Sa.

But the behavior is counter-intuitive. AHP ought to at least display a warning when the user tries to create a timer which spans midnight because it's probably not going to do what he wants unless it's 7 days a week.

I agree that a warning would be useful when the off time is before the on time and the timer isn't triggered every day of the year.