# Power outage detection solution

**URL:** <https://community.homey.app/t/power-outage-detection-solution/18459>\
**Category:** Ideas & Suggestions\
**Tags:** zigbee, tools\
**Created:** [September 24, 2019, 8:57am UTC](https://community.homey.app/t/power-outage-detection-solution/18459 "2019-09-24T08:57:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [September 24, 2019, 8:57am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/1 "2019-09-24T08:57:17Z")

</div>

I was struggling with reliable power outage detection. Both router and Homey is backed up with UPS. I wanted to know when there is power outage. So far I used central Aeo clamp power metering and calculation to detect the outage (if 3 consecutive power reading are the same, its most probably power outage). However I had several false alarms and it takes some time to detect the outage.  
I was playing with cheap Aqara door sensor yesterday and realized that it can be easily used for this purpose in combination with with 230V relay like this one ([230V relay](http://tme.eu/sk/en/details/rm84-2012-35-5230/miniature-electromagnetic-relays/relpol/)).  
You need to disassemble Aqara sensor and solder wires to magnetic contact detector - its easily accessible. Than connect it to relay and power the relay coil by 230V. In case of outage, relay will change its position and aqara will send command to Homey. Rest of the flows is obvious 🙂  
This way, you are able to detect power failure on any 230V outlet/device for reasonable price (7€ door sensor, 4€ relay + your work).

---

<div class="post-metadata">

**Author:** ![David\_K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_k/32/10319_2.png) [@David\_K](https://community.homey.app/u/David_K)\
**Post date:** [September 24, 2019, 11:05am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/2 "2019-09-24T11:05:25Z")

</div>

> [@Igy](#):
>
> Aeo clamp

Wouldn’t clamp show zero on outage? If zero start countdown, in case countdown reach and still zero send notification?

---

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [September 24, 2019, 11:21am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/3 "2019-09-24T11:21:50Z")

</div>

No, in case of outage, power meter is without power and central unit (Homey) wont receive any new values from it. Thats why the last reported value remains still until the power is back and you can use this behavior for outage detection. But as I stated, you can get also false alarms (I get it once a 1-2weeks).

---

<div class="post-metadata">

**Author:** ![David\_K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_k/32/10319_2.png) [@David\_K](https://community.homey.app/u/David_K)\
**Post date:** [September 24, 2019, 1:15pm UTC](https://community.homey.app/t/power-outage-detection-solution/18459/4 "2019-09-24T13:15:44Z")

</div>

Ou. That’s the issue. I had similar need like you but with ups. I also wanted to know when power went down and idea was to detect power on the ups input. That way clamps are powered by ups while ups input was 0. Not 100% same as main input but more or less similar. I left that idea as clamp power meter was somewhat expensive.

---

<div class="post-metadata">

**Author:** ![John\_Lockwood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/john_lockwood/32/10450_2.png) [@John\_Lockwood](https://community.homey.app/u/John_Lockwood)\
**Post date:** [September 25, 2019, 8:41am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/5 "2019-09-25T08:41:12Z")

</div>

@Igy @David_K  
As you have a UPS the following would be a potential solution which would work properly.

There is a free open source package called NUTS - Network Ups ToolS. See - [https://networkupstools.org/](https://networkupstools.org/)

You could have create a Homey app which monitors the state of the UPS via NUTS. Probably the simplest way is to have NUTS running on a VM or Raspberry Pi and for the Homey app to periodically query the NUTS client on that system.

The advantage of NUTS will be that it already supports many brands and models of UPS.

---

<div class="post-metadata">

**Author:** ![David\_K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_k/32/10319_2.png) [@David\_K](https://community.homey.app/u/David_K)\
**Post date:** [September 25, 2019, 9:16am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/6 "2019-09-25T09:16:20Z")

</div>

I actually have UPS connected to synology. If there would be some connection between synology UPS service and homey “voila”. Unfortunately, I can script but not write programs. Mainly some automation and C in my case. 😃 😃

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 25, 2019, 9:35am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/7 "2019-09-25T09:35:13Z")

</div>

> [@David\_K](#):
>
> If there would be some connection between synology UPS service and homey “voila”.

There’s might be a (bit of a convoluted) way: create a custom SMS service provider on your Synology (Control Panel \> Notification \> SMS). You have to enter a URL, where you can point it towards your Homey (make sure it’s a POST request). Add at least two BODY fields, `phone` and `message`.

In the Advanced tab make sure that an SMS it send for all relevant UPS-related events (under Power Supply).

On Homey, use the [HTTP request flow cards app](https://apps.athom.com/app/com.internet) to trigger on incoming POST requests. Hopefully you should be able to extract the exact reason why the event was sent.

---

<div class="post-metadata">

**Author:** ![David\_K](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_k/32/10319_2.png) [@David\_K](https://community.homey.app/u/David_K)\
**Post date:** [September 25, 2019, 9:40am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/8 "2019-09-25T09:40:12Z")

</div>

I obviously did not tried it yet but for sure I will play with it and potentially send here my findings. Good tip.

---

<div class="post-metadata">

**Author:** ![John\_Lockwood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/john_lockwood/32/10450_2.png) [@John\_Lockwood](https://community.homey.app/u/John_Lockwood)\
**Post date:** [September 25, 2019, 9:53am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/9 "2019-09-25T09:53:05Z")

</div>

There is a NUTS implementation already available to run on the Synology. You then just need an app on the Homey to monitor that.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 25, 2019, 10:15am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/10 "2019-09-25T10:15:32Z")

</div>

The “just need an app” part is the main issue here, I think.

---

<div class="post-metadata">

**Author:** ![John\_Lockwood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/john_lockwood/32/10450_2.png) [@John\_Lockwood](https://community.homey.app/u/John_Lockwood)\
**Post date:** [September 25, 2019, 10:31am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/11 "2019-09-25T10:31:18Z")

</div>

> [robertklep](https://community.homey.app/u/robertklep)  
> The “just need an app” part is the main issue here, I think.

Indeed. 😃

---

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [September 25, 2019, 10:44am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/12 "2019-09-25T10:44:10Z")

</div>

No, I dont have regular UPS, I have power supply with battery backup option. There is no such a think how to connect it to NAS or other platform ([see this post](https://community.homey.app/t/homey-powerbank/2634/17)).

---

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [September 25, 2019, 11:07pm UTC](https://community.homey.app/t/power-outage-detection-solution/18459/13 "2019-09-25T23:07:25Z")

</div>

This is how it looks like. Relay and door sensor fit inside the socket.

 ![IMG_20190925_142745](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/f/ff9e731c8f4ae446bb380b63e93394ae8cd44340.jpeg) ![IMG_20190925_142828](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/4/43951126c3b411482768e09c7b8ea5705925c046.jpeg)

---

<div class="post-metadata">

**Author:** ![Mauri2905](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mauri2905/32/12554_2.png) [@Mauri2905](https://community.homey.app/u/Mauri2905)\
**Post date:** [September 27, 2019, 2:52pm UTC](https://community.homey.app/t/power-outage-detection-solution/18459/14 "2019-09-27T14:52:38Z")

</div>

I have a old camera D-link that send to me a popup on the iphone (via app) if the power or the wifi is down from the server D-link.

i follow a similar solution from Homey or Ifttt. A software solution.

any idea?

---

<div class="post-metadata">

**Author:** ![Sk8er000](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sk8er000/32/47432_2.png) [@Sk8er000](https://community.homey.app/u/Sk8er000)\
**Post date:** [November 18, 2021, 9:17am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/15 "2021-11-18T09:17:00Z")

</div>

It’s a very interesting solution, I have a spare door sensor (SonOFF) and I think I have found the same relay you are using (Finder 40.61.8.024.0000) can you share the pinout connections please?

Thank you

---

<div class="post-metadata">

**Author:** ![Igy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/igy/32/22144_2.png) [@Igy](https://community.homey.app/u/Igy)\
**Post date:** [November 18, 2021, 9:57am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/16 "2021-11-18T09:57:08Z")

</div>

Here you go with pictures.

 ![20211118_104553](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/5/852335fe3d84b2c29f57e8bfc089ea3f8ae65f74.jpeg)  
 ![20211118_104543](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/9/2913c79dcad1703b16345d846fc5277439e829ba.jpeg)

---

<div class="post-metadata">

**Author:** ![Sk8er000](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sk8er000/32/47432_2.png) [@Sk8er000](https://community.homey.app/u/Sk8er000)\
**Post date:** [November 18, 2021, 9:59am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/17 "2021-11-18T09:59:15Z")

</div>

Thank you very much! I’ll try to do it myself tomorrow! it’s a very clever idea!

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 18, 2021, 10:06am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/18 "2021-11-18T10:06:39Z")

</div>

> [@Sk8er000](#):
>
> Finder 40.61.8.024.0000

If I’m reading [the datasheet](https://www.farnell.com/datasheets/2790229.pdf) correctly, that’s a 24V relay. You want a 240V relay, number 40.61.8.240.0000

---

<div class="post-metadata">

**Author:** ![Sk8er000](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sk8er000/32/47432_2.png) [@Sk8er000](https://community.homey.app/u/Sk8er000)\
**Post date:** [November 18, 2021, 10:18am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/19 "2021-11-18T10:18:39Z")

</div>

Thank you for pointing it out!!! I was in rush to find a suitable relay on Amazon with delivery for tomorrow and I misread the numbers!! Ordered the 240V version now!

---

<div class="post-metadata">

**Author:** ![Sk8er000](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sk8er000/32/47432_2.png) [@Sk8er000](https://community.homey.app/u/Sk8er000)\
**Post date:** [November 18, 2021, 10:44am UTC](https://community.homey.app/t/power-outage-detection-solution/18459/20 "2021-11-18T10:44:37Z")

</div>

Oh well, the only one available is a 40.52.8.240.0000 but from the datasheet the only difference is 2 CO 8A instead of 1 CO 16 A, the connections should be the same I think…

[Next page](https://community.homey.app/t/power-outage-detection-solution/18459.md?page=2)
