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

    Apcupsd bug?

    Scheduled Pinned Locked Moved UPS Tools
    7 Posts 4 Posters 1.0k 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.
    • J
      jpetovello
      last edited by

      Seems that the widget has a bug

      pfsense_ups.png

      F J S 3 Replies Last reply Reply Quote 0
      • F
        flat4 @jpetovello
        last edited by

        @jpetovello Notice than on mine too, battery is about a year old but it tells me its 5 years old.

        1 Reply Last reply Reply Quote 0
        • J
          jrey @jpetovello
          last edited by jrey

          @jpetovello

          I noticed this too

          1. set the values where the text appears (should be numeric) there was some discussion a year or so ago (I'm not able to locate at this time)

          Screen Shot 2023-09-26 at 12.37.28 PM.png

          1. The battery age. I had grabbed an old UPS that I had around and yes the battery was old. Changed the battery and it still reported as old. You can check that on the status tab here

          Screen Shot 2023-09-26 at 12.43.36 PM.png

          The old APC550 I'm using doesn't reset the date when you change the battery. So the date needs adjusting manually and I was able to do that from the command line

          this is from memory and work on a 22.05 release, I'm on 23.05.1 now and haven't had the need to replace the battery, but the commands "should be" the same.

          ssh into the netgate device (get to the shell prompt) 
          stop the apcupsd daemon by running "/usr/local/etc/rc.d/apcupsd.sh stop"
          run apctest application "/usr/local/sbin/apctest"
          select view/Change battery date
            system will display current battery date and prompt 
          select q to exit the apctest 
          restart the apcupsd daemon by running "/usr/local/etc/rc.d/apcupsd.sh start"
          

          run the status report again verify the new BATTDATE
          the widget should now also have the "correct age"

          F J 2 Replies Last reply Reply Quote 1
          • F
            flat4 @jrey
            last edited by

            @jrey if I had only known, i got mine corrected.

            1 Reply Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @jpetovello
              last edited by

              @jpetovello I may have been on the mentioned thread but I don't have a URL. After changing my UPS date I got this error text in the fields:

              Project-Id-Version: PACKAGE VERSIONReport-Msgid-Bugs-To: MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitPO-Revision-Date: 2019-05-09 10:22+0000Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>Language-Team: English (United States)Language: en_USX-Generator: Zanata 4.6.2Plural-Forms: nplurals=2; plural=(n != 1)
              

              ...so possibly related to the change to PHP 8. Can't find a redmine in a very quick search.

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote 👍 helpful posts!

              J 1 Reply Last reply Reply Quote 0
              • J
                jrey @SteveITS
                last edited by jrey

                @SteveITS

                for clarity they are two different issues
                the first being the conversion of the data in the fields. (yes, likely during an upgrade when the system went up to the php8 versions) However once that data is corrupt, the only way I could find to fix it was to simply type in numeric values. (make sure you get all text out, as I recall there were hidden characters) These are just values representing event tigger points. The only one that has been "tested" is actually the "Charge Levels", due to a recent extended power outage it tripped at 50 and 15 as shown in my settings above before everything was safely shutdown for the planned outage. System has been through at least 2 subsequent system upgrades with no new issues.

                and the second being the age of the battery being displayed. In my case, the unit does not/ did not reset just by changing the battery. (which is not a problem with pfSense as such.) Just needed to be set manually.

                I'm on 23.05.1 and apcupsd is at 0.3.92_1

                Edit: just as an FYI the Timeline of my system updates. (from boot environment dates and battery dates:
                the battery was changed in late Jan 2023
                Boot environment recorded
                Base Version 22.05 Auto created by update Feb 16 2023
                Base Version 23.01 Auto created by update May 24 2023
                Base Version 23.05 Auto created by update Jun 29 2023
                Base Version 23.05.1 the current "default"

                not 100% certain, but as I recall the data fields became corrupt with the update from 22.05 to 23.01. (I think)

                1 Reply Last reply Reply Quote 0
                • J
                  jpetovello @jrey
                  last edited by

                  @jrey Thank you so much, your information fixed both issues.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S stephenw10 moved this topic from pfSense Packages on
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.