• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

NUT package (2.8.0 and below)

UPS Tools
128
1.2k
4.0m
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    kevindd992002 @kevindd992002
    last edited by Aug 31, 2018, 1:21 AM

    @dennypage

    I also have another random issue. Sometimes, I reveive a notification email that the communication with the UPS is lost even though nothing is really happening with the UPS (no blackouts, power dips, etc.). I don't understand why I receive that but as soon as I go in the GUI, everything is happy. Any ideas?

    1 Reply Last reply Reply Quote 0
    • D
      dennypage
      last edited by dennypage Aug 31, 2018, 2:39 AM Aug 31, 2018, 2:35 AM

      Okay, I tested with the Synology. With DSM 6.2, I was not able to find a way to change the user/password for a remote monitor. Best that I can tell, they've moved all the stuff inside a service library. 😞

      So, this leaves us with a problem. The Synology is hard coded to the name "ups", user "monuser", and password "secret". The pfSense NUT package also uses the user "monuser" for the local monitor. Since upsd will ignore the second occurrence of monuser in the upsd.users file, there is no way to reconcile the current pfSense package and the Synology.

      In order to make this work again, a change to the pfSense package is required. I have created a PR that will address this. You can track the PR here.

      After installing the new version of the NUT package (2.7.4_7), you should follow the instructions above to add user "monuser" in the "Additional configuration lines for upsd.users" section.

      BTW, one thing I forgot to mention earlier, your ups must be named "ups" in order to work with the Synology.

      D 1 Reply Last reply Aug 31, 2018, 9:16 PM Reply Quote 0
      • K
        kevindd992002
        last edited by Aug 31, 2018, 3:01 AM

        Ok, that's great :) I'll wait for this PR to be merged to master and will test again. Thanks for the quick support.

        D 1 Reply Last reply Aug 31, 2018, 4:19 AM Reply Quote 0
        • D
          dennypage @kevindd992002
          last edited by Aug 31, 2018, 4:19 AM

          @kevindd992002 said in NUT package:

          Ok, that's great :) I'll wait for this PR to be merged to master and will test again. Thanks for the quick support.

          No problem

          K 1 Reply Last reply Aug 31, 2018, 4:20 AM Reply Quote 0
          • K
            kevindd992002 @dennypage
            last edited by Aug 31, 2018, 4:20 AM

            @dennypage

            Oh btw, do you have any thoughts on the random disconnection issues I'm experiencing? It looks like it is related to the USB drivers or something.

            D 1 Reply Last reply Aug 31, 2018, 9:21 PM Reply Quote 0
            • D
              dennypage @dennypage
              last edited by Aug 31, 2018, 9:16 PM

              @dennypage said in NUT package:

              In order to make this work again, a change to the pfSense package is required. I have created a PR that will address this. You can track the PR here.

              Renato was super fast in pulling the PR in. Thanks Renato!!!

              Don't forget that your ups must be named "ups" for remote access by the Synology to work.

              K 1 Reply Last reply Sep 1, 2018, 12:43 AM Reply Quote 0
              • D
                dennypage @kevindd992002
                last edited by Aug 31, 2018, 9:21 PM

                @kevindd992002 said in NUT package:

                @dennypage

                Oh btw, do you have any thoughts on the random disconnection issues I'm experiencing? It looks like it is related to the USB drivers or something.

                Usually this is associated with the bridge chip. Things that I would recommend to try:

                • Use a high quality cable to the UPS
                • Try a different USB port on the host (particularly USB3 vs USB2)
                • If you have a hub involved, try removing it
                • If you don't have a hub involved, try adding one (hub bridge chips are usually different than host bridge chips)

                Also, have a look in the system log to see of there are any USB messages concerning the disconnect/reconnect.

                K 1 Reply Last reply Sep 1, 2018, 12:46 AM Reply Quote 0
                • K
                  kevindd992002 @dennypage
                  last edited by Sep 1, 2018, 12:43 AM

                  @dennypage

                  Wow, that was real fast! When a PR gets merged to master, does pfsense automatically upgrade the package? And yes, I already renamed my UPS to "ups", thanks for the tip!

                  D 1 Reply Last reply Sep 1, 2018, 4:16 AM Reply Quote 0
                  • K
                    kevindd992002 @dennypage
                    last edited by Sep 1, 2018, 12:46 AM

                    @dennypage

                    I'm using the supplied cable from APC and I believe it is high quality. I use an PCEngines APU2C4 board for my pfsense box which only has two built-in USB3 external ports and tried both of them already. No hub involved but yeah I can try.

                    Yeah, I might dig into the logs and correlate with the timestamp of the notification email.

                    FWIW, I have the same setup in another house (same UPS, pfsense box, and cable) and never received a communication error with that.

                    D 1 Reply Last reply Sep 1, 2018, 4:38 AM Reply Quote 0
                    • D
                      dennypage @kevindd992002
                      last edited by Sep 1, 2018, 4:16 AM

                      @kevindd992002 said in NUT package:

                      @dennypage

                      Wow, that was real fast! When a PR gets merged to master, does pfsense automatically upgrade the package? And yes, I already renamed my UPS to "ups", thanks for the tip!

                      It's not normally this fast. Renato is a great guy, trying to help us out.

                      Anyway, I expect that the updated package is available to you. It was already available in the factory package repo when I posted earlier.

                      You have to explicitly upgrade the package. See System / Package Manager / Installed Packages.

                      K 1 Reply Last reply Sep 3, 2018, 12:41 PM Reply Quote 0
                      • D
                        dennypage @kevindd992002
                        last edited by Sep 1, 2018, 4:38 AM

                        @kevindd992002 said in NUT package:

                        @dennypage

                        I'm using the supplied cable from APC and I believe it is high quality. I use an PCEngines APU2C4 board for my pfsense box which only has two built-in USB3 external ports and tried both of them already. No hub involved but yeah I can try.

                        Yeah, I might dig into the logs and correlate with the timestamp of the notification email.

                        FWIW, I have the same setup in another house (same UPS, pfsense box, and cable) and never received a communication error with that.

                        Definitely worth looking at the logs for anything about the comm error. FWIW, I've had generally good experience with the APU2, but haven't used a UPS with it. Of course, it's possible it's a flakey cable or UPS unit.

                        K 1 Reply Last reply Sep 3, 2018, 12:43 PM Reply Quote 0
                        • K
                          kevindd992002 @dennypage
                          last edited by Sep 3, 2018, 12:41 PM

                          @dennypage

                          Yeah, I got it to work now :) As for WinNUT, do you have any epxerience with it? Is there a GUI version that I can use for my Windows machines?

                          1 Reply Last reply Reply Quote 0
                          • K
                            kevindd992002 @dennypage
                            last edited by Sep 3, 2018, 12:43 PM

                            @dennypage

                            Well, it could be also a conflict with apcupsd as I have it installed in this box as well. I just removed it and let's see if that solves the issue.

                            1 Reply Last reply Reply Quote 0
                            • K
                              kevindd992002 @dennypage
                              last edited by Sep 3, 2018, 2:00 PM

                              @dennypage said in NUT package:

                              @kevindd992002 said in NUT package:

                              @dennypage

                              1. I installed apcupsd and noticed some discrepancy with NUT. I'm not sure if this is a bug regarding the BATTDATE (apcupsd) and battery.date (NUT) but BATTDATE shows the correct date of 2016/05/11. While NUT shows the battery.date as 2001/09/25 which doesn't make sense. Any ideas?

                              2. Also, is the APCUPSD-UPS drive client of NUT the "remote apcupsd" connection method that @Grimson is referring to?

                              3. Is there a guide for NUT that I can read?

                              4. With NUT, can you set pfsense and other servers in the network to turn off when the battery charge hits 70%?

                              1. The pfSense NUT package reports what the NUT upsc command returns (without interpretation). Either the NUT driver that supports the UPS doesn't handle the string correctly, or apcupsd caches the battery change date in the local file system. I would consider the caching to be highly unlikely, but it's possible. Either way, the best place to enquire would be the NUT mailing lists. You can find information here.

                              2. Yes.

                              3. Yes, the NUT support site has a user guide and manuals.

                              4. Yes, local and remote shutdown is what NUT does for a living. Information on remote access in the second post of this thread. Plenty of discussion about controlling shutdown percentages earlier in this thread. Look for things like this:

                              ignorelb
                              override.battery.charge.low = 50
                              override.battery.runtime.low = 60
                              

                              See the 'ignorelb' section in the ups.conf manual for details on this.

                              I take it that you just enter these arguments in the "extra driver arguments" section and you're all set. Are these globally applicable though, meaning the same override settings will apply for the master and slaves?

                              Also, do I need to set both or just the percentage? What's a good value if I aim to "preserve" battery life? Or is it generally recommended to run the UPS (when mains are cut) until the battery is depleted so that you actually take advantage of the the full capacity of the battery?

                              D 1 Reply Last reply Sep 3, 2018, 2:52 PM Reply Quote 0
                              • D
                                dennypage @kevindd992002
                                last edited by Sep 3, 2018, 2:52 PM

                                @kevindd992002

                                Yes, the slaves follow the master. The master sends the slaves a shutdown order, and then waits for them all to disconnect. Once the slaves have disconnected, the master shuts down.

                                Yes, the battery overrides go in the Extra Arguments to driver section. One or both is up to you. If you are running a Synology as a slave, I would certainly set the runtime.low a bit higher to ensure that the Synology has sufficient time to shutdown. I believe I'm using 300 on mine.

                                As to charge.low, that's personal preference. The more times you discharge a lead acid battery the shorter its life, but that's why you have a UPS in the first place isn't it? The trade off between surviving an outage and battery health is a personal choice. Note that even if you baby the battery, you're still going to have to replace it every few years.

                                K 1 Reply Last reply Sep 3, 2018, 2:59 PM Reply Quote 0
                                • K
                                  kevindd992002 @dennypage
                                  last edited by Sep 3, 2018, 2:59 PM

                                  @dennypage

                                  That's what I thought.

                                  So if I set both overrides, the master will send a shutdown order whichever between the two thresholds it hits first, correct? And I believe you also have to set the "warning" override to be higher than the "low" override?

                                  Yes, that's what I thought but it's just that in our place, whenever a blackout occurs, it's a long one. So keeping it in battery mode until depleted is not achieving anything. When a blackout occurs, no one will ever stream off of the NAS anyway because all streaming devices are forcefully turned off by the blackout :) So might as well conserve battery charge (hence savings a bit of its life more), if you know what I mean. So yeah, I guess it really just depends on the use case.

                                  D 1 Reply Last reply Sep 3, 2018, 3:04 PM Reply Quote 0
                                  • D
                                    dennypage @kevindd992002
                                    last edited by Sep 3, 2018, 3:04 PM

                                    @kevindd992002 said in NUT package:

                                    @dennypage
                                    So if I set both overrides, the master will send a shutdown order whichever between the two thresholds it hits first, correct? And I believe you also have to set the "warning" override to be higher than the "low" override?

                                    Whichever comes first is correct. Warning is essentially just a syslog entry.

                                    K 1 Reply Last reply Sep 3, 2018, 3:07 PM Reply Quote 0
                                    • K
                                      kevindd992002 @dennypage
                                      last edited by Sep 3, 2018, 3:07 PM

                                      @dennypage

                                      Gotcha. Is the battery.runtime.low threshold the time left in the battery's charge or the total time the UPS is running without connection to the mains?

                                      D 1 Reply Last reply Sep 3, 2018, 3:23 PM Reply Quote 0
                                      • D
                                        dennypage @kevindd992002
                                        last edited by Sep 3, 2018, 3:23 PM

                                        @kevindd992002

                                        They are both "low" conditions. The NUT documentation describes this.

                                        K 1 Reply Last reply Sep 3, 2018, 4:40 PM Reply Quote 0
                                        • K
                                          kevindd992002 @dennypage
                                          last edited by Sep 3, 2018, 4:40 PM

                                          @dennypage

                                          Ok. I'm testing NUT now with only pfsense running as the master and no slaves. I'm noticing a very strange behavior that totally doesn't make sense to me. So here's what I did (in chronological order):

                                          1. Set override.battery.charge.warning to 55 and override.battery.charge.low to 50.
                                          2. I started with a full charge battery and unplugged the UPS from the mains.
                                          3. The UPS status in the pfsense picked up the change and says Online, discharging.
                                          4. As soon as the battery charge hits 50, the state changed to FSD which is what is expected. So far so good.
                                          5. Since no slaves are present, the pfsense box turned off itself pretty quick.
                                          6. The UPS waited for a few more seconds before it finally cut off the load power to the rest of its ports. All good.
                                          7. Now I plug the mains back into the UPS. As soon as I do this, the UPS turns on BUT stays at battery mode (so discharging).
                                          8. It supplies power back to all ports and pfsense and the other devices started booting.
                                          9. Then the UPS itself detects that the battery charge is still below 50% (of course, because it needs time to charge and it is even at a discharging state now) and then a few seconds later the unit turns off again. It seems that the killpower command given to it by the pfsense is still being enforced even though the mains is already connected and providing power.
                                          10. Then it turns on by itself again. And this vicious cycle continues over and over until I disconnected the USB serial connection in the back of the UPS.

                                          What have I done wrong here? Why doesn't the UPS detect that the mains power is already back when the USB serial connection is plugged in. It seems to me that the command given by the pfsense NUT package is messing the behavior of the UPS.

                                          D 1 Reply Last reply Sep 3, 2018, 5:06 PM Reply Quote 0
                                          379 out of 1230
                                          • First post
                                            379/1230
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.