Best idea yet! Especially as I was given a RPi for Christmas and am already experimenting with it!
Best idea yet! Especially as I was given a RPi for Christmas and am already experimenting with it!
Whew! Nice idea, but UPS's are not cheap! The mains-powered analogue clock is a good idea, but I like the one about the Raspberry Pi the best (so far!)
Oops, yes, that's what my UPS does, connected to the PC. And I always switch off the PC when I go away. (I could leave a little old Raspberry Pi switched on, though...) Come to that, I do also have a Basic Stamp with mains adaptor...
Not part of the original spec. to be affordable! :-)
If you power it from a trickle charged battery, it will even stay up when power is down. What you can then do is - say - ping your router or something that is always on and look for when it isn't.
Either a shell script or something that opens a connection to a socket on the router..or does e.g. an SNMP call. Failure of that indicates router powered off.
I have suitable C code used here to monitor my router every 5 minutes using SNMP.
somest8mes tenet works as an alternative.
Or some routers can be persuaded to log to a remote IP address.
Or you ,might even cobble together a way of detecting mains (say an optical isolator fed from the mains) on some sort of I/O pin.
Cron is your friend here.
Dunno but does it matter how long? I have an old timer here which is mains driven with no battery back up, thus when the mains goes of, even for a few seconds if left in over ride the relay drops out. thus if the device you left on is off when you return the power went off. Brian
My bro (electronics degree) said re another kind of sensor that I could create to sense mains electricity flowing would be just by winding some coils of wire around the mains cable, which would generate a small voltage when the mains is on or nothing when it's off. This could then be fed to the RPi or to a Basic Stamp, with suitable amplification of the signal as necessary.
True!
But the RPi would need to be powered from batteries :-)
Well, yeah, if we're talking about the freezer, which is the only reason why I'd need the gizmo. If power went off continuously for a number of hours, that would be nice to know later. The neighbour said it went off for 10 hours just before Christmas. 10 hours, though, should be okay for the freezer contents, especially given that I only had minimal heating on so the house would have been cold already.
I have a bog-standard Netgear router which logs (amongst other things) startup events. That would show unexpected startups caused by power cuts.
We have a slightly sensitive RCD which very occasionally trips for no obvious reason. When we go on holiday I set the server at work to ping my router hourly (address obtained via DynDNS as I don't have static IP) and to send an SMS text to me and a neighbour with keys if it doesn't get a response for a while. That has saved the freezer contents and tropical aquarium fish.
My oven and microwave clock tell me if there has been a power cut, but both can only count to one. They simply have to be reset when the elecrickkery returns!
Turn a full 'fridge ice tray upside down, and put it on top of the freezer contents. If it still has ice cubes in it when you return, then there was no power problem. If it's empty, then there was.
thats possible too.
but it is a bit prone to false positives from RF in not dine carefully
a simple resistors full wave bridge and capacitor to an LED with an optodetector on it is a cheap small and easily constructe in a mains plug with a two wire socket on it to take a basic 'open collector' signal back.
I'd use a diode and a resistor and a small battery charge to run it off rechargeables
Not a problem. The Haynes book Raspberry Pi Owner's Workshop Manual explains how this can be achieved.
Yeah, I know the coin trick on top of a frozen glass of water, too! But it ain't exactly what I'd call a gizmo!
Why look for a gizmo, when there are simple solutions available? Just to look geeky?
Or just a Class Y cap
NT
HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.