Author |
|
onhiatus Senior Member
Joined: May 12 2004 Location: United States
Online Status: Offline Posts: 279
|
Posted: April 06 2005 at 16:24 | IP Logged
|
|
|
It seems like it might be useful to have a Time on function that when given an X10 device would calculate how much time that device had been on. It'd imagine the function taking a time parameter so you could specify the last day, week, month, forever. A similar function (or the same one) could be used for the number of times the device was turned on.
ph_calculateDeviceOn(HouseCode, UnitCode, start, end)
Easiest way might be to use the log to calculate... that would limit the calculations to the range of the log.
Just a thought.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 11 2005 at 15:00 | IP Logged
|
|
|
Hmmm...Ive been giving this some thought and Im not sure if it could be easily implemented.
One way, as you suggest would be to use the eventlog. Im not sure how useful it would be though if you are trimming your evenlog at regular intervals (I only keep the last two days in mine). If the interval isnt a big issue, the next problem would be parsing the log. Depending upon the controller that did the turning on or turning off, the eventlog would have to be parsed differently. For example, if you were using the CM17A, then the "on" command is generated within a single eventlog record. However, if you were using a controller such as the CM11A (or most others), then the "on" command would be a minimum of two events. One for the address command, the second for the "on" command. Also, each controller outputs a slightly different format for the eventlog that would have to be accounted for.
Another approach would be to just build it into the software. The problem with this approach would be the additional overhead required to keep the information properly updated with each X-10 command. Might need additional parameters to tell PowerHome if you only want to track on a single controller vs multiple controllers, only outgoing X-10 vs both incoming and outgoing, etc.
The last way would be to put together some triggers and GV's and monitor it using code. Im not sure if it's doable, but I'll see if I can put something together that will serve in the interim.
Dave.
|
Back to Top |
|
|
|
|