After a powerfail, I want to be able to send an email that the system restarted and how long it was down. It is working except for the downtime timer.
Here is the way I thought I would do it. Better ways welcomed!
Create a timer called HS3_DownTime from the web interface.
Start it in an event triggered from startup.vb
Another event resets the timer to zero after it reaches 1 minute. That is working fine.
So I thought that would give me a timer that would reflect, +1 minute, the time down.
However, it looks as though the timer, in startup.vb, has a value of zero (before being reset). I'm suspecting it did not live thru the restart.
Is this the way timers work? If so, any way to make them live? I might could create a virtual device and work it out that way since devices to live thru a restart. Unfortunately, I'm not a scripter which I suspect would be needed to get the time back out of the device and calculate the downtime.
Here is the way I thought I would do it. Better ways welcomed!
Create a timer called HS3_DownTime from the web interface.
Start it in an event triggered from startup.vb
Another event resets the timer to zero after it reaches 1 minute. That is working fine.
So I thought that would give me a timer that would reflect, +1 minute, the time down.
However, it looks as though the timer, in startup.vb, has a value of zero (before being reset). I'm suspecting it did not live thru the restart.
Is this the way timers work? If so, any way to make them live? I might could create a virtual device and work it out that way since devices to live thru a restart. Unfortunately, I'm not a scripter which I suspect would be needed to get the time back out of the device and calculate the downtime.
Comment