Please login or register.

Login with username, password and session length

Author Topic: Efficient timer programming - "AHA!" moment  (Read 2306 times)

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Efficient timer programming - "AHA!" moment
« on: October 04, 2010, 02:11:07 PM »

I had one of those "AHA!" moments earlier today (you know, the one where the light bulb goes on above your head - or at least it WOULD if you programmed your X10 correctly ;-) ).

Ever since I bought AHP back in 2004, I have gone through the same ritual with it twice a year.
In the Fall I switch my timers and programming for the Winter, and in the Spring, I switch them for the Summer.

Since my X10 setup is an ever-changing masterpiece, I cannot simply swap files back and forth, and download to the interface. inevitably, at some point (or points) in the previous 6 months, I would have changed module assignments/functions/timers, and the file used the prior year would be out of date for my needs.

So, I would sit down with a printout of the two files (the season that was ending, and file from the previous year for the season about to begin), and see what changes I need to make to the new file. Needless to say, this became quite tedious, and I usually made some mistakes, and would spend the first few weeks on the new file tweaking things so they did what I wanted them to.

Today, as I was starting the process, I decided to take a totally different approach.
Instead of trying to compare two AHX files twice a year, I decided to create a central document, detailing all of my modules, and all of my timers and macros.
I specified which timers were for the Winter program, and which were for the Summer program. I could then take that document, and compare against the Winter program, and make any updates as needed. If I keep that document updated throughout the winter, noting and changes I make, and how they would impact the Summer timers, then the process should be faster when I change over again in the Spring.

Well, after documenting all of my timers, I found that nearly all of them were really the same from Winter to Summer. I had a few timers which were set to use a Dusk delay (Dusk-1:00) in the Winter, and to come on at 6:30 PM all Summer.

That's when the bulb went off.

Since "Dusk-1:00" is going to happen BEFORE 6:30 PM this time of the year, as well as in the Spring when I do my changeover, and since I don't mind if the timers come on a few minutes early for a few weeks, why not combine the timers together!!?? I left the "OFF" times (either 10:00 PM or 11:59 PM) connected to the "Dusk Delay", and simply added another "On" at 6:30 PM.

In the Winter, the Dusk delay will kick the timer on, and the "extra" command at 6:30 will do nothing.
In the Summer, the timer will kick on at 6:30, and the "extra" Dusk delay will do nothing.

With that change to my programming, I have eliminated nearly all of the changes I would have to make twice a year.
I still have one macro that I would change from one season to the other, but since it is a conditional based on a flag, I might just use a different flag for the winter, and call it a day (or use a date-based conditional, I suppose - that might work nicely, too)
Logged
 

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