Author Topic: How to set up / be alerted of a power outage.  (Read 478 times)

Offline nutshellml

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +5/-5
How to set up / be alerted of a power outage.
« on: July 21, 2018, 08:29:28 am »
Morning all.. Has anyone set up anything to be notified of a power outage?  I have my Modem/Vera on UPS so ideally I would like to be notified immediately of an outage.  IF that's not possible, then once the power is back online be notified.  Any ever do anything like this?

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: How to set up / be alerted of a power outage.
« Reply #1 on: July 21, 2018, 08:36:50 am »
You can put some code into Lua Startup to tell you when the system comes back.  Otherwise, assuming your Vera and modem are on a UPS, then you'll need some way of sensing line voltage.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Online HSD99

  • Sr. Member
  • ****
  • Posts: 384
  • Karma: +20/-0
Re: How to set up / be alerted of a power outage.
« Reply #2 on: July 21, 2018, 10:17:09 am »
There are a number of ways you can do this, ranging from almost no effort to some amount of effort and modest cost.

1. If the power fails and your Vera and modem are on a UPS, Vera's communications with mains-powered devices will fail. In Users & Account Info --->Notifications Settings--->Check "Device Error Alert (a device in your Vera is not working properly)". Vera will send notifications when the device poll fails. You can assume if you get a bunch of different devices failing that the power is out. The disadvantage of this method is that it depends on the polling interval and makes the assumption that all the device failures are due to the power outage.

2. A variation on 1. above---use a mains-powered device like an appliance module without a load. Set up a scene to send a command, e.g. OFF, to the module once per minute. Set up the same notification as in 1. Every minute Vera will send the command. If the module doesn't respond, you'll get a notification. This has the advantage that you'll get a notification within one minute for a specific device, and have a higher degree of confidence that the problem is a power failure.

3. This method will give you an absolute indication of a power failure, but it requires a bit of work. You will need a door/window sensor with external contact closure inputs, e.g. the Ecolink door/window sensor; a mains-powered +12 power supply like the wall-wart that your Vera comes with; a 12 volt DC coil relay with single-pole, single throw (SPST) contacts.  The power supply and relay can be found on Amazon, at least in the US. Connect the +12 VDC output from the power supply to the +12 VDC coil terminal on the relay. Connect the Normally Closed (NC) contacts on the relay to the external contact closure inputs on the door/window sensor. When the power supply is plugged in, the relay will be energized and the NC contacts will be open. The door/window sensor will not show as tripped. Unplugging the power supply, or a power failure, will cause the relay spring to return the NC contact to its closed position, triggering the door/window sensor. Set up a notification for the door/window sensor and you'll have an unambiguous indication of a power failure.

Let me know if you need any additional information. The advantage of all of these methods is that you don't have to do anything with the mains directly.

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1464
  • Karma: +41/-36
Re: How to set up / be alerted of a power outage.
« Reply #3 on: July 22, 2018, 07:26:44 pm »
I have used this:,7845.50.html#lastPost.

I have 2 machines, each monitoring 2 UPS's. 1 is the Blue Iris PC. The other one is an extra mini that monitors the UPS powering the cable modem and router.

With 2 devices in Vera, 1 UPS on battery triggers for no power, and the other a similar virtual device. When both are on, PLEG sends me multiple notifications of a power outage.

I also found this: If I get time this winter, I may look into that.  I have a 3rd UPS powering the Vera that I should be able to monitor through the USB.   
Vera 3, 1.7.1040, CT101, Everspring Motion, GE/Jasco Switch/Dimmer, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, LB60Z-1 bulb, Hue, Alexa, Zooz 4-1

Offline jswim788

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +58/-2
Re: How to set up / be alerted of a power outage.
« Reply #4 on: July 22, 2018, 11:31:17 pm »
Also take a look at this post for info on a multipurpose outage solution: