Power Loss Alerts

At our home we often experience voltage fluctuation on our electricity supply with multiple surges.
(Not just us – It happens to the whole of the street)

The consequence of this is that the RCD on our main fuse board often ‘trips’ knocking all our sockets off (The RCD is unfortunately now a legal requirement in the UK)

This tripping is not a problem when we are at home – a quick trip to the garage to reset the RCD doesn’t take long (although resetting all the digital clocks is a pain – I need to replace them with battery backup ones)

All my computers, SmartThings, network routers/firewalls etc. are covered by about 6 hours of UPS backup so short term blackouts are not an issue and we often lose power completely for 2-3 hours at a time

However; when we are not at home a tripped RCD could be disastrous, obviously problems with defrosted food and loss of UPS power after 6 hours etc.
Luckily we have a good friend who is happy to make the short journey to our home to reset the RCD if it trips when we are on holiday etc.

The problem I had, is when to know it has tripped so I can ask our friend to reset it.
Initially I looked at getting the UPS to send an email when on battery power but this was not too reliable as we might not have reliable internet connections on holiday.
Sending a direct email to a guy (our friend) who looks at his emails once a week is not too reliable either. He does always carry his phone with him though

So I came up with this little idea.
It’s very simple really and uses the facility that Fibaro Door sensor has to send open/close to smartthings when an external contact closes

Power Monitoring V1.0

This is what I’m proposing…

Mount this all in a box with a 3-pin plug on a lead to plug into mains

  1. 240v ac relay to hold N/C connection open when power is present
  2. Cable & a plug to connect to mains
  3. Fibaro door sensor connected to relay (used WITHOUT the magnet)
  4. Send message/sms when door sensor changes to open or close

If power goes off then relay closes and turns on/off Fibaro door sensor (which retains its battery power) – thus allowing SmartThings to send a push message when the status of the door sensor changes.

A quick little SmartApp (or standard “Notify Me When” SmartApp) to alert me when power is off – Problem Solved!

2 Likes

Ok… in revision of this topic…
There are two concerns I have now that I have a working prototype…
• The 240v relay gets quite hot when the coil is energised all the time so can’t go inside a box
(I even tried mounting the relay vertically outside the box to try and reduce the heat but it didn’t really work)
• Mixing 240v a/c and signal wire in the same relay might not be the best thing to do.

So…
Power Monitoring 1.1 
• 5v relay to hold N/C connection open when power is present (or Vice Versa)
• 5v PSU (Probably some kind of usb charger)
• Fibaro door sensor connected to relay (used WITHOUT the magnet)

Same app & config as before
Same setup as before but probably a little safer and less prone to interference from the mains supply.

1 Like

The 5V relays arrived so I set about creating V1.1

With a little veroboard, a couple of connectors and a box I had lying around I have a MUCH better version. (Much smaller too – Box size is now governed by the size of the Fibaro)

This is such a simple little thing but will make a massive difference to peace of mind.
(I’m surprised nobody has created it commercially)

This is the circuit already soldered onto the veroboard with the cables to connect to the Fibaro

And this is it all mounted in the box (circuit is tiny when next to the Door Sensor)
I cut the plug off a USB charger I had hanging around to provide the 5Vdc that I needed for power

And the finished product

What I didn’t mention in my 1st post was that I actually now have the UPS hardwired on a special, closed non-RCD circuit which only powers the UPS – Even if the house RCD is tripped they should still get power – However the freezers etc. are not on this circuit.
So… I have made two of these – One to alert for the tripping RCD and the other which alerts if the whole house (including the UPS) loses power.

1 Like

These seem to work so well and I have had them running for quite a while with no heat issues that I don’t consider them prototypes any more – They are the finished article!

So impressed was I with my little bit of hardware that I have created a small SmartApp (my 1st ever play with this language) when I realised all I wanted was push/txt notification with the ability to put more than 1 phone number in.

I also got to thinking that showing Open/Closed for a power monitor was not really appropriate so I ‘tweaked’ the DTH a bit to show ‘Power OK’ and ‘Power Off’ - green for OK and red for Off
(Not sure the green is the right colour though – It’s a bit bright)

Here are a couple of really poor shots of my iPad showing the DTH tweaks

1 Like

And when the power goes out…

So… That’s pretty much the end of my little project…
It may seem very simple to you experienced guys (it is!) but it does what I want it to do and was fun creating it
(I just gotta change that bright green!)

Happy to answer any questions and receive comments :slight_smile:

3 Likes

When contact is open, do you see any voltage on the two blue wires coming from the sensor? Thinking maybe some low voltage TTL gate or even simpler, a transistor with some ballast resistors to simulate the relay…

3 Likes

@ady624
To be honest I didn’t check as I thought a little 5V micro relay would do the trick for me after the heat issues of the a/c relay.
I thought someone would come up with a simpler way of doing this :slight_smile:

I can probably check in the morning (it’s 3am in UK right now)

1 Like

I created something similar here.

And there is one selling on Amazon.

3 Likes

Somebody does make one of these. I’ve seen it on Amazon a hundred times. But of course now that I’m trying to look for it I can’t find it. I think it was like $30. It’s pretty much exactly what you’ve done. There’s a very small square box which looks like a iPhone USB charger. On the other end of a cord there’s another box about three times the size of the usb charger box.

@Navat604
Ray I never thought to try a leak sensor - they are much cheaper than the Fibaro door sensor here in the UK - I have another project that I’m thinking of, interfacing with my wired home alarm so will look at these

@chris2vic
Chris, you guys are so lucky in the US - we don’t have half the stuff that you can buy

1 Like

@ady624
I tested the blue wires this morning
There is a tiny, split second surge of 0.5v dc when the contact closes or opens
Maybe a cap discharging?

Not sure how this would affect the operation your circuit.

What is the batt voltage? And can you identify the common wire of the two?

@ady624
Battery voltage is 3.6

Connections look like this:

Or if using with a temp probe - Like this

Manual can be found here

The temp probe is out of the question, it’s digital data - complicates things.

The IN though, not sure if that would work (says potential free) but internally, it probably needs to have a pull up resistor to keep the potential up so that it can sense the current, unless it’s really a current sensor, in which case, we really really need very high resistors.

was thinking of a NPN transistor, two Mohm resistors 5V to GND, emitter connected to middle of the two and the IN port, collector connected to GND of both the 5VCC power supply and GND of Fibaro. Then another two resistors between 5V and GND with a ratio of 4 (up) to 1 (down) that would apply a 1V voltage to the base of the transistor.

Somewhere along these lines:

With R1 = 4 x R2 (R1 4 times as large value as R2)
R3 = 2 x R4 (1.66V applied to IN of Fibaro)

Now, R1 could be 4k8 and R2 could be 1k2

But R3 and R4 need to be large… start as large as possible… 1Mohm maybe? R3=2Mohm, R4=1Mohm.

Trick is, when enough voltage is applied to the base (typically more than 0.7V) the collector-emitter gate opens and they pretty much short-circuit R4, causing the sensor to see a “contact”. The question is, will 1Mohm input resistance with some 1.6V potential not trigger the sensor? :smiley:

I assume no responsibility for the death of the Fibaro sensor :smiley: :smiley: :smiley:

1 Like

Typical Engineer thinking. Trying to turn an on/off relay into a full blown talking robot! :grin::dizzy_face:
Only problem with the circuit is the power supply by the sensor which potentially kill the battery in no time and the gate voltage for the sensor.

Yeah, it would be a trial and error at this point, no data about how the sensor actually works… but it should consume a lot less than the always-energized relay. And smaller. IF it works…

Hahah trial & error - that’s why I’m on my 3rd marriage!

I haven’t measured the current draw of the psu for this yet but I’m sure it’s a lot less that the cost of the contents of my freezers :joy:

Interesting & educational guys but I’ll stick with my simple relay :slight_smile:
I’m not that good with electronics and my soldering is pretty messy but this works brilliantly for me

Now… if you want to give me a circuit & DTH so I can get rid of the Fibaro all together then I’ll give that a go :slight_smile:

1 Like

Found this on Amazon, not sure if it’s the only one.

1 Like