Save duration of a state bool TRACK EVENTS

Please don't start a new thread for basically the same problem, at least I presume it is the same problem. Please continue the discussion there.
Save the cumulate data each each 8 hours - #2 by dceejay