Power Notifier : Get an email alert when your house loses Electricity


Recommended Posts

 

Power Notifier

22658858343_eac301ae3a_o.png

Neowin's Simplezz and I have been working on an application called, Power Notifier. Power Notifier works in conjunction with your existing UPS. When your UPS is plugged into your computer via a USB cable, your desktop now has a battery indicator just like your laptop. This application monitors your computer and when it detects you are not charging and are running off battery backup it sends you an email. The email includes the computer name the version of Windows you are running, whether your AC is On or Offline and what % the battery is currently At.

When power is restored and if your machine is still on it send you a second email saying AC Online and how much battery % you have left. As well as the rest of the information mentioned above.

This application could also be useful on a Laptop that is always plugged into the charger but operates on a shelf with the lid closed (My Quickbooks machine). Then if your charger were to stop working and or became unplugged and your laptop was no longer charging, you would get an email.

22919535879_9f0831a0f9_z.jpg

Note: In order for your computer to send out an email when you loose power, your Modem and Router also have to be on battery backup.

23124835366_1d8532c45e_o.png

 

Version 1.0 :

First Release

Version 1.1

1) New UI. Bound to the system tray.
2) Dynamic battery meter with AC status. Timer based updates in addition to PowerModeChanged hander.
3) Threaded email notification.
4) Minor bug fixes.

Simplezz also wishes to give the source code away for free.

Power Notifier 1.1

https://dl.dropboxusercontent.com/u/59745187/PowerNotifier-App.7z

Power Notifier 1.1 + Source Code

https://dl.dropboxusercontent.com/u/59745187/PowerNotifier-Source.zip

Edited by warwagon
  • Like 2

 

Yes, if it stays off for a long time that could be useful. Actually I like your solution to. That helps me check to see if my internet went down :D

Hmm.. just checked it out and after a trial .. pingdom looks expensive.

Edited by warwagon

So we have a new version coming soon with we collaborated a brand new UI. I have a sample of the UI below. There are some bugs, which is why i'm not posting the new version just yet. I hope you guys like the new UI.

22966903930_35fe827387_o.png

 

Doesn't most ups software already do this?  I can setup all kinds of notifications, email, xmpp, sms, etc..  I get an email and text message when all kinds of things happen via my ups, not just power on or off.  Can setup when alerts go out, etc.. so you don't get a text message at 2 in the morning if you don't want too.

 

 

Doesn't most ups software already do this?  I can setup all kinds of notifications, email, xmpp, sms, etc..  I get an email and text message when all kinds of things happen via my ups, not just power on or off.  Can setup when alerts go out, etc.. so you don't get a text message at 2 in the morning if you don't want too.

 

The software that came with my cyberpower had notifications, sounds and such but no email. They did support email via their free business UPS software. but it was 150 megs and was WAY more than I needed. All I wanted was Email notifications. Plus by using [email protected] I can have the application send me a text too.

I have a cyberpower ups, 2 of them actually...  And yes the business software has always had email.. So what if it was 3GB??

You do understand that download has the agent, the client and server so you can monitor all your upses, or just have a machine listen for the server or agent send it a shutdown command, etc. if a different ups goes on battery and the profile says to shutdown, etc. etc..  Your just using the built in windows tools that report on a ups up or down.. 

Just seems kind of pointless to me, since why would I not run the software that came with my ups, that has alerting features already anyway.

Does your email sending support starttls? How are you storing the password for the email server to send the email?  Looks like just plain text??

<setting name="smtp_pass" serializeAs="String">
                <value />

 

 

I have a cyberpower ups, 2 of them actually...  And yes the business software has always had email.. So what if it was 3GB??

Sometimes a no bloat single purpose solution is superior to a bloated jack of all trades master of none. I can't comment on the UPS software as I've never used it, but if it's 3GB in size, that seems overkill for a simple email notifier.

Just seems kind of pointless to me, since why would I not run the software that came with my ups, that has alerting features already anyway.

You're entitled to your opinion. It's a very simple and lightweight app, and people are free to customise it for their own purposes. Personally, I like to be able to inspect an app's source code rather than deal with a blackbox that's potentially doing all kinds of things in the background.

Does your email sending support starttls? How are you storing the password for the email server to send the email?

It uses SSL by default:

private void sendNotification() {
    string line     = getLineStatus();
    string battery  = getBattery();
    log.WriteLine("Line Status: {0}, Battery Left {1}", line, battery);

    try {
        SmtpClient client   = new SmtpClient(Settings.Default.smtp_server, Convert.ToInt32(Settings.Default.smtp_port));
        client.Credentials  = new System.Net.NetworkCredential(Settings.Default.smtp_user, Settings.Default.smtp_pass);
        client.EnableSsl    = true;

        client.ServicePoint.MaxIdleTime = 1; // work around for not closing connection

        MailMessage message = new MailMessage(Settings.Default.mail_from, Settings.Default.mail_to);
        message.Subject     = Settings.Default.mail_subject;
        message.Body        = String.Format("{0} ({1})\n{2}: Battery {3}", Environment.MachineName, Environment.OSVersion, line, battery);

        client.Send(message);
        log.WriteLine("Sent notification @ " + DateTime.Now);
    } catch (Exception e) {
        log.WriteLine(e.ToString());
    }
}

But as I said, anyone is free to modify the source code.

Looks like just plain text??
<setting name="smtp_pass" serializeAs="String">
                <value />

Currently yes, but that's not difficult to remedy via sha1/md5 hashing.

  • 1 year later...
  • 4 months later...
  • 2 months later...

Here is an application I created.

Use it at your own risk. Please don't blame me if it breaks your computer or something! :)

 

It will Notify you when you loose power to a laptop and when the power comes back online.

Or you can set it to notify you when a preset percentage is reached.

Can also setup email notification.

 

https://www.dropbox.com/s/4z7kl1bin3ybyyv/PowerNotify.7z?dl=0

 

Hope it helps someone.

 

 

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • They couldn't have done a better job, this is beautiful!
    • Oh, of course not. The real "victims" are the people who snipe kids in the head, have killed more journalist than all the worlds wars combined, do double tap strikes on medical personnel, claim history started on October 7th, have a $700 million dollar annual Hasbara budget and pay influencers $7k a post to spout exactly this kind of propaganda. How dare you question the most moral army in the world. Victimhood belongs to these genocidal freaks alone. Anyone who denies that is literally Hitler. If you're going to support a terrorist state, the least you could do is come up with better talking points.
    • Gears of War: E-Day brings 12-player co-op, smoother traversal mechanics, and more by Pulasthi Ariyasinghe Right as the Xbox Games Showcase came to an end today, The Gears of War developer The Coalition took over to show off its next project: E-Day. This prequel project was announced back in 2024, but now we have a lot more details about its campaign, new gameplay mechanics, and even a release date. The studio says this is the first time it has managed to get the time to build the entire game in a new engine, as it had worked non-stop on new titles for years while porting classic code and assets. With Unreal Engine 5 now powering Gears of War: E-Day, The Coalition says it started completely anew, with all assets, animations, environments, and others being built from scratch. The campaign will take place across three days in the city of Kalona. The story will follow the events through the eyes of Bravo Squad. This is made up of the returning classic duo Marcus and Dom, as well as the new characters Mags Carter and Lucas Reyes. Watch the trailer below to see Marcus in action without his iconic armor and gear, just as the Locust invasion kicks off. The story will draw on classic Gears novels like Aspho Fields as well, with the studio even collaborating with author Karen Traviss. "That continuity is what makes the destruction land," says the studio. "In E-Day, you watch a living city torn apart—homes still lit, meals half-finished—while people abandon their cars and run for cover. Small details—a child’s toy, an uneaten dinner—make the loss real as everyday places collapse under the Locust assault." The movement system is getting a big overhaul here. Players will be able to slide while running, jump across gaps, climb head-height covers, and even crawl on the ground to avoid fire from enemies. As for the returning horde mode, The Coalition teased a new 12-player PvE mode. This will involve three squads of Gears going up against the incoming Locusts in larger city maps than usual. The studio says that it is going to reimagine the classic formula just as co-op games are going through a resurgence. Multiplayer was touched on today too, where Versus is coming back touting four versus four Gears PVP action set across Kalona maps. More details about multiplayer will be revealed later. Open beta weekends are kicking off this August for fans wanting to jump in early too. Gears of War: E-Day is releasing on Xbox Series X|S and PC on October 6 with pre-orders available now. It will also be a part of Xbox Game Pass on day one. Microsoft has confirmed this as an Xbox platform exclusive, as there are no plans to bring it to PlayStation or Switch.
    • Microsoft announces the return of Xbox exclusives with Gears of War and Clockwork Revolution by Pulasthi Ariyasinghe Microsoft had plenty of announcements to make today at the Xbox Games Showcase celebrating 25 years of the gaming brand. Now, under the leadership of the new Xbox CEO Asha Sharma, Xbox games are going back to their original release methods. She appeared in the livestream itself to announce the return of Xbox console exclusives. This means two major upcoming games from first-party studios won't be coming to PlayStation or Nintendo consoles: Gears of War: E-Day from The Coalition and Clockwork Revolution from InExile. Both titles will only be coming out on Xbox Series X|S consoles and Windows PCs, ditching any plans they had for PlayStation. "These are not timed exclusives," confirmed Microsoft. "We’re committed to investing in and growing XBOX both on console and beyond." The company confirmed that any already announced Xbox titles for PlayStation, under previous leadership, will continue to arrive for the rival platform. This means games like the new Halo remake, Forza Horizon 6, Fable, and State of Decay 3 will still be available on PlayStation, either at launch or later. It sounds like any new projects announced by the company will avoid other consoles in the same way. Microsoft first opened the floodgates by bringing titles like Sea of Thieves, Grounded, Hi-Fi Rush, and Pentiment to PlayStation and Nintendo consoles back in 2024. Since then, almost every new game release from Xbox Game Studios has arrived for rival consoles alongside Xbox and PC. This decision follows Sony's plans to ditch its own multiplatform releases too. Outside of multiplatform live service titles, the PlayStation maker is even abandoning its PC porting endeavors that started years ago.
  • Recent Achievements

    • Proficient
      Eric Biran went up a rank
      Proficient
    • Dedicated
      Conjor earned a badge
      Dedicated
    • Week One Done
      Windows Guy earned a badge
      Week One Done
    • Dedicated
      Mark Spruce earned a badge
      Dedicated
    • Collaborator
      conkir earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      479
    2. 2
      PsYcHoKiLLa
      243
    3. 3
      Steven P.
      72
    4. 4
      +Edouard
      66
    5. 5
      FloatingFatMan
      65
  • Tell a friend

    Love Neowin? Tell a friend!