Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer Driver Question
I am using the Timer driver to help with determining the Runtimes on my AC Units along with the RunTimer driver - I didn't realize the Count Up timer resets on system restarts, which definitely defeats the purpose of keeping Daily, Weekly, and Monthly percentage run totals.  

I could always save the time when the daily, weekly, and monthly timert was reset, and then place them in the timer on the reboot, but from what I can tell that is not possible based on the Docs.  Is there a way?

I guess an alternate method would be to use another field in the RunTimer driver, since that retains the data.
I am thinking I overthought this too much, if I just save the time I reset into the CQC Variables driver and have it persist, I think this would solve my problem, and I wouldn't need the Timer Driver for anything, just the RunTimer Driver.
The logic server has an elapsed time field for this type of purpose, but that will also reset if you restart the system. Any type of field data would. It's particularly nice in that it will automatically count up the time that a field in a particular state, not just how long since some particular time. So it would do a lot of the work for you, but it's not persistent.

What you are wanting is really more of a historical data collection thing, which is sort of beyond the scope of the timer or logic server drivers. There is a third party database logging driver that is useful for that types of things.

You can ask the variable driver to persist particular field values. So if there's some clear point at which you want to store a time stamp and then calculate from that, you could create variable driver fields for those. You can also use the SetFldDefault field to force it to persist one of the fields' value. So, if there's a known point at which they need to be reset, you could reset and them and proactively ask the variables driver to persist the new value right then. Then it would come back up with that after a restart no matter what.

But, if the other timer driver persists the info, that would probably be easier.
Dean Roddey
Software Geek Extraordinaire
(09-11-2018, 05:51 PM)Dean Roddey Wrote: But, if the other timer driver persists the info, that would probably be easier.

Yes, the RunTimer driver does persist, so setting a Variable Driver Start Time that persists, and subtract it from the current time allows it to handle it.

I am now testing RunTimer2, which rbroders wrote as an upgrade from RunTimer.  It keeps a running 24 hour total, which I like much better, so will probably go to that.  It will also allow you to have one driver for all 18 of the runtimes I want to track, which would require several instances of the older RunTimer.
One of these days I'll do a more full featured timer type driver. It's something that would be useful.
Dean Roddey
Software Geek Extraordinaire
Which run time driver are you using?

I use the one that was crated a few years ago - its listed as Run Timer by Beezleware. As far as I remember it does not reset when the server restarts - but I could be wrong - I have not look at it for a long time as it just sits there working for me.
Mykel Koblenz
Illawarra Smart Home

Possibly Related Threads...
Thread Author Replies Views Last Post
  Auto Generate general question carealtor 4 66 11-12-2018, 09:22 PM
Last Post: carealtor
  "Client Side Driver Directory Could Not be Cleaned Out" TurboSam 15 702 09-27-2018, 01:43 PM
Last Post: TurboSam
  CML Driver IDE docs - where? rbroders 1 209 09-18-2018, 05:41 PM
Last Post: Dean Roddey
  reset driver statistics? rbroders 9 661 09-11-2018, 07:50 PM
Last Post: Dean Roddey
  Question on Formatting of Variable Text kblagron 2 383 09-07-2018, 08:52 PM
Last Post: kblagron
  Driver Configuration w/8 prompts rbroders 1 396 09-03-2018, 09:28 PM
Last Post: Dean Roddey
  Driver info/stats rbroders 6 595 09-02-2018, 08:34 PM
Last Post: Dean Roddey
  Sonos Driver zra 3 399 09-01-2018, 03:09 PM
Last Post: Dean Roddey
  HTTP Get driver not working znelbok 10 837 08-28-2018, 10:10 AM
Last Post: Dean Roddey
  Can't add fields to ElkDev driver rbroders 4 482 08-07-2018, 06:24 PM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)