Skip to content

Using NUT to monitor a CyberPower UPS in pfSense

This post is probably of interest only to me, and I'm posting it just because I'm getting tired of remembering where I stored this tidbit on my Mac.

Our home router is a Protectli box running pfSense firewall/router software; the Protectli box is connected to a CyberPower UPS. Within pfSense, you can install the Network UPS Tools package (called NUT in pfSense) to monitor and report on the UPS; here's how it looks in the overview screen:

After recently updating to a newer Protectli box, however, all I saw was a message that read "Cannot communicate with UPS" (or something close to that). I knew I had a fix for this issue somewhere, but I couldn't remember where. Today I found it, so also today, it goes on my blog so I'll always know where it is…

If there happens to be more than one person out there with my setup, and your CyberPower UPS isn't talking to the NUT plug-in in pfSense, here's the fix:

  1. Login via Terminal to the pfSense box, then use item (8) to exit to the shell.
  2. Run these two commands:
    $ /usr/local/sbin/upsdrvctl -u root start
    $ service devd restart
  3. Exit the connection to your pfSense box.

Once I did the above, communications were restored and the status box returned.

15 thoughts on “Using NUT to monitor a CyberPower UPS in pfSense”

  1. Thanks for this, recently upgraded my install of pfSense and it broke my connection to my CyberPower UPS. This resolved it.

    I entered the commands from the Diagnostics->Command Prompt option as it wasn't easy to get access and easier from my desk. :-)

    Just thought I'd let you know it was worth posting this.

    1. No idea why—mine usually stays connected after I do the above. I'll see if it breaks again when I install the 2.7 update this weekend.

      -rob.

  2. Awesome! Thanks, exactly fixed my issue. Now to research to understand what those commands actually do. :)

  3. Thanks for sharing this. An old APC UPS was replaced with a new CyberPower UPS and after uninstalling the APC package and installing the NUT package it wouldn't start. The commands that you mentioned fixed the problem and were entered from the GUI Diagnostics->Command Prompt option.

  4. Thanks for the post.

    Do you get e-mail notifications from pfSense when the UPS is on batter? There is a setting for that but somehow it doesn't work for me.

    1. We haven't had a power outage just yet, and I don't recall what happened the last time we did. With winter approaching, though, I expect it'll be tested again soon ... I'll try to remember to post when it does. (Yes, I could just pull the plug, but it's more complicated than that as I have things in the UPS that aren't on the battery that I don't really want to shut down just for a test.)

      -rob.

  5. I just reinstalled pfSense with my old config to switch to zfs and was confused about why my UPS wasn't showing up. Yours was the first search result and solved it! Thanks so much for posting!

Leave a Reply

Your email address will not be published. Required fields are marked *