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

    NUT package (2.8.0 and below)

    Scheduled Pinned Locked Moved UPS Tools
    1.2k Posts 128 Posters 4.4m 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.
    • GertjanG
      Gertjan @kevindd992002
      last edited by

      @kevindd992002 said in NUT package:

      @dennypage

      On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

      Good question.
      I used Pan B : I'll hook them up to a PC with run PowerShute, and use that tool to reset the counter.
      (otherwise I have to reverse engineer a binary Windows app to see what communication goes over the USB wire .... or read the complete NUTS manual ....)

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

      K 1 Reply Last reply Reply Quote 0
      • K
        kevindd992002 @Gertjan
        last edited by

        @Gertjan said in NUT package:

        @kevindd992002 said in NUT package:

        @dennypage

        On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

        Good question.
        I used Pan B : I'll hook them up to a PC with run PowerShute, and use that tool to reset the counter.
        (otherwise I have to reverse engineer a binary Windows app to see what communication goes over the USB wire .... or read the complete NUTS manual ....)

        Yeah, I mean I can always do that but I just want to know if there's a NUT command that can do the same action.

        As for my UPS issue, here's a some kind of useless reply from Synology (as I half expected):

        Dear Customer,

        Thank you for contacting Synology support.

        As the design, the configuration will be rewrite after you set up in DSM.

        And we checked the system seems like we can get contact to UPS properly.

        root@Synology:~# upsmon -D
        Network UPS Tools upsmon DSM6-2-2-24922-nano-1-C5-190604
        kill: No such process
        0.000000 UPS: ups@192.168.10.1 (slave) (power value 1)
        0.000344 Using power down flag file /etc/killpower
        0.000924 debug level is '1'
        0.006931 Trying to connect to UPS [ups@192.168.10.1]
        0.009822 Logged into UPS ups@192.168.10.1
        0.010296 UPS [ups@192.168.10.1] connected
        Executing command: online
        ^C 50.141267 Signal 2: exiting

        Would you like to tell us other finding, since the login log may need to refer to your configuration of NUT master.

        Looking forward to your messages.

        1 Reply Last reply Reply Quote 0
        • K
          kevindd992002
          last edited by kevindd992002

          Oh wait! They're not useless after all. It looks like they did something and now my upsmon.conf file is populated with the expected contents! And I can see the monuser account logged in in my pfsense ups logs :) I'll ask what they did, because they had remote access to my Syno. I see this in my /var/log/messages now:

          2019-08-26T10:17:51+08:00 Synology upsmon[25917]: Startup successful
          2019-08-26T10:17:51+08:00 Synology upsmon[25919]: UPS [ups@192.168.10.1] connected
          2019-08-26T10:55:26+08:00 Synology upsmon[25919]: Poll UPS [ups@192.168.10.1] failed - Server disconnected
          2019-08-26T10:55:55+08:00 Synology SystemInfo.cgi: ups_info_get.c:97 Can't get UPS status[0]
          2019-08-26T10:59:04+08:00 Synology upsmon[25919]: UPS [ups@192.168.10.1] connected
          2019-08-26T13:59:23+08:00 Synology upsmon[5713]: Startup successful
          2019-08-26T13:59:23+08:00 Synology upsmon[5715]: UPS [ups@192.168.10.1] connected
          
          
          dennypageD 1 Reply Last reply Reply Quote 0
          • dennypageD
            dennypage @kevindd992002
            last edited by

            @kevindd992002 said in NUT package:

            @dennypage
            On another note, how do I "reset" the battery install date on my UPS for every time I install a new battery? Similar to how PowerChute does it?

            You can run upsrw and see what variables are exposed by the UPS. I believe the variable you are looking for is "battery.date". If it's there, you can update it via the "-s" option.

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

              @kevindd992002 said in NUT package:

              Oh wait! They're not useless after all. It looks like they did something and now my upsmon.conf file is populated with the expected contents! And I can see the monuser account logged in in my pfsense ups logs :) I'll ask what they did, because they had remote access to my Syno.

              I'm also very interested to know what they changed.

              K 1 Reply Last reply Reply Quote 0
              • K
                kevindd992002 @dennypage
                last edited by

                @dennypage said in NUT package:

                @kevindd992002 said in NUT package:

                Oh wait! They're not useless after all. It looks like they did something and now my upsmon.conf file is populated with the expected contents! And I can see the monuser account logged in in my pfsense ups logs :) I'll ask what they did, because they had remote access to my Syno.

                I'm also very interested to know what they changed.

                Their reply, lol:

                Dear Customer,

                Thank you for contacting Synology support.

                Like the mail last time, we can't find the root cause from the log.

                We are still tracing this case, if you have more clues it will be helpful to let us know.

                The design of this configuration will be modify once you connect to other device.

                And we just copy it from the etc.default. Please check if there are any problem or not.

                Also just recommendation, if the upsmon.conf lose its content again please tell us, and let us check.

                Please don't copy it from etc.default by yourself because there might be some symptom to let us know the root cause.

                Thank you for your patience, and sorry for any inconvenience caused.

                1 Reply Last reply Reply Quote 0
                • K
                  kevindd992002
                  last edited by

                  Last 10/3/2019 there was a power failure and I received a message from my Syno:

                  Dear user,
                  
                  The UPS connected to Synology has reached low battery. All services are shut down. The services will be restarted once the UPS is recovered.
                  
                  Sincerely,
                  Synology DiskStation
                  

                  This is expected. It happened 5:47PM and then at 10:39PM I received this:

                  Dear user,
                  
                  Synology suffered from power failure and was shut down improperly.
                  
                  Sincerely,
                  Synology DiskStation
                  

                  I then checked my Syno's upsmon.conf and it is 0 bytes again! I don't know what could've caused this but I'll report back to Syno support as they requested last time. So between 5:47PM and 10:39PM, that conf file got corrupted again for some reason, and was the cause of the improper shutdown.

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

                    @kevindd992002 Did you have the HOSTSYNC setting in the upsmon.conf section?

                    K 1 Reply Last reply Reply Quote 0
                    • K
                      kevindd992002 @dennypage
                      last edited by

                      @dennypage said in NUT package:

                      @kevindd992002 Did you have the HOSTSYNC setting in the upsmon.conf section?

                      Yes I did, for 120 seconds. That's what I thought at first but digging through the logs of pfsense, the power went out again at 8:15PM and came back at 10:39PM. And what I think happened is the upsmon.conf file was reverted to 0 bytes right after the Syno turned on when the power went back on at 6:15PM. So at 6:15PM, the Syno never was able to connect to the NUT master.

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

                        @kevindd992002 That's pretty strange (scary). Other than talking with Synology, the only thing I can think to suggest is to double check that your Synology can easily shut down in 120 seconds. Mine used to shutdown in under 60 seconds. I just retested (glad I did) and I'm seeing it now at 90 seconds. I don't know if the change is due to a newer DSM or because of changes I've made with Surveillance Station.

                        K 1 Reply Last reply Reply Quote 0
                        • K
                          kevindd992002 @dennypage
                          last edited by

                          @dennypage said in NUT package:

                          @kevindd992002 That's pretty strange (scary). Other than talking with Synology, the only thing I can think to suggest is to double check that your Synology can easily shut down in 120 seconds. Mine used to shutdown in under 60 seconds. I just retested (glad I did) and I'm seeing it now at 90 seconds. I don't know if the change is due to a newer DSM or because of changes I've made with Surveillance Station.

                          I thought of that and it was fine when there was a blackout like a few days ago before Oct 3. So it's got to be the upsmon.conf issue again.

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

                            @kevindd992002 said in NUT package:

                            I thought of that and it was fine when there was a blackout like a few days ago before Oct 3. So it's got to be the upsmon.conf issue again.

                            Cool. Just checking.

                            Seems pretty clear that Synology has a bug in their nut configuration management.

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

                              Hello All,
                              The issue I am having may have been answered already but there are several posts here and I haven't been able to find my answer. Anyways....I have a Tripp Lite SMART1500LCD. It is plugged into my pfsense router; it is an old Dell R210 server running just pfsense. It appears I have everything set up correctly and pfsense is seeing my UPS. I also have my FreeNAS set up as a slave and it can see the UPS through the pfsense box. When I cut the power to test the shutdown process, FreeNAS shuts down after 60 seconds; which is how I have it setup. FreeNAS is working how I want it to. The issue I am having is my pfsense box IS NOT shutting down. When I tested it, the UPS completely ran out of battery and pfsense never initiated the shutdown sequence. I tried using the commands suggested on here in the ups.conf but they don't do anything. I attached some screenshots. of my pfsense UPS settings.

                              Ups_settings_pg1.JPG
                              Ups_settings_pg2.JPG
                              Ups_status_pg1.JPG
                              Ups_status_pg2.JPG

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

                                @tensi0n519 You have the UPS configured to ignore the low battery signal, and to not initiate a shutdown until the ups is under 5% or 60 seconds of runtime. Note that the 5% and 60 second values are determined by polling (every 30 seconds) rather than by signal from the UPS. This ends up being a very narrow margin for conducting a shutdown.

                                NUT provides no native way to initiate shutdown within X seconds of going on battery. You can initiate shutdown based on a low battery signal from the UPS (default), or values such as % or runtime calculated from the UPS status.

                                Things to do:

                                1. Remove ignorelb from configuration. ignorelb is used to work around UPSs that send an immediate low battery signal as soon as the UPS goes on battery. The Tripp Lite does not do this.
                                2. Either remove the % or increase it to a minimum of 15-20%. If it were me, I would simply delete this parameter.
                                3. Either remove the runtime or increase it to a minimum of 120. If it were me, I would use a value of 300.

                                The higher the values for % and runtime, the easier it is on the battery. And the safer it is for shutdown.

                                K 1 Reply Last reply Reply Quote 0
                                • K
                                  kevindd992002 @dennypage
                                  last edited by

                                  @dennypage said in NUT package:

                                  @tensi0n519 You have the UPS configured to ignore the low battery signal, and to not initiate a shutdown until the ups is under 5% or 60 seconds of runtime. Note that the 5% and 60 second values are determined by polling (every 30 seconds) rather than by signal from the UPS. This ends up being a very narrow margin for conducting a shutdown.

                                  NUT provides no native way to initiate shutdown within X seconds of going on battery. You can initiate shutdown based on a low battery signal from the UPS (default), or values such as % or runtime calculated from the UPS status.

                                  Things to do:

                                  1. Remove ignorelb from configuration. ignorelb is used to work around UPSs that send an immediate low battery signal as soon as the UPS goes on battery. The Tripp Lite does not do this.
                                  2. Either remove the % or increase it to a minimum of 15-20%. If it were me, I would simply delete this parameter.
                                  3. Either remove the runtime or increase it to a minimum of 120. If it were me, I would use a value of 300.

                                  The higher the values for % and runtime, the easier it is on the battery. And the safer it is for shutdown.

                                  @dennypage , how do you totally delete the %? Can you put a blank value in the charge.low parameter in the extra arguments for the driver field?

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

                                    @kevindd992002 said in NUT package:

                                    @dennypage , how do you totally delete the %? Can you put a blank value in the charge.low parameter in the extra arguments for the driver field?

                                    Delete the line that says "override.battery.charge.low = 5" from the Additional configuration lines for ups.conf text input box. Be sure to delete the "ignorelb" line as well.

                                    When you are done, the Additional configuration lines for ups.conf section should either be completely empty, or have a single line that says "override.battery.runtime.low = 300"

                                    1 Reply Last reply Reply Quote 1
                                    • H
                                      huuur
                                      last edited by

                                      Greetings everyone!
                                      Sorry for the noob question, but I tried to find an answer in the past days with no luck!
                                      I just got an APC ups with network card, I installed NUT package, I can read my ups data via pfsense but I couldn't find a way to manually configure the package so (for example) I can setup when to shutdown pfsense with respect to the remaining ups battery, I noticed a few old guides which inapplicable to the current NUT package release.
                                      Thanks for your kind time

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

                                        @huuur This is discussed several times earlier in this thread. The previous 4 posts were specifically about this topic.

                                        If you leave NUT alone (default configuration), it will perform a shutdown on the local system when the UPS signals a low better situation. In 90% of the cases, this is the desired behavior. If you have a USB based UPS and are only supporting pfSense with it, I would recommend staying with the default configuration.

                                        If you have a more complicated configuration, such as multi-system, an exotic UPS, etc., and need to change the way NUT behaves, the best way to start is with the NUT User Manual located here. It's important to understand the trade-offs when making changes to the NUT configuration. You can easily create configurations in which NUT will not successfully shut down the system(s) when mains fail, or will not recover them after mains return.

                                        1 Reply Last reply Reply Quote 2
                                        • D
                                          DurUser
                                          last edited by

                                          I recently migrated my pfsense to some different hardware. I made a backup of all pfsense settings, installed pfsense on the new machine, then restored all pfsense settings.
                                          Now I am seeing issues with my ups which I also moved over from the old machine to the new one. Once in a while I get an email saying it is disconnected but the logs are showing more issues.

                                          Oct 28 17:29:45 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 17:29:44 usbhid-ups 11742 Got disconnected by another driver: Device not configured
                                          Oct 28 17:29:44 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 17:19:53 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 17:19:52 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 15:55:15 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 15:55:15 usbhid-ups 11742 Got disconnected by another driver: Device not configured
                                          Oct 28 15:55:14 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 15:27:01 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 15:27:00 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 13:55:06 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 13:55:06 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 13:23:06 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 13:23:06 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 10:25:39 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 10:25:38 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 08:07:07 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 08:07:07 kernel ugen1.3: <CPS CP 1500C> at usbus1 (disconnected)
                                          Oct 28 07:25:38 kernel ugen1.3: <CPS CP 1500C> at usbus1
                                          Oct 28 07:25:38 usbhid-ups 11742 Got disconnected by another driver: Device not configured

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

                                            @DurUser I would recommend the following:

                                            • Delete the NUT package
                                            • Re-Install the NUT package
                                            • Go to Services / UPS / UPS Settings and press Save
                                            • Reboot the system
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.