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

    • Firefox, and Vivaldi for the rare instances I need a Chrome based browser for a particular site.
    • I named Hitler because he is the de facto anti-semite. But you don't have to hate Jews to be a genocidal maniac. In fact, these days, so called semites are the ones acting in ways that would make Hitler proud.
    • 3DP Chip 26.05 by Razvan Serea 3DP Chip is a standalone, no-install portable tool that scans your computer’s hardware and automatically detects the latest drivers available for your specific configuration and external devices. It provides a clear list of drivers that need updates, locates the correct downloads, and helps you upgrade them easily. 3DP Chip will automatically detect and display the information on your CPU, motherboard, video card and sound card installed on your PC. You can also choose to copy these information into your clipboard with one click for later use (such as posting in a forum). Also, if you're upgrading your operating system or just need to reinstall Windows, 3DP Chip can backup all the drivers on your PC or laptop. 3DP Chip backup and reinstall features can save you hours of searching for and installing individual device drivers. 3DP Chip most popular drivers include: audio and sound drivers video drivers printer and scanner drivers digital camera drivers network drivers webcam drivers keyboard and mouse drivers 3DP Chip v26.05 changelog: Driver date/version information has been added or updated AMD motherboard chipset v8.03.25.247 AMD motherboard chipset v8.05.04.516 Newly added product or support has been enhanced AMD Radeon Graphics AMD Radeon 780M Graphics AMD Radeon 840M Graphics AMD Radeon 860M Graphics AMD Radeon 880M Graphics AMD Radeon RX 9070 XT AMD Radeon Pro W7500M NVIDIA GeForce RTX 3050 6GB Laptop GPU NVIDIA GeForce RTX 4050 Laptop GPU NVIDIA GeForce RTX 5050 Laptop GPU NVIDIA GeForce RTX 5050 Laptop GPU NVIDIA GeForce RTX 5060 NVIDIA GeForce RTX 5070 Laptop GPU NVIDIA GeForce RTX 5070 Ti Laptop GPU NVIDIA RTX Pro 500 Blackwell Generation Laptop GPU NVIDIA RTX Pro 1000 Blackwell Generation Laptop GPU NVIDIA RTX Pro 2000 Blackwell Generation Laptop GPU Download: 3DP Chip 26.05 | 7.2 MB (Freeware) Links: 3DP Chip Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Apple reluctantly forces strict new age checks on Texas users starting today by Paul Hill Apple will begin enforcing the Texas Age Assurance Law (SB 2420) following a recent court ruling that lifted an injunction on SB 2420. Starting June 4 (today), Apple will enforce strict age-verification and parental-consent rules for new Apple accounts created in Texas. This move will affect children under 18 who go to download apps or attempt to make in-app purchases. Apple previously expressed privacy concerns related to this law, but compliance is now mandatory for the company, nevertheless. Apple will use several APIs to follow the law. Principally, the Declared Age Range API will fetch the specific user age bracket (Under 13, 13-15, 16-17, or 18+) and a verification method. The Significant Change API (PermissionKit) will trigger a system dialog for parental consent if an app gets a major update or an age-rating shift. There is also a new property type in StoreKit that allows developers to automatically check when their app’s age rating has changed on a user’s device and then use the Significant Change API to request parental consent. Finally, App Store Server Notifications can be configured to tell developers when a parent revokes consent, blocking app launches. To ensure they are ready for these changes, developers must immediately use Apple’s sandbox testing environment to validate these APIs in their apps. For any developers out there finding this to be inconvenient, get used to it. Other regions, such as Utah, Louisiana, and Brazil, are looking at, or have implemented, similar rules.
  • Recent Achievements

    • One Month Later
      nothanks earned a badge
      One Month Later
    • One Month Later
      B2Proxy earned a badge
      One Month Later
    • One Year In
      MadMung0 earned a badge
      One Year In
    • Week One Done
      jefred earned a badge
      Week One Done
    • Apprentice
      JoeyNeo went up a rank
      Apprentice
  • Popular Contributors

    1. 1
      +primortal
      476
    2. 2
      PsYcHoKiLLa
      229
    3. 3
      Skyfrog
      72
    4. 4
      FloatingFatMan
      62
    5. 5
      Nick H.
      53
  • Tell a friend

    Love Neowin? Tell a friend!