Announcement

Collapse
No announcement yet.

Is there a way for HS to know the power has gone out with a UPS connected?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there a way for HS to know the power has gone out with a UPS connected?

    I just bought a APC 500VA UPS (ES Series) and have connected it to my PC with the USB cable. It works great and I am just using the built features in XP Pro to shutdown the PC if the battery level gets to 20%.

    My question is, is there anyway to notify HS that the power has gone out and notify it when the power is back on?

    I read some threads where they are looking at the registry keys or something, but I really did not see anything concrete. I also read somewhere about a plugin to do it.

    Does anyone know if something exists for this?

    I would like to be able to send an email if the power goes out and then send another email when the power is restored (if the PC has not been shut off already)

    TIA
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    #2
    I use my Ocelot for this...

    I have a 12vdc wall wart that is connected to a non-ups plug, it runs a standard 12dc relay with the contacts run to my Ocelot.

    When the power is removed the contacts open and Ocelot detects the power has failed. I thne have an event run on that devices status change, it updates a second device to OFFLINE and off. I can then run a multiple of other scripts based upon that status.
    (my Ocelot and HS computer is on a UPS)

    I then use scripts to email based upon this device. I then detect if the system power was offline when stopped and then send out a page in the startup.txt file. For this to work I had to create a second device called 'System Power' I then set it using events from ONLINE (power on) to OFFLINE (power off) that way on restart it will be OFFLINE as the event has not yet had a chance to fire.

    Here is the section from my startup.txt
    <pre class="ip-ubbcode-code-pre">
    'Check power Failure stuff
    if instr(hs.devicestring("u2"),"ONLINE") = 0 then
    hs.setdevicestatus "u2",2
    hs.setdevicestring "u2","ONLINE"
    hs.SendeMail "9165551212@messaging.sprintpcs.com","TheComputer@comcast.ne t","HomeSeer", "System restarted successfully after power failure."
    end if

    </pre>

    ... sorry for the rambling but I am a bit sleep deprived.

    Comment


      #3
      APC has chosen not to publish the protocol used to communicate with their UPS's over serial or USB. Only their server (SmartUPS) and datacenter UPS's can be interfaced to the network via SNMP. Glenn Todd (Stargate plug-in maintainer, and also author of other plug-ins) tried to find the protocol, tried to get it from APC, and got nowhere, so gave up on writing an APC plug-in. There are other consumer UPS's that do have published interfaces.

      The best you might be able to do is email status on a power failure to yourself and monitor the email from HS. I did get that much working with my 600.

      What I did (after buying a 350 and a 600 and discovering that I couldn't hook them into HS) was to purchase a refurbished SmartUPS 1200 and a refurbished SNMP adapter. I have not had the time to get the SNMP adapter working yet, but with that I should be able to poll status, and receive SNMP alerts from the UPS.

      Since you already have the UPS, it might be simpler to rig something that monitors independent of the UPS.

      Bill

      Comment


        #4
        I do the same thing as sbessel, except I do it with Marrick lynxport relay board. It is the simplest solution.

        Comment


          #5
          Bob,
          You want a really easy way to detect if the power is out get this power out sensor.
          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

          Comment


            #6
            My wife asked me yesterday if HS could tell us when the power had gone out. We lost power at our weekend home Tuesday. HS sends me a morning report and I didn't get an email yesterday morning. I tried calling the house, but HS Phone didn't answer and the old X-10 phone module I keep plugged in for doing emergency re-boots didn't pick up other. So I knew power was out. It had been out for 12 hours at this point. So I need to come up with a quicker notification approach too.

            My small UPS doesn't have an interface and I will go the relay route. However, I also figured out that I need to get my cable modem, router and switch on a UPS. I don't have a dial-up ISP anymore. I need to keep HS plus my network alive long enough to get messages out to me.

            Barry T

            Comment


              #7
              BarryT,
              After some thought I was wondering how a relay will work. If it is attached to a powerflash module doesn't the power have to be on for X10 signals to be seen?
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #8
                I too use a cheap 120V relay where the output connects to an Ocelot input, but recently I employed another solution that may interest you.

                I added an appliance of sorts for the summer that is plugged into an outlet in my basement. The outlet is currently GFCI protected. Due to circumstances that are not worth explaining, I fear that the GFCI may trip once in a while, and so I wanted to know about it.

                Since the system is temporary, I did not care to go through the work of plugging in another relay and running a wire back to the nearest SECU16 for my Ocelot system.

                Thus, having many X-10 devices lying around unused in a cabinet, I recalled that I had a few two-way modules.

                I plugged in a module, then wrote a couple of events. In my case I do not need to know very immediately that the power is out, so my timing is based upon hours instead of minutes, but one event sends out a status poll using a single script command (polldevice). It also (15 seconds later so as not to conflict with the poll) sends out an ON command. (This way if the device was OFF for some reason, I will get notification but it will get corrected too.) This event runs every hour. Another event runs every two hours that has a condition that the two-way device is Unknown or Off. (One condition unknown, another condition Off, they are OR'd together.) If either of these conditions is met, then an email gets sent to my cell phone.

                I am sure you can be creative in developing your own scripts or events, but just thought I would throw out the possibility of a two-way device/module as a power detector - it cannot respond to the poll if it has no power, and so HomeSeer would change the status to Unknown after it failed to get a response.

                I also check for OFF just for the situation where somebody might happen to do an "All Units Off" on that house code.
                Regards,

                Rick Tinker (a.k.a. "Tink")

                Comment


                  #9
                  Since you are running XP pro you can use another method. This is the method I used before I put in my Ocelot relay. Just use the Low Battery alarm settings, in the Alarms tab of your power settings, to run a program, then use the HomeSeer command line program (I forget where I got it) to trigger an event,
                  Here is the command line I used:
                  <pre class="ip-ubbcode-code-pre">
                  "C:\Program Files\HomeSeer\CommandLiine\hsc.exe" -e "Power Failure"
                  </pre>
                  I would run this one when the battery was at 90% - then at 20% I would tell the system to shut down... This worked, it was just more difficult to detect quickly when the power went out, and even harder to tell when it came back on, especially if it came back on before the UPS ran completely out of juice.

                  Comment


                    #10
                    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Rupp:
                    BarryT,
                    After some thought I was wondering how a relay will work. If it is attached to a powerflash module doesn't the power have to be on for X10 signals to be seen? <HR></BLOCKQUOTE>

                    You bet. I am going to create a UPS zone that will include all the components that need to remain powered (at least for a few minutes) if the power fails. But I am not sure about getting the CM11a working behind a UPS. More thinking is required here.

                    bt

                    Comment


                      #11
                      Anybody have a solution for using Scott's idea when you have an APC UPS and PowerChute disables Windows' native power support? (There is no driver for the Windows power for the model of UPS I have either.)
                      Regards,

                      Rick Tinker (a.k.a. "Tink")

                      Comment


                        #12
                        <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Rick Tinker (HomeSeer Tech):
                        Anybody have a solution for using Scott's idea when you have an APC UPS and PowerChute disables Windows' native power support? (There is no driver for the Windows power for the model of UPS I have either.) <HR></BLOCKQUOTE>

                        My UPS is APC, I just never installed PowerChute... I had always had problems with it and didn't see any advantages... Works fine with XP without PowerChute installed.

                        Comment

                        Working...
                        X