this post was submitted on 17 Jul 2025
15 points (100.0% liked)

homelab

8359 readers
1 users here now

founded 5 years ago
MODERATORS
 

I've installed an APC BX950MI-GR and connected it to my Proxmox server via USB. It works: it turns off the server after x minutes after the power loss and it gets turned off by the command upsdrvctl shutdown, when the powers come back on, the UPS turns on and so does the server. The problem is if the power comes back after the server receive the power off signal and before the UPS powers off, in this case the UPS simply goes back in the normal state and the server...stays off. How can I turn it back on? Thanks!

top 15 comments
sorted by: hot top controversial new old
[–] hyacin@lemmy.ml 6 points 5 days ago

In all seriousness though this is actually a really good question, and something I never realized, but do also face myself with my setup!

[–] digdilem@lemmy.ml 7 points 6 days ago (1 children)

You would need a third device monitoring both for this edge case. Once the server has been told to shut down, it's going to shut down.

The third device (also on the UPS, like an Rpi or ESP) can then check for power availability through the UPS and whatever logic you want to apply, can then use wake on lan to the server to power it up once it shuts down.

[–] peregus@lemmy.world 2 points 6 days ago (4 children)

I did think about that option, but the onboard NIC is connected to the ONT (fiber connection) and the SFP+ is off when the server is off so it can't receive WOL packets. By the way, thanks.

[–] Darkassassin07@lemmy.ca 2 points 3 days ago (1 children)

If you use an RPI as the third device, you can use one of the GPIO pins to trigger a transistor connected in parallel with the servers power button. The pi can then (re)start the server on command.

[–] peregus@lemmy.world 2 points 1 day ago* (last edited 1 day ago) (1 children)

I think that I'll go this way, thanks. I don't have transistors, but I have a 2 relay Ethernet board.

[–] Darkassassin07@lemmy.ca 2 points 1 day ago (1 children)

I ran a setup like this for a couple years. Super handy being able to literally press the power button remotely; especially when/if the system hangs and becomes unresponsive.

[–] peregus@lemmy.world 1 points 1 day ago

I've just bought and connected to it a JetKVM, when I saw an RJ11 port, I thought that it could have been used to "push" those buttons, but instead it's a serial port ☹️

[–] bri@lemmy.ml 2 points 5 days ago (1 children)

If you’ve got SFP+ onboard it sounds like you have a relatively serious server. Does it have IPMI? You could have a low power device like a Pi issue and IPMI command to power on.

[–] peregus@lemmy.world 1 points 5 days ago

Negative, it's "just" an HP Elitebook with a PCIe SFP+ board.

[–] digdilem@lemmy.ml 2 points 6 days ago (1 children)

You have no local network access to it at all? (WOL will work across the subnet, you don't need to connect directly to it)

If genuinely not (and I'd be surprised if that is the case) add another nic of any sort (cheap) for WOL, or use something like Switchbot?

[–] peregus@lemmy.world 2 points 6 days ago

Only through SFP+ I think that the only option would be to add a second NiC. Thanks!

[–] dan@upvote.au 2 points 6 days ago* (last edited 6 days ago)

Can you add a second NIC? Should be able to find a Gigabit one for less than $15 or a 2.5Gbps one for $25-40.

[–] Cyber@feddit.uk 1 points 5 days ago (1 children)

What's an average power outage duration?

I'd look at changing the shutdown command from shutdown to something like rtcwake -s 3600 to restart the server in ... 1 hour?

You will probably need to play with that command a bit, but I use it for my NAS to autostart at certain times of the day.

[–] peregus@lemmy.world 2 points 4 days ago (1 children)

It depends, usually just some minutes, but during the summer it could be more. I'd like (the ideal result) to find a way that just works in any case.

[–] Cyber@feddit.uk 1 points 4 days ago

Yeah, I get that... I'd be the same

So... are you shutting down after x minutes, or, NUT's signalling to shutdown when the battery is getting low, which is x minutes. (If you see my point) - if the battery still has plenty of capacity, maybe extend the runtime and that might be enough to ride through at least some outages?