How to Shut Down When UPS Power Drops
Power Manager can shut down your Mac when the remaining power of an Uninterruptible Power Supply (UPS) drops to a critical level. This recipe walks through how to set this up.
An uninterruptible power supply provides an extra level of protection for a Mac. Used in environments where power cuts are frequent or where sudden loss of power risks critical systems, UPS devices are essential. A UPS typically provides a few minutes of power to keep systems up and running. During this time your Mac can gracefully stop critical systems and be shut down cleanly.
Power Manager provides triggers and conditions to craft events to ease those frantic moments when the power fails. You can create multiple events triggered at different stages of the power failure.
You might create an event that warns of the power cut and that the UPS is being relied upon. Another event might start closing critical systems once battery’s remaining power has reached 50%. A final event might shut down as the power drops to 30% remaining.
This recipe will create an event that uses the power remaining trigger and a power state condition to check the UPS is being relied upon, before shutting down the Mac.
Create a UPS Event
The event we want to create is not represented by a Schedule Assistant task. We are going to have to create the event in parts.
Create a Shut Down Event
The first part creates an event to shut down your Mac. We will modify this event in the second part.
- Launch Power Manager.app
- Click Add… to create a new event
Click Add… to create the event
- Select the Power off task
Select the Power off task
- Continue to the What and When step
- Select Shut Down for What should be performed?
- Adjust When should it be performed? to a date in the past
Adjust the what and when settings
- Continue to the Why step and describe your event
Name and describe the event
- Continue and Add the event.
Confirm the event should be created
The event has been created
The basic shut down event is ready but will never be triggered - the date is in the past.
Add a Power Remaining Trigger
In this second part we will replace the event’s trigger. To do this we need to use the event editor.
- Hold down the Option key and double-click the event; the event editor will appear
Open the event in Power Manager’s event editor
- Delete the trigger; Trigger Action Cog > Delete…
Delete the date and time trigger
Event with no triggers
- Add a Battery 30% left trigger; Add a trigger > Power Remaining > Battery 30% left
Add a power remaining trigger
Event with added power remaining trigger
- Edit the new trigger; Trigger Action Cog > Edit
Edit the power remaining trigger
Select USB Connected Power Supply for Filter
Apply to save changes to the trigger
Add a Power State Condition
In this final part we will add a condition to ensure battery power is being relied upon before starting the shut down.
- Add a Using Battery condition; Add a condition > Power State > Using Battery
Add a power state condition
- Edit the new condition; Condition Action Cog > Edit
Edit the power state condition
- Add the optional Filter; Optional > Filter
Add the optional Filter to the condition
- Select USB Connected Power Supply for Filter
Select USB Connected Power Supply for the Filter
- Apply to save changes to the condition.
Your event is almost ready.
- Save to save the event to your schedule.
The event is finished and scheduled
How the Event Works
The event is now finished and immediately added to your schedule. The event is triggered each time any USB connected power supply’s power capacity passes 30%. The capacity need only pass 30%; the trigger does not differentiate between a rising or falling capacity.
Once triggered, the event uses the power state condition to test if the Mac is being powered by a battery. If the Mac is being powered by a UPS based power supply, the event continues and begins shutting down.
Given the need for the shut down to complete, Power Manager will ensure your Mac does shut down – even if other applications attempt to block it. Power Manager works hard to ensure your schedule is adhered to.
With this event as a basis, you can now create uninterruptible power supply triggered events to ensure your Mac remains safe.