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.1m 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.
    • S
      Sir_SSV @dennypage
      last edited by

      @dennypage said in NUT package:

      @Sir_SSV Please see posts here and here

      Make sure that the UPS is configured to use a static IP address, and that you are addressing the UPS by IP address and not by DNS name.

      Thanks for the tip!

      I had pfSense serving an ip address to the UPS via DHCP. I think the problem is the UPS boots very quickly and pfSense takes a little longer (UniFi switches take even longer again). The UPS wasn't being served it's allocated IP address in enough time and hence was causing the nut daemon to hang (and subsequent System Log errors and email alerts).

      I removed the UPS from pfSense DHCP server and changed the Network settings via Eaton gui to Static and assigned an IP address on the UPS vlan . When pfSense starts, because the UPS has already started (and has it's own IP) the nut daemon can talk with the UPS and automatically update the status.

      Final testing has been completed with both pfSense and FreeNAS shutting down once the UPS is at 24% and the UPS shutting down at 20% (factory set by Eaton).

      Happy that everything has worked out and big thanks to everyone that helped 😀

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

        @Sir_SSV You're welcome.

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

          I have an APC BX1000M that I recently connected to my pfsense box, running on an apu2c4, via usb cable. NUT is set to use usbhid as the driver.

          apcupsd detects the UPS straight away and can poll it on demand, however NUT is not able to poll the device it seems. The logged messages apparently show that a login does occur, but then connection is immediately lost.

          Jun 17 18:51:42	upsd	37544	Startup successful
          Jun 17 18:51:44	upsd	37544	User local-monitor@::1 logged into UPS [apcups]
          Jun 17 18:51:44	upsmon	37226	Poll UPS [apcups] failed - Driver not connected
          Jun 17 18:51:44	upsmon	37226	Communications with UPS apcups lost
          Jun 17 18:51:49	upsmon	37226	Poll UPS [apcups] failed - Driver not connected
          Jun 17 18:51:49	upsmon	37226	UPS apcups is unavailable
          

          I'm hoping this is a simple case of me overlooking something obvious, as so far my reading of this topic, the manual, and Google-fu has not gotten me anywhere, so any pointers would be greatly appreciated.

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

            @turboturtle The "login" is the upsmon process connecting to upsd. It doesn't indicate anything about the actual UPS driver.

            You are missing log entries for the driver itself. Look for entries matching "usbhid-ups" which is the NUT device driver for USB.

            To address the most commonly experienced issue... if this is a fresh NUT install, you will need to either disconnect/reconnect the USB connection or reboot pfSense to have correct permissions on the USB port.

            T 1 Reply Last reply Reply Quote 0
            • T
              turboturtle @dennypage
              last edited by

              @dennypage reboot did it, thanks!

              Interesting to note however, there were no log messages about the driver itself - nothing matched "usbhid-ups".

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

                @turboturtle said in NUT package:

                Interesting to note however, there were no log messages about the driver itself - nothing matched "usbhid-ups".

                The log entries may have rolled off. The default log retention is somewhat small.

                Glad it's working for you.

                1 Reply Last reply Reply Quote 0
                • N
                  newberger
                  last edited by

                  Hi - I have a Cyberpower OR700, which I previously had on my pfSense system using USB. I added the RMCARD205 and am now trying to connect to NUT via SNMP. My initial setup in the NUT menu only specifies the UPS IP (set static in the pfSense DHCP) UPS Type (Remote SNMP) and UPS name.

                  pfSense/NUT does see the UPS and reports the status, but the amount of data is much less than when I connected via USB.

                  I am using SNMPv1, although the UPS has SNMPv3 available. I'm not sure if that would make any difference?

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

                    @newberger A quick google search for "NUT RMCARD205" finds this in the NUT issues list: Support CyberPower RMCARD205

                    N 1 Reply Last reply Reply Quote 1
                    • N
                      newberger @dennypage
                      last edited by

                      @dennypage, thanks. I googled many topics around NUT SNMP setup, but not that specific query on this card. In reading it, it appears that more information is available if the ‘private’ SNMP community is used, but I can’t tell if it’s working correctly. Also, I had seen other RMCARDs are supported and was unsure how compatible this card would be with that support. Are you saying this card isn’t going to work yet?

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

                        @newberger said in NUT package:

                        Also, I had seen other RMCARDs are supported and was unsure how compatible this card would be with that support. Are you saying this card isn’t going to work yet?

                        You'll have to read through the NUT issue to understand what currently works and what will work better after direct support is added.

                        The issue seems pretty active, and they appear to be looking for help... nudge.
                        😀

                        N 1 Reply Last reply Reply Quote 0
                        • N
                          newberger @dennypage
                          last edited by

                          @dennypage Thanks - I'll follow the thread and help out, if possible.

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

                            Hi everyone, sorry my first post here is an ask for help but.. well I need some help!
                            I have a slightly older APC Back-UPS 1500 RS UPS connect via a USB cable and have managed to get the basics of NUT working as a server (on pfSense) to shutdown itself as well as a remote FreeNAS and Ubuntu machine.

                            My problem is that when power is restored, as soon as the host that talks to the UPS starts to boot up (i.e. immediately after going through POST) it triggers the UPS to go on battery (despite being plugged into the wall with AC power on) which it then stays on until the battery dies. Clearly this is not great for any machine attached that started at the same time as the firewall came up so trying to resolve this for a clean startup. If I leave the system to do it's thing it will sit there cycling; power up, trigger UPS to go on battery, continue booting, battery dies, abrupt shutdown, power up, rinse and repeat.

                            I've just moved the UPS from my rack to my study to do some more testing and I'm experiencing the same behaviour running the NUT master on a ubuntu test machine.. seems unlikely now it's anything specific to the pfSense iteration.

                            I'm hoping someone with experience configuring NUT and UPS's here might know what the issue since it seems like either a driver config option I've not set or something to do with startup / shutdown / init scrips etc that is a whole other kettle of fish to get my head around! In desperation I installed the windows utility (on a windows machine) to see if there were any behaviour options I could set on the UPS but there was nothing.

                            Again, apologies this isn't really a pfSense specific issue (other than ultimately I want the UPS managed by it). Alternatively if anyone could just give me the keywords to search on google for the behaviour I'm trying to stop that would be a great start!

                            Thanks,
                            Dave

                            Edit: Just tried apcupsd which I think works as I would expect so I guess I have a partial workaround but will need to see if I can get that to notify NUT on FreeNAS.. but that's definitely outside the scope of this forum!

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

                              @uk_dave A few questions:

                              • Are you using running the current version of pfSense (2.4.5)?
                              • Are you using the current version of the nut package (2.7.4_7)?
                              • Do you have anything in Advanced Settings? In particular, any of these?
                                • ignorelb
                                • override.battery.charge.warning
                                • override.battery.charge.low
                                • override.battery.runtime.low
                              U 1 Reply Last reply Reply Quote 0
                              • U
                                uk_dave @dennypage
                                last edited by

                                @dennypage Thanks for replying,

                                Running 2.4.5-RELEASE-p1 (amd64) of pfSense and 2.7.4_7 of the NUT package.

                                I'm currently doing this testing on a fresh install of pfSense, all I had added to the config was:

                                USB Type: Local USB
                                UPS Name: ups
                                Driver: usbhid
                                ups.users: [remoteuser]
                                password = upsmon
                                upsmon slave

                                Here's my UPS: BR1500GI

                                I have disabled the master / slave behaviour of the UPS so all 5x sockets on the battery backup side should be in the 'Battery backup outlets with surge protection only' mode. I was assuming that NUT tells the UPS to shutdown and therefore having 5x sockets I can use rather than 3x was preferable.

                                Thanks,
                                Dave

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

                                  @uk_dave said in NUT package:

                                  BR1500GI

                                  Can you post output of upsrw and upsc for the device please?

                                  U 1 Reply Last reply Reply Quote 0
                                  • U
                                    uk_dave @dennypage
                                    last edited by

                                    @dennypage Output below:

                                    [2.4.5-RELEASE][admin@pfSense.localdomain]/root: upsrw ups
                                    [battery.charge.low]
                                    Remaining battery level when UPS switches to LB (percent)
                                    Type: STRING
                                    Maximum length: 10
                                    Value: 10
                                    
                                    [battery.runtime.low]
                                    Remaining battery runtime when UPS switches to LB (seconds)
                                    Type: STRING
                                    Maximum length: 10
                                    Value: 120
                                    
                                    [input.sensitivity]
                                    Input power sensitivity
                                    Type: STRING
                                    Maximum length: 10
                                    Value: medium
                                    
                                    [input.transfer.high]
                                    High voltage transfer point (V)
                                    Type: STRING
                                    Maximum length: 10
                                    Value: 294
                                    
                                    [input.transfer.low]
                                    Low voltage transfer point (V)
                                    Type: STRING
                                    Maximum length: 10
                                    Value: 176
                                    
                                    [ups.delay.shutdown]
                                    Interval to wait after shutdown with delay command (seconds)
                                    Type: STRING
                                    Maximum length: 10
                                    Value: 20
                                    
                                    [2.4.5-RELEASE][admin@pfSense.localdomain]/root: upsc ups
                                    battery.charge: 100
                                    battery.charge.low: 10
                                    battery.charge.warning: 50
                                    battery.date: 2001/09/25
                                    battery.mfr.date: 2015/03/19
                                    battery.runtime: 771
                                    battery.runtime.low: 120
                                    battery.type: PbAc
                                    battery.voltage: 27.3
                                    battery.voltage.nominal: 24.0
                                    device.mfr: American Power Conversion
                                    device.model: Back-UPS RS 1500G
                                    device.serial: 3B1512X15061
                                    device.type: ups
                                    driver.name: usbhid-ups
                                    driver.parameter.pollfreq: 30
                                    driver.parameter.pollinterval: 2
                                    driver.parameter.port: auto
                                    driver.parameter.synchronous: no
                                    driver.version: 2.7.4
                                    driver.version.data: APC HID 0.96
                                    driver.version.internal: 0.41
                                    input.sensitivity: medium
                                    input.transfer.high: 294
                                    input.transfer.low: 176
                                    input.voltage: 245.0
                                    input.voltage.nominal: 230
                                    ups.beeper.status: disabled
                                    ups.delay.shutdown: 20
                                    ups.firmware: 878.L4 .I
                                    ups.firmware.aux: L4
                                    ups.load: 29
                                    ups.mfr: American Power Conversion
                                    ups.mfr.date: 2015/03/19
                                    ups.model: Back-UPS RS 1500G
                                    ups.productid: 0002
                                    ups.realpower.nominal: 865
                                    ups.serial: 3B1512X15061
                                    ups.status: OL
                                    ups.test.result: No test initiated
                                    ups.timer.reboot: 0
                                    ups.timer.shutdown: -1
                                    ups.vendorid: 051d
                                    [2.4.5-RELEASE][admin@pfSense.localdomain]/root:
                                    

                                    Thanks again :)

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

                                      I don't see anything troubling in your upsrw or upsc output.

                                      @uk_dave said in NUT package:

                                      My problem is that when power is restored, as soon as the host that talks to the UPS starts to boot up (i.e. immediately after going through POST) it triggers the UPS to go on battery (despite being plugged into the wall with AC power on) which it then stays on until the battery dies.

                                      More questions:

                                      • Are you testing by pulling mains from the UPS? Assuming yes...
                                      • When the pfSense shutdown occurs, is the UPS turning off the output?
                                      • How long are you waiting before restoring mains to the UPS?
                                      U 1 Reply Last reply Reply Quote 0
                                      • U
                                        uk_dave @dennypage
                                        last edited by

                                        @dennypage

                                        • yes, I turn the mains socket off
                                        • I don't believe it is, I've got a halogen lamp on a dimmer that can pull up to 435W so I've varied the load to full to bring the estimated run time down to 1 min remaining to force the shutdown process then ease up so it can last a few minutes and the UPS doesn't shut down until the battery dies... definitely longer than 20s
                                        • I usually wait about a minute before restoring power.
                                        dennypageD 1 Reply Last reply Reply Quote 0
                                        • dennypageD
                                          dennypage @uk_dave
                                          last edited by

                                          @uk_dave said in NUT package:

                                          I don't believe it is

                                          Okay, this definitely is a problem. The last thing nut does is instruct the UPS to remove power after the configurable delay (20s by default).

                                          What I would do next is to move the pfSense box to not be powered by the UPS, but still have the USB connected. Then, test the power kill command of the UPS using "upsdrvctl shutdown" or the -k option to usbhid-ups.

                                          U 1 Reply Last reply Reply Quote 0
                                          • 4
                                            4o4rh @dennypage
                                            last edited by

                                            @dennypage can you help with the correct config pls.
                                            I have a APC UPS master on TrueNAS box

                                            I have a dumb UPS connected to pfsense and need to shutdown pfsense based on a timer triggered by the master due to the non-shared UPS.

                                            I have looked at the NUT documentation and examples below but i can't figure out if i need to use the heartbeat config or not.

                                            http://rogerprice.org/NUT/ConfigExamples.A5.pdf
                                            https://wiki.ipfire.org/addons/nut/detailed

                                            i simply want to shutdown the slave 20min after power loss, but obviously cancel the timer if the power comes back.

                                            is the a way to simulate a power failure on the master to test the slave without actually cutting power to the master?

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