starhome Posted July 1, 2014 Posted July 1, 2014 What't the best way to detect the length of a power outage and send out a notification? (with ISY and Router both on a UPS and both without a UPS)? Wondering if there are variables build in ISY for this?
apostolakisl Posted July 1, 2014 Posted July 1, 2014 I suppose you could write a program that queries a device every minute or so and send an email/text if it fails to respond, along with that, the program would enable a second program and disable itself. The second program sends an email/text when the device does respond, and then disables itself and re-enables the first program. The length of time between the 2 emails/texts is how long the power was out for. Of course your UPS would need to keep working and powering your router/isy/modem the whole time.
jwddsinc Posted July 2, 2014 Posted July 2, 2014 There is an electricity module, I am not sure how it works but that may have the variables you are looking for. If you have a device that is always on, you could write a program that starts a timer variable ( you create a variable for secs min etc) that increments until the device turns back on. If the device doesnt turn back on automatically with the power then you will have to add a query statement to your else / then clause to try to turn it back on. As that is failing you increment your timer variable. When it finally turns back on you could get notified with the timer variable which would give you the number of seconds minutes etc. IF you lose power to the isy you could check the log to see when you stopped getting events and when it turned back on again. hope that helps,
KeviNH Posted August 30, 2014 Posted August 30, 2014 One of the first programs I wrote was "Boot Completed". This is a program with no conditions, but the "Run at startup flag" set. Such a program only ever runs at startup. My "Boot Completed" sends a notification message and turns off some devices which might have been left powred on in the case where if the reboot was due to a system hang, etc.
Recommended Posts