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.
    • M
      mike123
      last edited by mike123

      Recently I started getting several emails a minute "UPS myups battery is low". The UPS is a few years old so I replaced the battery and restarted the service.

      I am still getting the error messages even though it shows 100% battery. I'm at a loss to debug this further, I've tried adding

      battery.charge.low: 10
      

      to the ups.conf and restarting but it seems to be getting ignored.

      Here's the output from
      upsc "myups"

      battery.charge: 100.0
      battery.charge.low: 15
      battery.date: 2008-06-25
      battery.runtime: 120.0
      battery.runtime.low: 300
      battery.voltage: 12.7
      battery.voltage.nominal: 12.0
      device.mfr: APC
      device.model: Back-UPS ES 750 
      device.serial: 123456  
      device.type: ups
      driver.name: apcupsd-ups
      driver.parameter.pollinterval: 60
      driver.parameter.port: 10.10.1.1
      driver.parameter.synchronous: no
      driver.version: 2.7.4
      driver.version.internal: 0.04
      input.sensitivity: M
      input.transfer.high: 139.0
      input.transfer.low: 92.0
      input.transfer.reason: No transfers since turnon
      input.voltage: 120.0
      input.voltage.nominal: 120
      ups.date: 2021-11-29
      ups.firmware: 841.I2 .D USB FW:I2
      ups.id: UPS
      ups.load: 14.0
      ups.mfr: APC
      ups.model: Back-UPS ES 750 
      ups.realpower.nominal: 450.0
      ups.serial: 123456  
      ups.status: OL LB
      ups.test.result: NO
      ups.time: 09:07:42
      
      

      Can anyone provide any suggestions as to stopping the multiple email error messages?

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @mike123
        last edited by Gertjan

        @mike123 said in NUT package:

        .... to stopping the multiple email error messages?

        By telling your UPS that the battery has changed.
        Dono how you can do this with NUT, but you could download the APC's MAC or,Windows client app, and use that to 'inform' the UPS that a battery change has occurred.

        Btw : this isn't probably the optimal solution, but this what I have done in the past.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        M 1 Reply Last reply Reply Quote 1
        • M
          mike123 @Gertjan
          last edited by mike123

          @gertjan

          Thanks, problem solved!

          It never occurred to me that the UPS firmware had a battery "best before" date. The APC Powerchute software let me reset the battery date and my battery runtime magically went up from 120 to 1500. I guess it didn't want me to rely on what it thought was a 13 year old battery.

          1 Reply Last reply Reply Quote 0
          • U
            UmbraAtrox
            last edited by UmbraAtrox

            I bought a PowerWalker VFI 1000T it uses the Winpower client on Windows which works fine, but on pfsense it doesn't really.

            66c71168-734c-4a42-a6b9-3af524f82ade-image.png

            I don't know if the upsname is important, but its named PW1000 in Winpower so i used that.

            9c063c0a-f1b7-40c5-9370-a51fb0aac27e-image.png

            6d9627b0-1880-4c53-9b1d-f150c1ef5d36-image.png

            2053e22e-287c-4606-a45d-759f26795487-image.png

            i have tried multiple combinations of restarting, uninstalling and reinstalling the package, different usb Ports which have been suggested for other similar problems. Extra arguments norating, novendor, pollinterval=10. But none of this helped or even changed behaviour.

            Can you help me with this?

            dennypageD GertjanG 2 Replies Last reply Reply Quote 0
            • dennypageD
              dennypage @UmbraAtrox
              last edited by

              @umbraatrox said in NUT package:

              PowerWalker VFI 1000T it uses the Winpower client on Windows which works fine, but on pfsense it doesn't really.

              Here is my list of suggestions...

              • Have you rebooted since first plugging the usb connection in? Some of the USB kernel drivers require that. Do this first.
              • Try the usbhid driver and confirm that it does not work before trying any other driver.
              • Try the nutdrv_qx driver.
              • Try the blazer driver (the one that you have already tried).
              • Some devices create special device names in FreeBSD because they are actually serial emulators. You can generally discover the port by looking through the system log (dmesg).
              • Some of the more boutique drivers may require you to explicitly specify several "optional" parameters, like port, vendor it, product id, sub driver, etc. You have to figure this out by out by trial and error or contacting the vendor.
              • Ask for help on the NUT mailing list.
              1 Reply Last reply Reply Quote 1
              • GertjanG
                Gertjan @UmbraAtrox
                last edited by

                Also cross check the UPS model with this list : https://networkupstools.org/stable-hcl.html and tips / trucks you can find at the NUT support pages.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • G
                  Gooberpatrol66
                  last edited by

                  I tried to enable SSL, and I got this:
                  Dec 12 16:45:58 pfsense upsd[12551]: upsd.conf: invalid directive CERTFILE /etc/ssl/nut_cert/upsd.pem
                  Dec 12 16:45:58 pfsense upsd[12551]: upsd.conf: invalid directive CERTREQUEST REQUIRE
                  Dec 12 16:45:58 pfsense upsd[12551]: upsd.conf: invalid directive DISABLE_WEAK_SSL true
                  I think this means SSL support was not compiled into the package.

                  dennypageD 1 Reply Last reply Reply Quote 1
                  • dennypageD
                    dennypage @Gooberpatrol66
                    last edited by

                    @gooberpatrol66 said in NUT package:

                    I think this means SSL support was not compiled into the package.

                    I believe you are correct, there is no certificate support.

                    1 Reply Last reply Reply Quote 0
                    • W
                      WhiteTiger-IT
                      last edited by

                      I installed the package, connected the USB socket to an APC Back-UPS BX2200MI, in the console I see that it recognizes it, but then in Services/UPS/Status I see:
                      "Failed to retrieve status"

                      dennypageD 1 Reply Last reply Reply Quote 0
                      • dennypageD
                        dennypage @WhiteTiger-IT
                        last edited by

                        @whitetiger-it Generally this is a permissions problem with initial USB install. Addressed by Rebooting or by unplugging and re-plugging the USB.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          WhiteTiger-IT @dennypage
                          last edited by

                          @dennypage
                          Perfect, now it shows.
                          Thank you.

                          How can I now manage the shutdown of pfSense and the PCs-Servers in the network?
                          I should be able to define minutes and load limits, also in the clients installed on the PCs-Servers I should be able to define parameters to synchronize with the NUT package.

                          dennypageD 1 Reply Last reply Reply Quote 0
                          • dennypageD
                            dennypage @WhiteTiger-IT
                            last edited by

                            @whitetiger-it said in NUT package:

                            How can I now manage the shutdown of pfSense and the PCs-Servers in the network?
                            I should be able to define minutes and load limits, also in the clients installed on the PCs-Servers I should be able to define parameters to synchronize with the NUT package.

                            NUT will manage the shutdown for you. Unless you are familiar with NUT itself, and have a specific need to fix something that isn't working, I would recommend sticking with the default NUT parameters.

                            Remote access options are detailed in the second post.

                            1 Reply Last reply Reply Quote 0
                            • whoami TMW
                              whoami TM
                              last edited by whoami TM

                              I have been defeated by my recently acquired Tripplite Smart1500LCD. 😭 I put in the work.... My OCD is not about let me give up until my Amazon return window closes. I've read all 850 some posts of this thread multiple times. I've read everything google has thrown at me regarding NUT and Smart1500LCD. I've read NUT mailing list... Github... Literally everything I can find that's relevant.

                              The problem I'm having is I cant get the UPS to trigger pfSense to shutdown unless I use ignorelb override.battery.charge.low = 20 or override.battery.runtime.low = 300 or I use the upsmon -c fsd command. When those commands initiate a shutdown, pfSense starts shutting down but triggers the UPS to shut down too fast before pfSense has a chance to fully shutdown. Then the UPS powers back up the outlets after about 20-30 seconds no matter if the main is on/off or no matter how much battery the UPS has left. Its as if the UPS isnt giving pfSense any shutdown command. The Smart1500LCD default battery.charge.low is suppose to be 50%. Its basically a dump UPS... Rides all the way to the battery dies. I even ran it down past 0%, after about an hour on 0% it shut down pfSense then started back up again pushing my switch until I turned main back on. I can not get offdelay=60 to work at all.

                              There's a video on YouTube where someone with the same Smart1500LCD UPS got NUT working on debian. I've tried every setting in this thread with no luck. The settings I currently have below are the same settings from the YouTube vid. The video, and NUT mailing list say there is a issue with this UPS constantly disconnecting due to the USB and there is a patch for it that goes in /etc/udev/rules.d but when I look at dmesg I don't have a bunch of disconnects every 10 seconds like they are talking about. I only get a few when NUT starts then none after. Example below.

                              igb0: link state changed to UP
                              igb0.50: link state changed to UP
                              igb0.20: link state changed to UP
                              igb0.40: link state changed to UP
                              igb0.10: link state changed to UP
                              igb0.60: link state changed to UP
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected)
                              uhid0: at uhub1, port 1, addr 3 (disconnected)
                              uhid0: detached
                              igb1: link state changed to UP
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0
                              uhid0 on uhub1
                              uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0
                              tun1: changing name to 'ovpns1'
                              ovpns1: link state changed to UP
                              pflog0: promiscuous mode enabled
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected)
                              uhid0: at uhub1, port 1, addr 3 (disconnected)
                              uhid0: detached
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0
                              uhid0 on uhub1
                              uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected)
                              uhid0: at uhub1, port 1, addr 3 (disconnected)
                              uhid0: detached
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0
                              uhid0 on uhub1
                              uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected)
                              uhid0:
                              at uhub1, port 1, addr 3 (disconnected)
                              uhid0: detached
                              ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0
                              uhid0 on uhub1
                              uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0
                              igb1: promiscuous mode enabled
                              igb0: promiscuous mode enabled
                              igb0.10: promiscuous mode enabled
                              igb0.20: promiscuous mode enabled
                              igb0.40: promiscuous mode enabled
                              igb0.50: promiscuous mode enabled
                              igb0.60: promiscuous mode enabled
                              
                              cat /usr/local/etc/nut/ups.conf
                              
                              pollinterval=1
                              maxretry=3
                              
                              [tripplite]
                              driver=usbhid-ups
                              port=auto
                              vendorid=09ae
                              productid=2012
                              offdelay=60
                              
                              cat /usr/local/etc/nut/upsmon.conf
                              
                              MONITOR tripplite 1 local-monitor 2bf97a0eaa539f360a90 master
                              SHUTDOWNCMD "/sbin/shutdown -p +0"
                              POWERDOWNFLAG /etc/killpower
                              NOTIFYCMD /usr/local/pkg/nut/nut_email.php
                              NOTIFYFLAG ONLINE   SYSLOG+WALL+EXEC
                              NOTIFYFLAG ONBATT   SYSLOG+WALL+EXEC
                              NOTIFYFLAG LOWBATT  SYSLOG+WALL+EXEC
                              NOTIFYFLAG FSD	  SYSLOG+WALL+EXEC
                              NOTIFYFLAG COMMOK   SYSLOG+WALL+EXEC
                              NOTIFYFLAG COMMBAD  SYSLOG+WALL+EXEC
                              NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
                              NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
                              NOTIFYFLAG NOCOMM   SYSLOG+WALL+EXEC
                              NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC
                              
                              
                              RUN_AS_USER root
                              
                              cat /usr/local/etc/nut/upsd.conf
                              
                              LISTEN 127.0.0.1
                              LISTEN ::1
                              
                              upscmd -l tripplite
                              
                              Instant commands supported on UPS [tripplite]:
                              
                              beeper.disable - Disable the UPS beeper
                              beeper.enable - Enable the UPS beeper
                              beeper.mute - Temporarily mute the UPS beeper
                              beeper.off - Obsolete (use beeper.disable or beeper.mute)
                              beeper.on - Obsolete (use beeper.enable)
                              load.off - Turn off the load immediately
                              load.off.delay - Turn off the load with a delay (seconds)
                              reset.watchdog - Reset watchdog timer
                              shutdown.reboot - Shut down the load briefly while rebooting the UPS
                              shutdown.stop - Stop a shutdown in progress
                              test.battery.start.deep - Start a deep battery test
                              test.battery.start.quick - Start a quick battery test
                              test.battery.stop - Stop the battery test
                              

                              below ups.delay.shutdown reports 60 with setting offdelay=60 for about 20mins.
                              pf3.PNG

                              then ups.delay.shutdown reports 20 with setting offdelay=60 after 20mins or so.
                              pf.PNG
                              pf1.PNG

                              Please help!

                              dennypageD 1 Reply Last reply Reply Quote 0
                              • dennypageD
                                dennypage @whoami TM
                                last edited by

                                @whoami-tm

                                Coincidentally, that is the exact UPS I used to initially develop the pfSense NUT package. It has been extensively tested. 😊

                                I still have a few of them around, but none are connected to NUT at the moment, so I'm going off old memory...

                                First recommendation, get rid of everything you have in the Extra Arguments to driver section, and everything in the Advanced section. You don't need or want that stuff in the nut config.

                                Several of the things you are trying to set in the configuration need to be set in the UPS itself via the upsrw command:

                                • battery.charge.low
                                • ups.delay.shutdown
                                • ups.delay.start

                                Use upsrw without the -s option to see the list of variables available in your UPS.

                                whoami TMW 1 Reply Last reply Reply Quote 1
                                • whoami TMW
                                  whoami TM @dennypage
                                  last edited by whoami TM

                                  @dennypage

                                  upsrw tripplite
                                  
                                  [ups.delay.shutdown]
                                  Interval to wait after shutdown with delay command (seconds)
                                  Type: STRING
                                  Maximum length: 10
                                  Value: 20
                                  

                                  I've tried running nut with no arguments in advanced setting and get the same results. I've also tried running nut with no arguments in advanced settings or Extra Arguments to driver and get the same results. Im convinced there is something wrong with this UPS.

                                  I've run upsrw -s ups.delay.shutdown=60 -u admin -p 7828770f3f0c7aaa299b tripplite@localhost multiple times over the last few weeks without the desired results. Reply comes back with OK and ups.delay.shutdown changes to 60 on the UPS Status page but it doesnt change the behavior of the UPS.

                                  pf4.PNG

                                  Even if ups.delay.shutdown some how worked and I used Extra Arguments to driver ignorelb and override.battery.charge.low = 20 or override.battery.runtime.low = 300 to get pfSense to actually shut down I'd still have the issue of the UPS powering back up the outlets even though the main is off and running until the UPS battery completely dies.

                                  1 Reply Last reply Reply Quote 1
                                  • whoami TMW
                                    whoami TM
                                    last edited by whoami TM

                                    I just tested again. I wiped all settings. Then I added ignorelb and override.battery.charge.low = 70 to the Extra Arguments to driver field and saved.
                                    Then I went to command line and ran upsrw -s ups.delay.shutdown=60 -u admin -p b6a197675f5b5b2e1334 tripplite@localhost with the correct password and got the OK reply. I checked and ups.delay.shutdown displayed 60 on the UPS status page.

                                    I cut the main... pfSense started shutting down at 70% battery charge. Before pfSense could fully shutdown the UPS killed power to the outlets for 20 seconds then restored power to them even though the main was off. Since pfSense wasnt able to fully shutdown it didnt start back up but my switch did. I had to pull the plug to my Netgate 1U firewall appliance for 60 seconds to let the power drain from the PSU to get it to boot again. UPS would have run until its battery completely drained.

                                    dennypageD 1 Reply Last reply Reply Quote 0
                                    • dennypageD
                                      dennypage @whoami TM
                                      last edited by

                                      @whoami-tm After loosing power and restarting, what do you see if you read the ups.delay.shutdown with upsrw? Perhaps it isn't saving to NVRAM? Or it could be overwritten at NUT startup.

                                      whoami TMW 1 Reply Last reply Reply Quote 0
                                      • whoami TMW
                                        whoami TM @dennypage
                                        last edited by

                                        @dennypage said in NUT package:

                                        After loosing power and restarting, what do you see if you read the ups.delay.shutdown with upsrw?

                                        ups.delay.shutdown goes back to the default of 20... Even without losing power and restarting ups.delay.shutdown goes back to the default of 20 after an hour or so.

                                        dennypageD 1 Reply Last reply Reply Quote 0
                                        • dennypageD
                                          dennypage @whoami TM
                                          last edited by dennypage

                                          @whoami-tm Okay, now add

                                          offdelay=60
                                          ondelay=90
                                          

                                          (and only that) in the Extra Arguments to driver section and repeat the test.

                                          whoami TMW 1 Reply Last reply Reply Quote 0
                                          • whoami TMW
                                            whoami TM @dennypage
                                            last edited by whoami TM

                                            @dennypage I removed all settings, which only consisted of ignorelb and override.battery.charge.low = 20 in the Extra Arguments to driver field, and started with a blank slate.

                                            I added offdelay=60 and ondelay=90 to the Extra Arguments to driver field and saved. On the UPS Status page it added pf1.PNG

                                            pf2.PNG

                                            Using the command upsrw tripplite the response was

                                            [ups.delay.shutdown]
                                            Interval to wait after shutdown with delay command (seconds)
                                            Type: STRING
                                            Maximum length: 10
                                            Value: 60
                                            

                                            I let about 20mins pass and checked the UPS Status page again and ups.delay.shutdown reverted back to the default ups.delay.shutdown 20. I also checked by looking using the command upsrw tripplite and the response was

                                            [ups.delay.shutdown]
                                            Interval to wait after shutdown with delay command (seconds)
                                            Type: STRING
                                            Maximum length: 10
                                            Value: 20
                                            

                                            but it still displayed pf1.PNG

                                            I went back into UPS settings and saved again and again got the results posted above of ups.delay.shutdown 60 in both the status page and using cmd upsrw tripplite.
                                            The UPS said it had 60mins of run time. I killed power to the main... The UPS instantly dropped run time down to 30mins... The UPS passed 50% which should have been the Smart1500LCD default, pfSense did not shut down and the Smart1500 did nothing. I let the UPS go all the way down to 0% and it continued for another 30-45 mins before it didnt have enough power to push my Netgate box and both my Netgate box and Unifi POE switch shut off from the Tripplite losing power then a few seconds later my Unifi switch started up again with more power now that the Netgate box was offline. Then I gave power back to the main, pulled the plug on my Netgate box and let the power drain from the PSU so it would start again, then I had to back up my pfSense config because the config.xml got wiped.

                                            I'm convinced there is something wrong with this Tripplite UPS amazon sent me. I just bought an APC Back-UPS Pro 1500VA Gaming UPS to run a Windows PC that runs my BlueIris NVR software and DeepStack AI server to process images sent by BlueIris and it also uses about 100 watts and says it has 60 mins of runtime but when I cut the main it doesn't drop the runtime in half like the Tripplite.

                                            As a test, I've connected this headless Windows PC running BlueIris to the Tripplite UPS and used the PowerAlert software to change settings. For one I could only see half of the words in the PowerAlert software, possibly because I'm remoting into the windows PC from a laptop with 4k screen ¯_(ツ)_/¯. I was able to set offdelay = 60 and ondelay = 120 and clicked execute to test and it actually worked. But just like the networking gear, the runtime dropped in half when I cut the main. I have yet to do a full test with the windows pc and poweralert software letting the ups run down battery past the default 50% to see what would happen.

                                            dennypageD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.