Announcement

Collapse
No announcement yet.

Basic and/or Creative Events created with APCUPSD plugin

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

  • Basic and/or Creative Events created with APCUPSD plugin

    What are some Basic and/or Creative Events created with this plugin?
    Would appreciate your thoughts
    Tom
    baby steps...starting again with HS3
    HS3Pro: Z-NET & 80 Z wave Devices,
    HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
    Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
    In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
    System: XP on Fanless Mini-ITX w/ SSD

  • #2
    My basic events include notification that power was lost and shutdown of some devices after while (like touch screens and eventually hs3 pc)

    Comment


    • #3
      So I installed plugin, and apcupsd a couple of months back and didn't set up any events to deal with power outage such as shut down hs or computer. The remote hs computer is set to reboot, in bios, on power return.

      A few days ago during a long power outage(according to neighbors), the remote hs computer shut down and didn't come back online. It has never failed to come back online in the last 5 years I've used it without a battery back. But now after using a battery back up and apcupsd software it seems to have shut down windows. The reason I say it seems is because I'm not really sure. I'm not currently there so can't bring it back online to look into this.

      Questions:
      Is this supposed to happen?
      How do you prevent this in the future?

      thanks in advance
      Tom
      baby steps...starting again with HS3
      HS3Pro: Z-NET & 80 Z wave Devices,
      HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
      Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
      In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
      System: XP on Fanless Mini-ITX w/ SSD

      Comment


      • #4
        The plugin does not control shutdowns or reboots, it monitors reports status from apcupsd and fires related hs3 events if configured. Spearate apcupsd can shutdown the pc and depending on your bios setup the pc will restart when power is restored. This is at least how it works in my setup/my pcs (running hs3 or not). I can double check this next weekend by simulating a shutdown on several computers.


        Sent from my iPad using Tapatalk

        Comment


        • #5
          Thank you.
          Do you know how do you keep apcupsd from shutting down the computer?

          Or I was thinking may be I should have the hs pc plugged into the "Controlled by Master" or "Battery back up only". Maybe this way the apcupsd and pluign can help gracefully shut down hs, but the power to the non-Master outlets would be killed before apcupsd could shut down windows?


          APC BR1500G
          Tom
          baby steps...starting again with HS3
          HS3Pro: Z-NET & 80 Z wave Devices,
          HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
          Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
          In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
          System: XP on Fanless Mini-ITX w/ SSD

          Comment


          • #6
            I think apcupsd runs a script to shutdown the pc and you could customize it. I am might be off, check the apcupsd documentation.


            Sent from my iPad using Tapatalk

            Comment


            • #7
              Yes, I did see that in the documentation, but the documentation isn't clear, at least to me, if that is the default setting( to shut down the pc).

              I know this isn't you're plugin issue, but appreciate your help as I have limited knowledge with battery back ups. The other problem is that it at my vacation home several states away. If I get someone into the house, I'd like to be able to give them some simple instructions so I can get the hs pc back online and avoid this in the future.

              Two things I can think of are:
              1.
              I was wondering if I plug the hs pc into "Controlled by Master" or "Battery back up only" wouldn't that kill the power to the pc before the battery was fully drained, therefore averting the shutdown process of the apcupsd script? The apcupsd software would assume the pc is plugged into the "Master" outlet, therefore shutdown that outlet last?

              2.
              The only other quick solution I can tell the visitor to my home is to unplug the usb cable between the pc and battery backup.
              Tom
              baby steps...starting again with HS3
              HS3Pro: Z-NET & 80 Z wave Devices,
              HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
              Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
              In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
              System: XP on Fanless Mini-ITX w/ SSD

              Comment


              • #8
                Hi Tom,

                The outlets "Controlled by Master" will shut off if whatever is plugged into the Master outlet shuts off. They should turn on whenever the device in the Master outlet is turned on as well. If you have other peripherals that you want power-cycled if you restart the HS computer, then that might be one use for them, otherwise, I would not plug anything in the "Controlled by Master" outlets and just use the Battery Backup outlets.

                I use apcupsd as well and I don't believe it shuts down the system by default, but I could be wrong about that. We haven't had a major power failure here for 4+ years, so I've never really "experienced" the functionality. The problem with a controlled shut down is that the system then typically won't restart automatically when power is restored. Therefore the best course of action is to have events shut down the applications, but leave the system running till it runs out of power.

                Cheers
                Al
                HS 3.0.0.548: 1976 Devices 1156 Events
                Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                Comment


                • #9
                  Thanks Al,
                  Yeah, just my luck we have long power outage the week after I left. The in the last 2 years there has never been power outages that lasted more than a few mins. I didn't have any events set up and only installed apcupsd with default setting. And the only things plugged into the apc was the hs mini itx and z-net. So I was surprised to see the hs pc shut down completely.
                  My other pcs and dvr in the house, not connected to the battery back up, rebooted and came back online.
                  So I'm not sure how this happened. I won't be at the house till the summer so for now, I guess I'll have the visitor disable apc usb cable, then I'll uninstall apcupsd, and disable plugin. This will give at least always bring my hs pc back online.

                  Originally posted by sparkman View Post
                  Hi Tom,
                  The outlets "Controlled by Master" will shut off if whatever is plugged into the Master outlet shuts off. They should turn on whenever the device in the Master outlet is turned on as well. If you have other peripherals that you want power-cycled if you restart the HS computer, then that might be one use for them, otherwise, I would not plug anything in the "Controlled by Master" outlets and just use the Battery Backup outlets.

                  I use apcupsd as well and I don't believe it shuts down the system by default, but I could be wrong about that. We haven't had a major power failure here for 4+ years, so I've never really "experienced" the functionality. The problem with a controlled shut down is that the system then typically won't restart automatically when power is restored. Therefore the best course of action is to have events shut down the applications, but leave the system running till it runs out of power.

                  Cheers
                  Al
                  Tom
                  baby steps...starting again with HS3
                  HS3Pro: Z-NET & 80 Z wave Devices,
                  HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                  Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                  In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                  System: XP on Fanless Mini-ITX w/ SSD

                  Comment


                  • #10
                    Originally posted by sparkman View Post
                    Hi Tom,

                    ... I don't believe it shuts down the system by default, ...
                    I think it does.

                    Configuration file is located at <root>\apcupsd\etc\apcupsd\apcupsd.conf

                    See parameters:
                    # Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
                    # the first that occurs will cause the initation of a shutdown.
                    #

                    # If during a power failure, the remaining battery percentage
                    # (as reported by the UPS) is below or equal to BATTERYLEVEL,
                    # apcupsd will initiate a system shutdown.
                    BATTERYLEVEL 5

                    # If during a power failure, the remaining runtime in minutes
                    # (as calculated internally by the UPS) is below or equal to MINUTES,
                    # apcupsd, will initiate a system shutdown.
                    MINUTES 3

                    APCUPSD installs the necessary windows batch files and binaries to perform a shutdown. apccontrol.bat controls what scripts / binaries are called for each event.

                    Comment


                    • #11
                      Originally posted by lveatch View Post
                      I think it does.

                      Configuration file is located at <root>\apcupsd\etc\apcupsd\apcupsd.conf

                      See parameters:
                      # Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
                      # the first that occurs will cause the initation of a shutdown.
                      #

                      # If during a power failure, the remaining battery percentage
                      # (as reported by the UPS) is below or equal to BATTERYLEVEL,
                      # apcupsd will initiate a system shutdown.
                      BATTERYLEVEL 5

                      # If during a power failure, the remaining runtime in minutes
                      # (as calculated internally by the UPS) is below or equal to MINUTES,
                      # apcupsd, will initiate a system shutdown.
                      MINUTES 3

                      APCUPSD installs the necessary windows batch files and binaries to perform a shutdown. apccontrol.bat controls what scripts / binaries are called for each event.
                      Thanks Len, just confirmed that on my system too. Do you know if those values can be set to 0 to disable the auto-shutdown, or is there a better way to disable that?

                      Thanks
                      Al
                      HS 3.0.0.548: 1976 Devices 1156 Events
                      Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                      Comment


                      • #12
                        Sorry, but I do not know if 0 will disable. I would expect apcupsd to start the shutdown process once 0 minutes/battery % has been reached, causing a hard crash of your computer. 0 minutes / battery % is based on apcupsd's estimate of those values.

                        If you really wanted to disable the shutdown and allow a hard crash, then make a backup of apccontrol.bat and comment the shutdown command. I have not tested this.

                        Code:
                        :doshutdown
                        rem
                        rem  If you want to try to power down your UPS, uncomment
                        rem    out the following lines, but be warned that if the
                        rem    following shutdown -h now doesn't work, you may find
                        rem    the power being shut off to a running computer :-(
                        rem  Also note, we do this in the doshutdown case, because
                        rem    there is no way to get control when the machine is
                        rem    shutdown to call this script with --killpower. As
                        rem    a consequence, we do both killpower and shutdown
                        rem    here.
                        rem  Note that Win32 lacks a portable way to delay for a
                        rem    given time, so we use the trick of pinging a
                        rem    non-existent IP address with a given timeout.
                        rem
                        rem   %APCUPSD% /kill
                        rem   ping -n 1 -w 5000 10.255.255.254 > NUL
                        rem   %POPUP% "Doing %APCUPSD% --killpower"
                        rem   %APCUPSD% --killpower
                        rem   ping -n 1 -w 12000 10.255.255.254 > NUL
                        rem
                           %SHUTDOWN% -h now    <<<<<--------- comment this line
                           GOTO :done

                        Comment


                        • #13
                          Thanks Len, just double-checked the manual and both those settings can be set to -1 to disable them.

                          Cheers
                          Al
                          HS 3.0.0.548: 1976 Devices 1156 Events
                          Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                          Comment


                          • #14
                            Very interesting! This prompted some testing.

                            My setup is a BE550G UPS powering a Hometroller S6, a Cable modem, and a wall-wart that Y's to a router and a network switch. A Z-net is powered off the S6 thru one of the USB ports. Default apsuspd.conf.

                            I pulled the plug and monitored the APCUPSD status. When fully charged, it says its load percentage is 12% and estimated run time is 61 minutes. At the 71 minute mark, the status reported 5% battery and 3 minutes remaining (coincidence that both reached at same time?). Hometroller shut down at this point. Seventeen minutes later, the UPS finally gave up the ghost.

                            Of course had power been restored during this window the Hometroller would never come back!

                            I'd wager that the OP's window would be longer; he has a larger capacity UPS and essentialy no load once the computer shuts down.

                            Comment


                            • #15
                              Guys, thank you for this insight and the discussion. This really helps. I've also emailed the apcupsd user list on sourceforge and waiting to hear back. I really didn't expect the ups to add another level of complexity and point of failure in my remote setup. But to be fair to apcupsd, the author does highly recommend testing the system with a simulated power outage.

                              Does anyone know for sure or has anyone tested these setting with BATTERYLEVEL and MINUTES to -1 would avert the system shutdown?
                              Tom
                              baby steps...starting again with HS3
                              HS3Pro: Z-NET & 80 Z wave Devices,
                              HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                              Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                              In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                              System: XP on Fanless Mini-ITX w/ SSD

                              Comment

                              Working...
                              X