What's new

managing a UPS over a network

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

zero7404

Regular Contributor
i have a cyberpower CP600LCD UPS.

when it is directly attached to my computer via usb, i can use Powerpanel Business Edition (ppbe) to access the UPS dashboard and manage it. unfortunately this UPS is not a network enabled UPS, so it does not have it’s own NIC and no built-in web gui. ppbe software installed on the client is needed to access the dashboard and change it’s behaviors, settings and monitor event logs.

reason i’m posting in this NAS forum is because I have a wd ex series NAS, which has basic NUT installed, but not much can be configured wrt the UPS when i connect it to the NAS’s usb port. The NUT is simply setup to trigger NAS shutdown when the UPS tells it that the battery level is at 10%.

10% battery reserve is really at the nail-biting end of things, with respect to the UPS because at the 10% mark, its only a matter of 1 min or so before the battery dies, not giving much opportunity for the NAS to shutdown properly.

i wanted to access the UPS dashboard from the computer that has ppbe installed when the UPS is connected to the NAS (usb).

so what i’m looking for is some ideas in terms of USB over IP. there is only one NAS app i found that i can install called virtualhere, but it’s a paid app. in addition to that, i’ve tried it but big sur client side is not supported. it still works to show me the usb devices connected to my NAS and displays the UPS model number in the list of devices, but ppbe will not communicate with it.

any way to use NUT commands (ssh) to adjust when the NAS will start shutdown ? for instance, as soon as the UPS tells it utility power is lost, shutdown the NAS gracefully.
 
i know this is a complicated way to try and manage a UPS device remotely, just wondering if anyone has tips/suggestions

maybe the only option is a network managed UPS …
 
Nut does have a UI for some NAS firmware. For example, on a RPi, I can see many details. You might need to connect to your NAS UI to check the status, but how frequently does that happen (mine are pretty much set-and-forget, though I do have email notifications set up to tell me when each of my UPS's go off-line - onto battery - back on-line - on mains - and when charging is complete). All my UPS's are either connected to NAS, RPi's or routers.

For those settings that cannot be edited through the UI, I beleive that most of them can be edited in the nut conf file, after which you would restart the service.

On my APC, most of the settings are stored on the UPS (in non-volatile memory I presume), so when I disconnect they are still present. I'm pointing this out because it's likely you can set up the unit using the GUI app and then simply use nut to monitor the settings and process shut-down.
 
thanks for this info, could you kindly point me to a guide on how to modify the conf file ?

i would have to do that via ssh on my NAS

unfortunately the NAS is barebones and UI does not support any kind of parameter settings for what to do when the UPS signals it is running on battery. its simply setup to default of 10% which is just cutting down to a minute or less of power and afraid thats not enough power to perform the NAS shutdown.

my UPS (Cyberpower CP600LCD), doesnt have memory or maintain its own gui, no network card capability. so the only way to truely manage it is to connect my laptop running powerpanel via usb.

for me, best option now is to update the conf file, perhaps tell NUT to start shutdown of my NAS 3 minutes after it gets the signal that mains power is down.

the UPS keeps on powering until it drains out, to keep my router and modem alive, so its also a good idea to tell NUT NOT to reboot the NAS when it senses power again.
 
rethinking my logic … i think that UPS’s are designed to kill battery power by default, and that would mean the NAS does not sense power input and will not reboot automatically which is what i don’t want to do.

if that behavior can be changed in NUT conf, great. otherwise i would fall back on setting up 2 separate UPS’s, where one of them is dedicated to the NAS and i could let it cutoff battery power after graceful shutdown of the NAS.

the other UPS would run till battery drain, to power router, modem, switch. i know i can get about 30-45 mins of juice from the battery and when it dies there’s no danger of corrupting any of those units.
 
thanks for this info, could you kindly point me to a guide on how to modify the conf file ?
Sure. I start here: https://networkupstools.org/index.html

Also, this might be helpful (shows a barebones UI): https://mn3m.info/posts/configure-ups-monitor-using-nut-on-debian/

Otherwise, try googling for NUT on your OS (arch or debian seem most popular for servers).

unfortunately the NAS is barebones and UI does not support any kind of parameter settings for what to do when the UPS signals it is running on battery. its simply setup to default of 10% which is just cutting down to a minute or less of power and afraid thats not enough power to perform the NAS shutdown.
Nut should be able to issue a command to tell the server to shut down gracefully. I know APCUSB does this - honestly I use APCUSB more often and NUT for monitoring a non-APC UPS that serves my utility-monitoring RPi.
my UPS (Cyberpower CP600LCD), doesnt have memory or maintain its own gui, no network card capability. so the only way to truely manage it is to connect my laptop running powerpanel via usb.
I don't believe that many UPS's have built-in UI; that's the function of the app or server. So that's not unusual.
for me, best option now is to update the conf file, perhaps tell NUT to start shutdown of my NAS 3 minutes after it gets the signal that mains power is down.

the UPS keeps on powering until it drains out, to keep my router and modem alive, so its also a good idea to tell NUT NOT to reboot the NAS when it senses power again.
These are settings that you'll identify based on your use. For servers I have the UPS issues a shutdown command when there's 15 minutes of power left on the UPS (because 15 minutes is probably a range between 0 and 30).
rethinking my logic … i think that UPS’s are designed to kill battery power by default, and that would mean the NAS does not sense power input and will not reboot automatically which is what i don’t want to do.
Depending on the UPS, some models *do not* automatically restart when power is restored if they have shut down. Many cheap UPS's do not have this functionality meaning you need to power them back on manually after a power failure that depletes the battery. All but one of my UPS's have to be manually restarted, but that's fine for my use case. If you are trying to manage these remotely, that would be a much bigger concern.
if that behavior can be changed in NUT conf, great. otherwise i would fall back on setting up 2 separate UPS’s, where one of them is dedicated to the NAS and i could let it cutoff battery power after graceful shutdown of the NAS.

the other UPS would run till battery drain, to power router, modem, switch. i know i can get about 30-45 mins of juice from the battery and when it dies there’s no danger of corrupting any of those units.

I'm not sure I'm understanding - are you considering serial UPS's? A UPS for a UPS to preserve NAS state? I'd probably just spend the money on a bigger or better UPS.
 
thanks for those, ill read up on the links to get up to speed.

what i meant was that i have 2 UPS’s at my disposal. an APC BE550G and a Cyberpower CP600LCD. i could install them with each one connected to mains power. I would reserve one alone for my NAS, and try to configure NUT to do proper shutdown at some comfortable percentage of battery power left and finally shut down its battery bank after that happens. i think that can be done with NUT on the server (NAS).

the other one would be a dumb/blind one that has no usb connection to any host and so will just keep supplying power until the battery is dead. it would serve modem/router/switch and other network/LAN related devices that don’t have storage that can be corrupted (non-critical).

Cyberpower has a UPS line (PR750LCDRT) that has critical/non-critical banks as separate where the critical side can be configured separately from the non-critical side. but those as well would need a network card expansion to allow me to configure it from anywhere in my LAN.

sadly i have limited hardware and i can’t do what I want with it easily. ideally i would choose both a nas upgrade and a ups upgrade, but prefer a nas upgrade to benefit from advanced raid as well as have more control over how to respond to UPS events. that would be the solution ultimately.

in the meantime maybe i can mess around with NUT to get it to work the way I want.

simple notions of mine that turned out to be more complicated to do with what i have.

in the past, i would manually shutdown the NAS from its dashboard if the power went out and happen to be home. no usb or network connection to the UPS.
 
thanks for those, ill read up on the links to get up to speed.

what i meant was that i have 2 UPS’s at my disposal. an APC BE550G and a Cyberpower CP600LCD. i could install them with each one connected to mains power. I would reserve one alone for my NAS, and try to configure NUT to do proper shutdown at some comfortable percentage of battery power left and finally shut down its battery bank after that happens. i think that can be done with NUT on the server (NAS).

the other one would be a dumb/blind one that has no usb connection to any host and so will just keep supplying power until the battery is dead. it would serve modem/router/switch and other network/LAN related devices that don’t have storage that can be corrupted (non-critical).
Ah, I see. Depending on your router, you may be able to at least monitor (IIRC nut is an entware package that could be installed onto some routers, including those running AsusWRT Merlin). I don't know if this implementation would support shutdown or other advanced features (my UPS on my router is served by an RPi that also acts as a PBX, so it handled by the PBX, and like you, I let it run down to zero to keep my connectivity up as long as possible - about 3 hours).
Cyberpower has a UPS line (PR750LCDRT) that has critical/non-critical banks as separate where the critical side can be configured separately from the non-critical side. but those as well would need a network card expansion to allow me to configure it from anywhere in my LAN.

sadly i have limited hardware and i can’t do what I want with it easily. ideally i would choose both a nas upgrade and a ups upgrade, but prefer a nas upgrade to benefit from advanced raid as well as have more control over how to respond to UPS events. that would be the solution ultimately.

in the meantime maybe i can mess around with NUT to get it to work the way I want.

simple notions of mine that turned out to be more complicated to do with what i have.

in the past, i would manually shutdown the NAS from its dashboard if the power went out and happen to be home. no usb or network connection to the UPS.
To be clear I'm picturing that each of these UPS's also has a USB connection that supports connectivity and could trigger action (e.g., server shutdown). There are probably enterprise-level UPS's that are designed solely for network connectivity, but I've never had one of those ;)
 
i would only really care to focus on the usb comms between the ups and the NAS. a second ups can tag along as dumb and i would know its good to run the 40-50W load for a while.

i was able to locate my ups.conf file, but its largely empty when i look in it using vi (screenshot).

would i add arguments like these to the file ?

override.battery.charge.low = 50
override.battery.runtime.low = 300

the device usbhid is my cyberpower ups as confirmed by upsd -l
 

Attachments

  • 1A91033F-7E81-43FC-8B9E-2B14D9C319D1.png
    1A91033F-7E81-43FC-8B9E-2B14D9C319D1.png
    173.5 KB · Views: 130
i did a test and pulled the main to let the UPS do it’s thing, with about 45W total load the UPS ran for roughly 25 mins.

but to my surprise and dismay – the EX2 – although it was receiving signals and registering them in the alerts on the dashboard – did not do an orderly shutdown after the battery reserve notification of 15%. as a matter of fact, it did not shut itself down at all and i suspect that it sent a kill power message to the UPS because as soon as the UPS died, so did the NAS. up until that point, all lights on the NAS were solid blue and the dashboard was active/accessible.

my unfortunate mistake to believe that even though the EX2 has a NUT installed, it was never configured to shutdown the NAS properly !! very very disappointed that I must have to ‘hack’ the NUT and try to figure out what’s going on with this unit – let alone why WD just won’t add a feature in the dashboard to allow a user to set a NAS shutdown control such as a time lapse or a percentage of power remaining. I know the UPS was doing it's job and sending status messages to the NAS while on battery power.

i’m speechless …
 
I don't know the actual feasibility, but some NAS units allow you to run containers/docker (qnap, Synology,etc) where it *may* be possible to run your existing client app.
 
there is one more thing i could explore, but ultimately am just going to roll dice and rely on my router’s vpn and emails from the nas when the power goes out i would access my private vpn to manually shut down tne nas. i guess to the credit of this pos wd brand, it does a good job notifying me via email instantaneously when a power event takes place.

the one thing i could explore is virtualhere client on windows as well as ppbe on windows. the developer said that the client for mac does not support big sur and that will be my last release of mac os i plan to use in the near term. so i’d see if it works in windows.

the underlying issue with this is that i dont have a dedicated server that is always running the client software to monitor events and execute the shutdown triggers that i want. so a ‘dumb’ ups will just do its thing, and the NAS’s NUT is not even configured properly and can’t be modified in a read only filesystem.

i look forward to just upgrading my nas this year, i know that qnap and synology stuff works and out of the box software will let me do the simple task of shutting down the nas properly with the parameter i specify
 
I don't know the actual feasibility, but some NAS units allow you to run containers/docker (qnap, Synology,etc) where it *may* be possible to run your existing client app.
thats interesting. how do containers work, or are they vm’s ?

in theory, the ups agent running inside a vm on the nas would be a full-time, always on configuration so that i dont have to dedicate a physical computer to the ups. the ups agent works in a browser and it would need the local host ip in order to find the connected ups, not sure how that would work for a vm running inside of the local host itself ?

that would be a nice to have option if i could run a linux vm within the nas to just keep an eye on the ups events all the time.

thanks tor suggesting the idea, its very interesting and worth considering a qnap or syno in addition to native ups conf capabilities they have
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top