Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer Driver Question
#1
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.
Reply
#2
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.
Reply
#3
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
Explorans limites defectum
Reply
#4
(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.
Reply
#5
One of these days I'll do a more full featured timer type driver. It's something that would be useful.
Dean Roddey
Explorans limites defectum
Reply
#6
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TTS Driver Error kblagron 7 755 03-03-2023, 01:05 AM
Last Post: kblagron
  Driver for Amazon 4k Stick Darrie 3 897 01-15-2022, 02:21 PM
Last Post: znelbok
  CQSL Interface Driver connects but no control NightLight 3 947 10-26-2021, 01:12 PM
Last Post: NightLight
  SSL Certificate Question gReatAutomation 1 1,130 10-26-2020, 07:48 AM
Last Post: gReatAutomation
  ClickPLC driver now failing after upgrade znelbok 2 1,279 09-21-2020, 10:48 PM
Last Post: znelbok
  Pentair driver tom 5 2,434 08-02-2020, 11:29 PM
Last Post: kblagron
  Marantz receiver driver (IP) dlmorgan999 6 2,487 05-15-2020, 03:32 PM
Last Post: dlmorgan999
  V2 Question - OpenWeatherMap Using their New JSON Data Feed kblagron 7 2,570 05-07-2020, 01:40 PM
Last Post: Dean Roddey
  Variables Driver Client gReatAutomation 4 2,036 04-25-2020, 12:46 PM
Last Post: gReatAutomation
  Dynamic Overlay Question bryanb 4 1,629 04-17-2020, 03:48 AM
Last Post: bryanb

Forum Jump:


Users browsing this thread: 1 Guest(s)