Logging time a NC is open

PaulD

Active Member
I would like to capture the time duration that a NC circuit is open on my OPII. I know how to trigger a message or email when the circuit goes open or closed but that is not what I want to do. I would like to find a way to capture that time span in a file that I can view. I need to monitor multiple circuits and the time span for an open condition could be anywhere from a few hours to a few days. This is a one time effort to capture some information so I can consider those times in a future PCAccess program. I have not found any way to do that in PCAccess yet. Anyone know a easy way to do this?
 
You can use flags and some automation rules. You can chain flags with the increment operator to count past 255; admittedly it's a bit awkward, but it's doable. Consider these rules, with two flags named "Counter1 and Counter2":

Code:
EVERY 1 MINUTE
	AND IF Zone x NOT READY
		THEN INCREMENT Counter1

WHEN Counter1 OFF
	THEN INCREMENT Counter2

Counter1 increments once per minute whenever the zone is open. Counter2 increments once every time Counter1 rolls over from 255 back to 0. The total amount of time that the zone is open, in minutes, is Counter2 * 256 + Counter1.
 
You can use flags and some automation rules. You can chain flags with the increment operator to count past 255; admittedly it's a bit awkward, but it's doable. Consider these rules, with two flags named "Counter1 and Counter2":

Counter1 increments once per minute whenever the zone is open. Counter2 increments once every time Counter1 rolls over from 255 back to 0. The total amount of time that the zone is open, in minutes, is Counter2 * 256 + Counter1.

Thanks. I know how to do that but how do you log that information into something that is viewable when the counting is done?
 
Thanks. I know how to do that but how do you log that information into something that is viewable when the counting is done?

If you want it done automatically, you'd need to have a computer that can periodically request the values of the counter flags, figure out the time, and write it to a file. Perhaps Homeseer or CQC can do this; I don't have either one, so I don't know. Otherwise it would be a roll-your-own solution, which is not out of the question if you can write code. You can register as a developer with HAI and get access to their OmniLink library, which would allow you to write a program that can communicate with the OPII.
 
Back
Top