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

    UPS shutdown

    Scheduled Pinned Locked Moved pfSense Packages
    67 Posts 12 Posters 32.5k 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.
    • R
      rsw686
      last edited by

      Tomorrow (Friday) it should be committed. I just have to add more models to the list and check a few things.

      The interface is shown in the above post. Its plain but gets the job done. Suggestions would be appreciated. However due to the package system generating the page theres not much more I can do unless I want to build my own configuration page, which I might work on later.

      Local, local monitoring with remote access, and remote monitoring are all supported.

      1 Reply Last reply Reply Quote 0
      • R
        rsw686
        last edited by

        The package is committed. Let me know how it works. I've only gotten to test it on a APC Smart-UPS. If there are cable types, etc you need added let me know. I went through the list and added all the major brands, etc.

        1 Reply Last reply Reply Quote 0
        • Y
          yoda715
          last edited by

          This is as far as I get when trying to install nut:

          Downloading package configuration file… done.
          Saving updated package information... done.
          Downloading nut and its dependencies...

          It will hang there at downloading dependencies and will never complete.

          1 Reply Last reply Reply Quote 0
          • R
            rsw686
            last edited by

            @yoda715:

            This is as far as I get when trying to install nut:

            Downloading package configuration file… done.
            Saving updated package information... done.
            Downloading nut and its dependencies...

            It will hang there at downloading dependencies and will never complete.

            The FreeBSD mirror containing the dependencies was up and down all morning. I thought it was back up. I will see if theres another one I can use instead.

            1 Reply Last reply Reply Quote 0
            • R
              rsw686
              last edited by

              I've added more cable types and made some changes to get USB UPS's working. You need to specify auto as the port if using USB. I have also built the development tree version of newhidups, which should be tested soon. If it resolves more of the issues I will commit it. If anybody is interested in testing it contact me either by private message or email. Any feedback on this package would be appreciated.

              1 Reply Last reply Reply Quote 0
              • C
                cadtiagof
                last edited by

                How do I add my ups driver to NUT ( powercom ) ?

                How to change the shutdown times?

                thanks  ;)

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

                  Would be nice to implement a screen showing the status of the UPS…  ;D

                  1 Reply Last reply Reply Quote 0
                  • R
                    rsw686
                    last edited by

                    I have done a rewrite of the NUT package which cleaned up the code, and fixed permission errors. I have also added a status tab which displays the model, status, load, battery charge/voltage, input/output voltage. and temperature.

                    Feedback on if the package works for you, what doesn't work, ideas for improvement would be appreciated.

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

                      hmmm, does not work for me…

                      seems not to find my smart-ups via calbe (com1)  :'(

                      I configured every setting that's NOT optional... and I get the following:

                      Feb 15 22:51:45 php: nut: Service failed to start: check configuration
                      Feb 15 22:51:45 php: nut: Starting service
                      Feb 15 22:50:44 php: nut: Service failed to start: check configuration
                      Feb 15 22:50:43 php: nut: Starting service
                      Feb 15 22:49:34 php: /pkg_mgr_install.php: Beginning package installation for nut.

                      UPS Monitoring   LOCAL
                      Local UPS Name UPS_IDEN
                      Local UPS Model SMART-UPS
                      Local UPS Port    COM1 (ttyd0)

                      any idea ?

                      1 Reply Last reply Reply Quote 0
                      • R
                        rsw686
                        last edited by

                        @trendchiller:

                        hmmm, does not work for me…

                        seems not to find my smart-ups via calbe (com1)  :'(

                        I configured every setting that's NOT optional... and I get the following:

                        Feb 15 22:51:45 php: nut: Service failed to start: check configuration
                        Feb 15 22:51:45 php: nut: Starting service
                        Feb 15 22:50:44 php: nut: Service failed to start: check configuration
                        Feb 15 22:50:43 php: nut: Starting service
                        Feb 15 22:49:34 php: /pkg_mgr_install.php: Beginning package installation for nut.

                        UPS Monitoring   LOCAL
                        Local UPS Name UPS_IDEN
                        Local UPS Model SMART-UPS
                        Local UPS Port    COM1 (ttyd0)

                        any idea ?

                        You need to specify a cable type, that is why is it in () next to Smart-UPS. If that is an APC cable look at both ends. In the plastic it will have the cable number engraved. Specify that cable in the nut cable type selection.

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

                          Hmmm, did it that way, but it does not work either :-(

                          And the service is being started, tells me successful, but then does not start at all  :-\

                          1 Reply Last reply Reply Quote 0
                          • R
                            rsw686
                            last edited by

                            @trendchiller:

                            Hmmm, did it that way, but it does not work either :-(

                            And the service is being started, tells me successful, but then does not start at all  :-\

                            What color is your serial cable and what number is on it? I will look into it. I have an APC Smart UPS with a gray cable, number 940-0095B. There are about 10 different cables so it is important that you actually look at the cable for the number. If you pick the wrong cable type it will not work. It would be helpful if you could provide more information.

                            1 Reply Last reply Reply Quote 0
                            • R
                              rsw686
                              last edited by

                              Heres a snapshot of my configuration and the status. The cable I have is technically for a Back-UPS Pro UPS, I have a few UPS's and cables have gotten swapped around. I did test with the actual Smart-UPS cable and it works as well. The protocol is the same, but every model cable is wired slightly different. The UPS model Smart-UPS, Back-UPS Pro tells the driver what subset of the protocol the UPS supports, such as temperature, etc

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

                                The cable I have is a 940-004C cable…
                                Should be working with the Rack Smart UPS 1000 I think...

                                1 Reply Last reply Reply Quote 0
                                • R
                                  rsw686
                                  last edited by

                                  @trendchiller:

                                  The cable I have is a 940-004C cable…
                                  Should be working with the Rack Smart UPS 1000 I think...

                                  I figured it out. I went through and read the man pages on the apcsmart driver. Turns out it only supports two cables, unlike other documentation I have read. I went as far as going through the actual code to confirm this. I am updating the NUT package to reflect this. You need to find one of the below cables to get it working.

                                  "This driver expects to see a 940-0024C cable or  a  clone  by  default.
                                        You can switch to the 940-0095B dual-mode cable support with the cable=
                                        definition described below.

                                  If your 940-0024C cable is broken or missing, use this diagram to build
                                        a clone:

                                  http://random.networkupstools.org/cables/940-0024C.jpg"

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    rsw686
                                    last edited by

                                    By chance did you read the cable number wrong and it is really 940-0024C. 2 might look like 0 in the dark on plastic. ;D Try reinstalling the package and configuring it with that cable setting.

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

                                      you were right… error while reading...

                                      it's the 24 cable...

                                      but after reinstalling it does still not work :-(

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rsw686
                                        last edited by

                                        @trendchiller:

                                        you were right… error while reading...

                                        it's the 24 cable...

                                        but after reinstalling it does still not work :-(

                                        I'm really confused. I have both cables 940-0024C and 940-0095B sitting here in front of me and they both work. I have an APC SmartUPS 700. Are you sure the cable is good? Have you tested it with the APC monitoring software by chance?

                                        Also if the nut status screen shows wait, refresh your browser as its still negotiating with the UPS.

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

                                          How can I check, why the service won't start ?
                                          any idea ?

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            rsw686
                                            last edited by

                                            @trendchiller:

                                            How can I check, why the service won't start ?
                                            any idea ?

                                            Configure nut via the webgui. Then go to the console and run

                                            /usr/local/libexec/nut/upsdrvctl start

                                            You should see something like

                                            Detected SMART-UPS 700 [serialnum] on /dev/ttyd0

                                            Otherwise it will give you an error message. The config files are stored in /usr/local/etc/nut/ If you get it working let me know what you changed to make it work.

                                            After you get that far then you run the following commands. Be sure to replace myups with the name you gave your ups in the nut config.

                                            /usr/local/sbin/upsd
                                            /usr/local/sbin/upsmon myups@localhost

                                            Both the above commands should tell you they were successfully executed.

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