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

    NUT server and UPS general question

    Scheduled Pinned Locked Moved General pfSense Questions
    71 Posts 6 Posters 15.1k 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.
    • dennypageD
      dennypage @netboy
      last edited by dennypage

      @netboy Okay, that looks much better.

      Now add this

      [monuser]
      password = secret
      upsmon slave
      

      to "Additional configuration lines for upsd.users" in the Advanced settings section.

      Now go to this post and follow the instructions to allow access to the NUT port from the LAN interface. I recommend that you choose option 1.

      Following that, you can confirm operation by going to the pi and executing the following command:

      upsc ups@192.168.0.1
      [Based on prior posts, I am assuming that 192.168.0.1 is the LAN IP address of your pfSense firewall]

      When you run the upsc command, you should see all the variables of your UPS displayed.

      Lastly, for the pi end, put this in upsmon.conf:

      MONITOR ups@192.168.0.1 0 monuser secret slave
      
      N 1 Reply Last reply Reply Quote 0
      • N
        netboy @dennypage
        last edited by

        @dennypage I guess the MONITOR must be like below (see bold) - correct - Probably you have a typo?

        MONITOR ups@192.168.0.1 0 monuser secret slave

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

          @netboy said in NUT server and UPS general question:

          I guess the MONITOR must be like below (see bold) - correct - Probably you have a typo?
          MONITOR ups@192.168.0.1 0 monuser secret slave

          You are correct. I copied and pasted from another example. Sorry about that.

          1 Reply Last reply Reply Quote 1
          • N
            netboy @netboy
            last edited by netboy

            @netboy SUCCESS!!!
            I had to make an entry in hosts.conf for pi

            MONITOR ups@192.168.0.1 "Netgate UPS"

            Worked. I sincerely thank you very much for all your help.

            78615beb-e3c2-490f-875b-1dd8a6701e5a-image.png

            40ab2772-3bf9-4ea7-b00d-1628d03d2e06-image.png

            2ee9ecff-1377-4705-931c-7944d892a69b-image.png

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

              @netboy Probably last question....

              I want to shutdown everything attached to ups in netgate only when "battery low" in ups - How do I configure this functionality

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

                @netboy said in NUT server and UPS general question:

                I want to shutdown everything attached to ups in netgate only when "battery low" in ups - How do I configure this functionality

                Well, you are in luck... that is the default behavior of NUT. ๐Ÿ˜Š

                Anything else connected to the UPS that is capable of running NUT would monitor the master on pfSense just like the setup you did for the pi, with the exception being that they would use power value 1 rather than power value 0. Like so:

                MONITOR ups@192.168.0.1 1 monuser secret slave
                

                All the hosts will shut down when the UPS declares a low battery situation. You can read more here.

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

                  @dennypage ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

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

                    @netboy Since synology also uses NUT I am struggling to MONITOR the same using raspberry pi..... Created a user in

                    /usr/syno/etc/ups/upsd.users

                    [monslave]
                    password = xxxxxx
                    upsmon slave

                    Opened port 3493

                    Included entries in pi upsmon.conf :
                    MONITOR ups@{syn IP} 0 monslave xxxxxx slave

                    and hosts.conf:
                    MONITOR ups@{syn IP} "Synology UPS"

                    But get "access error"
                    bd87feab-8994-4038-a729-20469841a76f-image.png

                    7d18fd49-1f59-4914-ac48-198b00f230c2-image.png

                    Any suggestions....

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

                      @netboy Synology uses a hard-coded username/password for remote NUT access. You can either use their hard-coded values for monitoring (strongly recommended), or try to hand edit Synology's generated files. Note that if you go the hand-edit route, the files will overwritten by DSM whenever an OS update occurs and you will need to re-edit the files.

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

                        @dennypage I used the built in user and configured my raspberry pi upsmon.conf as follows

                        MONITOR ups@{syn IP} 1 monuser secret slave
                        [used 1 above ok?]

                        Tried this as well [ 0 ] with same results.
                        MONITOR ups@{syn IP} 0 monuser secret slave

                        Tried pinging from raspberry pi and get the access denied mesg:

                        root@raspberrypi:/home/piNUT# upsc ups@{syn IP}
                        Init SSL without certificate database
                        Error: Access denied

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

                          @netboy Never mind was able to mine your forum and I found a post from you here

                          "egardless of the username/password, if you host on the Synology, you need explicitly list the IP address of pfSense in the list of permitted remote hosts in the Synology (Control Panel -> Hardware & Power -> UPS). This may have been why you were getting permission denied previously."

                          And now it works!

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

                            @netboy

                            And now it works!

                            ๐Ÿ˜Š

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

                              @dennypage I have to really thank you very much for such quick feedbacks in this forum. I have learned a lots from you and NUT documentation.

                              Here is my finale!

                              fa66f864-cd96-468e-b941-4177fa30c17a-image.png

                              Need to drink scotch now....Bye

                              dennypageD 1 Reply Last reply Reply Quote 2
                              • dennypageD
                                dennypage @netboy
                                last edited by

                                @netboy Youโ€™re welcome. Glad you got everything working.

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