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

    Some questions about APCUPSD

    Scheduled Pinned Locked Moved pfSense Packages
    14 Posts 2 Posters 1.4k 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.
    • W
      WhiteTiger-IT
      last edited by

      The APCUPSD Package works and turns off the Firewall when needed.
      I have some questions:

      1. Is Halt or PowerOff better? I would like PFSense to come back on when the power returns.
      2. On Windows and Linux PCs I need to install an agent, but how do I configure it? By entering the LAN IP of PFSense?
      3. What is NIS for? And how should I configure these parameters?
        Thanks in advance.
      fireodoF 1 Reply Last reply Reply Quote 0
      • fireodoF
        fireodo @WhiteTiger-IT
        last edited by

        @whitetiger-it said in Some questions about APCUPSD:

        Is Halt or PowerOff better? I would like PFSense to come back on when the power returns.

        I guess it depends on the machine - If your machine is configured in BIOS to start when power returns than I would choose PowerOff.

        On Windows and Linux PCs I need to install an agent, but how do I configure it? By entering the LAN IP of PFSense?

        Windows and Linux are diferent: on Linux you have to configure the apcupsd.conf :
        UPSTYPE net
        DEVICE "IP of your pfsense":3551
        On the Windows Agent you have to say that the UPS is a net-device and also point to the pfsense IP.

        Hope that helps,
        Regards,
        fireodo

        Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
        SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
        pfsense 2.8.0 CE
        Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

        W 1 Reply Last reply Reply Quote 1
        • W
          WhiteTiger-IT @fireodo
          last edited by

          @fireodo
          On Windows I have installed and configured the agent with winapcupsd-3.14.14.exe, but it keeps giving me network error.
          Being in the LAN I don't think port 3551 should be opened.
          Or maybe it is the packet on PFSense that is not sending messages over the LAN.

          fireodoF 1 Reply Last reply Reply Quote 0
          • fireodoF
            fireodo @WhiteTiger-IT
            last edited by

            @whitetiger-it said in Some questions about APCUPSD:

            On Windows I have installed and configured the agent with winapcupsd-3.14.14.exe, but it keeps giving me network error.
            Being in the LAN I don't think port 3551 should be opened.
            Or maybe it is the packet on PFSense that is not sending messages over the LAN.

            Hmmm, its working here without problems as I described - maybe there is something different in your LAN ...

            Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
            SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
            pfsense 2.8.0 CE
            Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

            W 1 Reply Last reply Reply Quote 0
            • W
              WhiteTiger-IT @fireodo
              last edited by

              @fireodo
              I set a new rule in LAN area.

              Source LAN Net
              Destination LAN Address with port 3551

              Now in Win10 the agent is OK.

              fireodoF 1 Reply Last reply Reply Quote 0
              • fireodoF
                fireodo @WhiteTiger-IT
                last edited by

                @whitetiger-it said in Some questions about APCUPSD:

                Now in Win10 the agent is OK.

                All right! 👍

                Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                pfsense 2.8.0 CE
                Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                W 1 Reply Last reply Reply Quote 0
                • W
                  WhiteTiger-IT @fireodo
                  last edited by

                  @fireodo
                  I have installed APCUPSD on a PC with Xubuntu 20.04.
                  The configuration seems correct to me because if I type in the terminal the command apcaccess status the status of the UPS is listed.
                  However, while on Win 10 there is an icon in the Tray that signals the status of the UPS, on Xubuntu I don't see anything.
                  Do you need to install any other packages?
                  Is the shutdown on the PC automatically managed by APCUPSD or do I need to create a script?

                  fireodoF 1 Reply Last reply Reply Quote 0
                  • fireodoF
                    fireodo @WhiteTiger-IT
                    last edited by

                    @whitetiger-it said in Some questions about APCUPSD:

                    Do you need to install any other packages?

                    I'm not aware of a graphical interface for apcupsd on Ubuntu. Only CLI.

                    Is the shutdown on the PC automatically managed by APCUPSD or do I need to create a script?

                    You get an advertisement so you can shutdown your PC. For automatic shutdown you have to create a script.

                    Have a fine day,
                    fireodo

                    Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                    SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                    pfsense 2.8.0 CE
                    Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                    W 1 Reply Last reply Reply Quote 0
                    • W
                      WhiteTiger-IT @fireodo
                      last edited by

                      @fireodo
                      I have not seen any advertisement .
                      I'll try better or insert a popup message in a script.
                      Are there any scripts on the net to use already?

                      Another question about your Widget in PFSense.
                      I see under Runtime: 5.7 Minutes Battery Age 561 Tage.
                      I guess the 5.4 minutes is relative to battery life with this load, but what is TAGE?

                      fireodoF 1 Reply Last reply Reply Quote 0
                      • fireodoF
                        fireodo @WhiteTiger-IT
                        last edited by fireodo

                        @whitetiger-it said in Some questions about APCUPSD:

                        Are there any scripts on the net to use already?

                        That you have to search ...

                        Another question about your Widget in PFSense.
                        I see under Runtime: 5.7 Minutes Battery Age 561 Tage.
                        I guess the 5.4 minutes is relative to battery life with this load, but what is TAGE?

                        Oh, my fault Tage (german) = Days
                        (if you want you can change in the apc_usv.widget.php in line 155 "Tage" with "Days" - I forgot to translate this)

                        Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                        SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                        pfsense 2.8.0 CE
                        Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                        1 Reply Last reply Reply Quote 1
                        • W
                          WhiteTiger-IT
                          last edited by WhiteTiger-IT

                          @fireodo
                          Sorry if I still bother you.

                          I have created two executable scripts, "/etc/apcupsd/onbattery" in Linux and "c:/apcupsd/etc/apcupsd/onbattery.bat" in Win10 (configured as Slave).
                          The scripts work, but they don't run when I turn off the power and the UPS changes status.
                          Both Win10 PCs and Linux PCs (Ubuntu and Xubuntu) detect the status and it is reported in apcupsd.events. In Win10, the Windows pop-up is also displayed.
                          After the foreseen minutes, the PCs shut down correctly.
                          So everything is working, except the custom messages.

                          What should throw them?
                          In Win10 it should be apccontrol.bat and in linux apccontrol.
                          I'm not very experienced, but reading the code of these two files my opinion is that apccontrol doesn't even start.

                          fireodoF 1 Reply Last reply Reply Quote 0
                          • fireodoF
                            fireodo @WhiteTiger-IT
                            last edited by

                            @whitetiger-it said in Some questions about APCUPSD:

                            What should throw them?

                            I guess you need something like this Wall

                            Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                            SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                            pfsense 2.8.0 CE
                            Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

                            W 1 Reply Last reply Reply Quote 0
                            • W
                              WhiteTiger-IT @fireodo
                              last edited by

                              @fireodo
                              The Wall is for displaying messages to logged in users.
                              I have to display pop-ups, send an email and send a message with Telegram. So I have to use a script, but I can't get it to start when the state changes.
                              I've reread the documentation again, but I don't understand where I'm wrong.

                              fireodoF 1 Reply Last reply Reply Quote 0
                              • fireodoF
                                fireodo @WhiteTiger-IT
                                last edited by

                                @whitetiger-it said in Some questions about APCUPSD:

                                I have to display pop-ups, send an email and send a message with Telegram. So I have to use a script, but I can't get it to start when the state changes.

                                Sorry - I have no Idea ...

                                Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
                                SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
                                pfsense 2.8.0 CE
                                Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

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