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

APCUPSD - No UPS page

General pfSense Questions
2
20
3.5k
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.
  • J
    JKnott
    last edited by Apr 14, 2019, 7:15 PM

    I just installed apcupsd without issue, but I'm not sure it's running. Ps aux|grep apcups does not show it running and when I click on Services > UPS, I get a 404 error. When I installed the package, there were instructions to adduhid_load="YES" to /boot/loader.conf, but that line does not survive a reboot. I also created /etc/rc.conf.local, with apcupsd_enable=YES.

    How do I get apcupsd working?

    tnx jk

    PfSense running on Qotom mini PC
    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
    UniFi AC-Lite access point

    I haven't lost my mind. It's around here...somewhere...

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by stephenw10 Apr 14, 2019, 8:41 PM Apr 14, 2019, 8:38 PM

      That sounds like it didn't install correctly. The first thing I would do is remove and the re-install it if you have not already.

      It installed fine a few minutes ago for me in 2.4.4p2:

      🔒 Log in to view

      Steve

      1 Reply Last reply Reply Quote 0
      • J
        JKnott
        last edited by Apr 14, 2019, 9:48 PM

        I assume that's the Services > UPS page. After uninstalling and reinstalling, I still get the same thing. I followed these directions and found the line uhid_load="YES" in loader.conf does not survive a reboot.

        Sample files and scripts are installed in /usr/local/etc/apcupsd.
        You need to modify /usr/local/etc/apcupsd/apcupsd.conf as follows:

        For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x)
        For USB cable: DEVICE (yes, leave it blank after DEVICE)

        NOTE that for USB cable you need uhid support.

        To compile this driver into the kernel, place the following line in your
        kernel configuration file:
        device uhid

        Alternatively, to load the driver as a module at boot time, place the
        following line in loader.conf(5):
        uhid_load="YES"

        Add apcupsd_enable=YES to your /etc/rc.conf[.local] to have apcupsd
        starting up at boot time.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Apr 14, 2019, 11:17 PM

          You should not need to make any changes to files manually. The underlying FreeBSD packages show that output when they install but the pfSense package handles all that for you.

          If the page is not displaying still then you have some bigger issue. It could be cached in your browser though.

          If the original download was corrupted you may need to uninstall, then remove cached pkgs using:
          pkg-static clean -ay
          Before reinstalling.

          Steve

          1 Reply Last reply Reply Quote 0
          • J
            JKnott
            last edited by Apr 16, 2019, 1:03 AM

            Problem solved. When the package was installed, it created 2 entries on the Services drop down list, one of Apcupsd and also UPS. I saw the UPS one first and that's the one that returned the 404 error. Why does it create both items?

            Next problem, while it's apparently running, it doesn't seem to be gathering much data. I also run apcupsd on my Linux system and the monitor, which displays both the USB connected (Linux) and remote UPS (firewall). The Linux computer shows a few traces on the Historical Summary tab, but the one for pfSense only shows bcharge. The status in pfSense matches the full status listed on the Linux box. I've listed the full status for both systems below. Why does the firewall status show so much less info than the Linux box? I moved the USB cables to prove the problem is with pfSense and not a hardware problem with the UPS.

            DATE : 2019-04-15 20:50:29 -0400
            HOSTNAME : firewall.XYZ.abc
            VERSION : 3.14.14 (31 May 2016) freebsd
            UPSNAME : APC BE600M1
            CABLE : USB Cable
            DRIVER : USB UPS Driver
            UPSMODE : Stand Alone
            STARTTIME: 2019-04-15 20:08:31 -0400
            MODEL :
            STATUS :
            LINEV : 0.0 Volts
            LOADPCT : 0.0 Percent
            BCHARGE : 100.0 Percent
            TIMELEFT : 493.3 Minutes
            MBATTCHG : 5 Percent
            MINTIMEL : 3 Minutes
            MAXTIME : 0 Seconds
            SENSE : Unknown
            LOTRANS : -1.0 Volts
            HITRANS : -1.0 Volts
            ALARMDEL : Always
            BATTV : 0.0 Volts
            NUMXFERS : 0
            TONBATT : 0 Seconds
            CUMONBATT: 0 Seconds
            XOFFBATT : N/A
            STATFLAG : 0x05000000
            SERIALNO :
            BATTDATE :
            NOMINV : 0 Volts
            NOMBATTV : 0.0 Volts
            END APC : 2019-04-15 20:51:09 -0400

            DATE : 2019-04-15 20:51:32 -0400
            HOSTNAME : linux
            VERSION : 3.14.14 (31 May 2016) suse
            UPSNAME : linux
            CABLE : USB Cable
            DRIVER : USB UPS Driver
            UPSMODE : Stand Alone
            STARTTIME: 2019-04-14 16:36:48 -0400
            MODEL : Back-UPS ES 600M1
            STATUS : ONLINE
            LINEV : 117.0 Volts
            LOADPCT : 18.0 Percent
            BCHARGE : 100.0 Percent
            TIMELEFT : 41.7 Minutes
            MBATTCHG : 5 Percent
            MINTIMEL : 3 Minutes
            MAXTIME : 0 Seconds
            SENSE : Medium
            LOTRANS : 92.0 Volts
            HITRANS : 139.0 Volts
            ALARMDEL : 30 Seconds
            BATTV : 13.6 Volts
            LASTXFER : No transfers since turnon
            NUMXFERS : 0
            TONBATT : 0 Seconds
            CUMONBATT: 0 Seconds
            XOFFBATT : N/A
            SELFTEST : NO
            STATFLAG : 0x05000008
            SERIALNO : 4B1830P29067
            BATTDATE : 2018-07-27
            NOMINV : 120 Volts
            NOMBATTV : 12.0 Volts
            NOMPOWER : 330 Watts
            FIRMWARE : 928.a8 .D USB FW:a8
            END APC : 2019-04-15 20:51:33 -0400

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Apr 16, 2019, 1:07 PM

              apcupsd does not install a UPS menu but the NUT package does. If you had ever installed that it might have still been present in the config.

              Steve

              J 1 Reply Last reply Apr 16, 2019, 9:29 PM Reply Quote 0
              • J
                JKnott @stephenw10
                last edited by Apr 16, 2019, 9:29 PM

                @stephenw10 said in APCUPSD - No UPS page:

                apcupsd does not install a UPS menu but the NUT package does. If you had ever installed that it might have still been present in the config.

                How does one edit config to get rid of it? Might it be causing the problem with the readings?

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by Apr 16, 2019, 10:17 PM

                  You can install and then uninstall NUT. Or you can remove the menus from the config file:

                  <installedpackages>
                     <menu>
                       Some menu 
                     </menu>
                  </installedpackages>
                  

                  Doing that is open to error though. 😉

                  Steve

                  J 1 Reply Last reply Apr 17, 2019, 12:49 AM Reply Quote 0
                  • J
                    JKnott @stephenw10
                    last edited by Apr 17, 2019, 12:49 AM

                    @stephenw10 said in APCUPSD - No UPS page:

                    You can install and then uninstall NUT.

                    That seems to have cleared "UPS" from the Services list. However, I'm still getting bad data from the UPS.

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    1 Reply Last reply Reply Quote 0
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Apr 17, 2019, 11:11 AM

                      So it shows all the data locally but not when the daemon is queried from a different client?

                      Are they running the same apcupsd version? Seems like a data formatting mismatch.

                      Steve

                      J 1 Reply Last reply Apr 18, 2019, 12:50 AM Reply Quote 0
                      • J
                        JKnott @stephenw10
                        last edited by Apr 18, 2019, 12:50 AM

                        @stephenw10 said in APCUPSD - No UPS page:

                        So it shows all the data locally but not when the daemon is queried from a different client?

                        It shows bad data both locally and on the Linux box. Both show the same data. As I mentioned, I tried moving the USB cables between UPSs, and the problem followed pfSense.

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        1 Reply Last reply Reply Quote 0
                        • S
                          stephenw10 Netgate Administrator
                          last edited by Apr 18, 2019, 2:58 PM

                          Hmm, well I guess I'd try apcupsd on a FreeBSD box next then of you can.

                          It would be good to know if that's the same version on Linux and FreeBSD though.

                          Steve

                          J 1 Reply Last reply Apr 19, 2019, 12:38 AM Reply Quote 0
                          • J
                            JKnott @stephenw10
                            last edited by Apr 19, 2019, 12:38 AM

                            @stephenw10 said in APCUPSD - No UPS page:

                            It would be good to know if that's the same version on Linux and FreeBSD though.

                            According to what I posted above, they're both the same version.

                            VERSION : 3.14.14 (31 May 2016) freebsd
                            VERSION : 3.14.14 (31 May 2016) suse

                            PfSense running on Qotom mini PC
                            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                            UniFi AC-Lite access point

                            I haven't lost my mind. It's around here...somewhere...

                            1 Reply Last reply Reply Quote 0
                            • J
                              JKnott
                              last edited by Apr 19, 2019, 5:32 PM

                              It also fails with NUT. I have also tried a different USB port and turning off legacy USB support on the motherboard. The package manager mentions a dependeny "apcupsd-3.14.14_2". Is that already installed? If so, why mention it?

                              PfSense running on Qotom mini PC
                              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                              UniFi AC-Lite access point

                              I haven't lost my mind. It's around here...somewhere...

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by stephenw10 Apr 20, 2019, 3:55 PM Apr 20, 2019, 3:54 PM

                                Next step is to test it in FreeBSD then.

                                If it fails there too the report it to the FreeBSD package maintainer.

                                Steve

                                J 1 Reply Last reply Apr 20, 2019, 7:21 PM Reply Quote 0
                                • J
                                  JKnott @stephenw10
                                  last edited by Apr 20, 2019, 7:21 PM

                                  @stephenw10

                                  I don't run FreeBSD, other than pfSense. I run Linux, where it works fine. Incidentally, I read that APC is now running MODBUS, instead of an older protocol. Might that have something to do with it?

                                  PfSense running on Qotom mini PC
                                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                  UniFi AC-Lite access point

                                  I haven't lost my mind. It's around here...somewhere...

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Apr 20, 2019, 8:30 PM

                                    Could be. My guess would be that the FreeBSD port supports some subset of the data only. But testing against FreeBSD is the only way to know that. Or reading the code...

                                    Steve

                                    J 2 Replies Last reply Apr 20, 2019, 9:27 PM Reply Quote 0
                                    • J
                                      JKnott @stephenw10
                                      last edited by Apr 20, 2019, 9:27 PM

                                      @stephenw10

                                      Unfortunately, my only experience with *BSD is pfSense and I find it frustrating compared to Linux. I understand that this may be due to pfSense running on a somewhat stripped down version of FreeBSD.

                                      Is there any log I can check that might reveal something?

                                      PfSense running on Qotom mini PC
                                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                      UniFi AC-Lite access point

                                      I haven't lost my mind. It's around here...somewhere...

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        stephenw10 Netgate Administrator
                                        last edited by Apr 20, 2019, 10:41 PM

                                        You can check /var/log/apcupsd.events but I don;t think you'll see anything new there.

                                        There are some log level options in the config file /usr/local/etc/apcupsd/apcupsd.conf

                                        You can probably start it in debug mode from the command line if the service is stopped: apcupsd -d 2
                                        Not sure if that actually shows anything extra, I can't test it.

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          JKnott @stephenw10
                                          last edited by Apr 22, 2019, 9:29 PM

                                          @stephenw10 said in APCUPSD - No UPS page:

                                          Could be. My guess would be that the FreeBSD port supports some subset of the data only. But testing against FreeBSD is the only way to know that. Or reading the code...

                                          Steve

                                          I just plugged in an older model APC UPS and it now works. The old model is a " Back-UPS ES 500". So, there is something different in the protocol between old and new that keeps apcupsd and NUT from working with the new UPS. BTW, I had previously used NUT with this old model and it worked fine. As I mentioned, the new UPS works fine with Linux.

                                          PfSense running on Qotom mini PC
                                          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                          UniFi AC-Lite access point

                                          I haven't lost my mind. It's around here...somewhere...

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