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

    Beta test of new NUT UPS package

    Scheduled Pinned Locked Moved pfSense Packages
    114 Posts 15 Posters 36.2k Views
    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.
    • w0wW
      w0w
      last edited by

      Can I request some features for package? (lowest priority in your list) :)
      1. I want shutdown pfsense before battery get LOW condition, for example after running 5 minutes on battery, I have seen some implementations using internal nut scripting, but not for pfsense. Feature is very similar to what APCUPSD already have for years.
      2. It would be good to kill UPS power, sending command to shutdown UPS, like APCUPSD doing it.

      BTW I am using APCUPSD on windows for the same UPS.

      1 Reply Last reply Reply Quote 0
      • J
        johnabbot
        last edited by

        @dennypage:

        Several questions:

        What messages are in the system log? Look for messages from upsd, upsmon, upsdrvctl, blazer*.

        upsmon 73821 Poll UPS [sunpac] failed - Driver not connected
        upsd 71207 Can't connect to UPS [sunpac] (blazer_usb-sunpac): No such file or directory

        What are the contents of /usr/local/etc/nut/ups.conf and upsd.conf?

        sunpac]
        driver=blazer_usb
        port=auto
        langid_fix=0x4095
        subdriver=krauler
        productid=1234
        vendorid=0925

        LISTEN 127.0.0.1
        LISTEN ::1

        What nut processes are running? (ps -axuwww | grep ups)

        ps -axuwww | grep ups
        root    71207  0.0  0.0  20712    2368  -  Ss    6:10PM    0:00.24 /usr/local/sbin/upsd -u root
        root    72651  0.0  0.0  16612    2308  -  Is    6:10PM    0:00.00 /usr/local/sbin/upsmon
        uucp    73821  0.0  0.0  16612    2340  -  S    6:10PM    0:00.20 /usr/local/sbin/upsmon
        root    58229  0.0  0.0  18740    2240  0  S+    9:44PM    0:00.00 grep ups

        Does anything change if you restart the nut service via the nut status page or the services page?

        No

        Have you successfully tested this specific ups model with nut previously?

        No

        @johnabbot:

        I'm running a generic asian ups with the following

        (Various USB)
        UPSilon 2000 software blazer_usb langid_fix=0x409

        It installed perfectly, looks great, unfortunately it gives me

        "Failed to retrieve status"

        1 Reply Last reply Reply Quote 0
        • w0wW
          w0w
          last edited by

          I have "tecnoware" UPS, some ERA series but not the same as listed in NUT supported devices. It have similar behavior to yours,  johnabbot
          Playing with driver options not helped, strange… but UPSilon 2000 works under windows environment at least.

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

            John, it looks like the usb information for the ups doesn't match. I would recommend dumping the usb information on the device and heading over to the NUT forums with it. You can dump the usb information with the following command on the console:

            usbconfig dump_device_desc

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

              I've sent out beta 3. You do not need to remove the beta 1/2 package before installing the beta 3 package. Note that it is normal that the nut service is stopped during the install–you will need to restart the service after the install completes.

              Again, thank you for all your help!

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

                w0w, with the beta 3 release you should be able to address the SNMP unreachable on startup issue issue. Add the following lines to ups.conf in the advanced section:

                maxretry=60
                  retrydelay=60

                This will result in a retry every minute for an hour. Be careful how you use this.

                See the ups.conf man page for more information.

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

                  I believe NUT already handles this. Have a look at the man page for the apcsmart driver. Pretty rich configuration options for power handling in there.

                  @w0w:

                  It would be good to kill UPS power, sending command to shutdown UPS, like APCUPSD doing it.

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

                    Hey John, just wondering if you had a chance to dump the usb config to check the vendor and product id?

                    @johnabbot:

                    driver=blazer_usb
                    port=auto
                    langid_fix=0x4095
                    subdriver=krauler
                    productid=1234
                    vendorid=0925

                    1 Reply Last reply Reply Quote 0
                    • w0wW
                      w0w
                      last edited by

                      dennypage
                      Thanks, looks like b3 works. UPS reconnects if no connection at startup or if it lost.

                      @dennypage:

                      I believe NUT already handles this. Have a look at the man page for the apcsmart driver. Pretty rich configuration options for power handling in there.

                      @w0w:

                      It would be good to kill UPS power, sending command to shutdown UPS, like APCUPSD doing it.

                      I don't use apcsmart driver, I use SNMP. I think I'll try

                      something like " /usr/local/ups/sbin/upsdrvctl shutdown" later to check if this works.

                      Thanks again about tip for ups.conf, shame on me. :)

                      1 Reply Last reply Reply Quote 0
                      • T
                        timotl
                        last edited by

                        w0w

                        If that works to kill the UPS, you can add this to rc.shutdown and it will send the command if NUT shuts down the system
                        I use the system patches package to keep it there across updates.

                        
                        if (test -f /etc/killpower)
                            then
                                echo "Shutting down UPS power..."
                                /usr/local/sbin/upsdrvctl shutdown
                            fi
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • dennypageD
                          dennypage
                          last edited by

                          Glad it works. No shame btw, it wasn't possible to do in beta 2. Both config and script changes were needed to support it.

                          @w0w:

                          Thanks, looks like b3 works. UPS reconnects if no connection at startup or if it lost.

                          Thanks again about tip for ups.conf, shame on me. :)

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

                            Pull request created: https://github.com/pfsense/FreeBSD-ports/pull/155

                            1 Reply Last reply Reply Quote 0
                            • J
                              johnabbot
                              last edited by

                              @dennypage:

                              Hey John, just wondering if you had a chance to dump the usb config to check the vendor and product id?

                              Hi Denny,

                              There was an attempt to reverse engineer this back in 3013 that seems to have come to nothing.

                              http://lists.alioth.debian.org/pipermail/nut-upsdev/2013-January/006390.html

                              my understanding is they won't do any more work on supporting it. I've wasted enough time on getting it to work I think I will wait to see what works well with NUT on the pfsense and buy one of those.

                              John

                              @johnabbot:

                              driver=blazer_usb
                              port=auto
                              langid_fix=0x4095
                              subdriver=krauler
                              productid=1234
                              vendorid=0925

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

                                If you are looking for a new UPS, pretty much anything that is supported by NUT 2.7.4 should work fine with the new nut package under pfSense. To ensure compatibility with NUT, it would be a good idea to choose a ups that operates with a publicly available protocol. You can find these on the NUT hardware compatibility list by selecting "***" as the minimum Support Level.

                                1 Reply Last reply Reply Quote 0
                                • E
                                  elemay
                                  last edited by

                                  sorry, wrong thread

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    johnabbot
                                    last edited by

                                    I got a Eaton 5E2000iUSB and it seems to work perfectly.

                                    I still have to add the Nut Clients (debian servers & a NAS) and test it properly but looking good.

                                    Thanks a million for your work, this is one thing about Pfsense that has been really bugging me.

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

                                      Thanks John. I'm glad it worked for you. I really appreciate your help with testing the new package.

                                      1 Reply Last reply Reply Quote 0
                                      • Q
                                        q54e3w
                                        last edited by

                                        let me know if I can test for you too.
                                        Does this NUT update support reporting on enviromentals via an APC 9631 and sensors?

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

                                          The UPS Detail section on the Status page will display all variables reported by the NUT driver, however I don't personally know what variables are reported by the driver for the 9631 card.

                                          If you would like a copy of the beta package, please pm me with an email address. Thanks.

                                          @irj972:

                                          Does this NUT update support reporting on enviromentals via an APC 9631 and sensors?

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            justmie
                                            last edited by

                                            Does the Beta package properly support the connection to Apcupsd ? Now I use a workaround with the old package, but I'd rather use something that can be configured through the pfsense webui.

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