Power interruption

Though I live in a well kept condo building in a decently kept city, I recently have experienced some brief power interruptions, some of only a few seconds.
Unfortunately it results in my HA reseting on the Beelink Mini PC and it can cause some issues, like Zigbee or Matter not working; some Zwave devices not working etc.
I am considering putting HA and my Comcast router on a power backup and would appreciate some recommendations on what backup I should get.

Make sure your UPS (Uninterruptible Power Supply) is NUT compatible so you can integrate it into HomeAssistant for a graceful shutdown as the UPS backup time nears expiry. The time your unit remains powered is not as important as the high risk of loss of unsaved data and logical drive directory and file damage when power is abruptly cut. Remember, your home automation sensors will probably stop reporting if unpowered. No point in keeping the HomeAssistant server going to listen for it. Shut it down cleanly and automatically with the NUT software and wait for stable power to return before powering it up again. Any automation that requires power for safe egress needs to be accounted for. A large power surge from lightning strikes during a storm causing electrical fire that traps you inside as your electric door locks are not functional to open is highly undesirable.

Check that the cable between the devices will be compatible - serial UART, USB (type A, mini, micro, or C), Ethernet, etc. Will you need an adapter or converter? Passive or active/powered?

Cost may not be your primary consideration. Look at the maximum time your power has been off in the past and what risk you are able to bear without power. Is it seconds, minutes, or hours? What current do your devices draw that are going to be backed up? This will determine how fast your batteries drain. Don't forget to add USB hubs and mobile phone chargers etc if they are needed to connect the UPS to your server and to make or receive important calls. Will your home alarm system need backup too? If your local phone cell tower loses power, where will your phone connect to when their batteries go flat?

Add a generous fudge factor to the maximum downtime expected, and buy accordingly. For home use, a 300 to 600Watts unit should suffice - you are not going to be powering a server farm, air-conditioner, or even your computer monitor during a power outage, and worst case your power should come back within a few hours, not days, unless you are in a remote isolated location.

Factor a new set of replacement batteries every so often, and ask if the newer AGM variety that last longer are compatible - most are and the price difference between those and common 12V7Ah Lead Acid batteries used in security alarms is minimal, and they last considerably longer and have higher ratings for the same physical size.

End user battery replacement is possible on most models if you are very careful and your screwdriver doesn't slip across the terminals, and you will extend the useful life of your UPS unit for a few more years rather than junk it.

A hidden bonus of using an UPS is power filtering, removing spikes and brownouts.

Make sure any alarm during power loss can be muted. You dont want to be sitting in the dark, madly covering your ears while the siren screams away.

The NUT software has been around for ages and will integrate well with HomeAssistantas well as most other operating systems and computers.

To add to this I advise using a power calc to size the UPS based on your needs and budget:

i.e PowerShield UPS Sizing Guide - PowerShield

and combine with a W to VA calc: Watts to VA conversion calculator

Use a Power factor of 0.8 which is the standard to find a UPS with the correct VA value when buying. 600W is 750VA at 0.8 PF.

Many, many thanks.
A few questions.

  • How does one integrate it with HA, other than connecting the plug of my Beeline Mini PC (that is where my HA is installed) to the backup ?
  • Can I connect an extention cord with multiple outlets to a backup ?
    I do not plan to connect USB cables to the backup as I am only interested in connecting the HA mini PC and the internet modem.
    Do you have any suggestions on brand/model ?

Most UPS's will come with a serial to USB data cable which is normally for the software for the brand they are, in my case I have a APC Smart-UPS C 1500 Rack version and a APC Back-UPS RS 550G.

I got these free at the time from a client that did not need them any more as well as a good lot of my gear since I was the head admin heh so main cost was battery replacement after a while.

The first one I have plugged into my Synology NAS acting as the UPS server for NUT client to connect to and the second I am using a spare Pi3 to act as a NUT server to feed its data back into HA.

For connecting devices to them in most cases you will be filling out the slots first that have the backup label on them as that is the side that connects to the battery when power is offline and other power ports will be just for direct power draw which is in most cases for devices where you want cleaner power but don't need battery backup in place.

Yes you can use extension boards and splitters with them but you need to consider the total load you will be putting on them when you need to plug in more than the plug capacity it has.

The connector they have is an IEC C14 so for example here in Australia I use these: 1.5m IEC C14 to AU Mains Socket Adaptor Cord

My main UPS hosts my networking gear in my rack as well as my gaming PC (time on load is 90mins when not gaming so enough time to safe shut off the PC and let the automatons do the rest until power is restored should I need to wait longer at the time) where as the other UPS is just hosting the Pi3, one camera and the mesh node to connect back to the main router.

Here is how I have my UPS automation setup at this time which is set to safe shut off the NAS and PC at 10% capacity left when if I am not home at the time and its still discharging, all my devices are set to turn back on once power is restored automatically:

alias: UPS Automations
description: ""
triggers:
  - type: battery_level
    device_id: 
    entity_id: 
    domain: sensor
    below: 99
    for:
      hours: 0
      minutes: 1
      seconds: 0
    id: UPS Discharging
    trigger: device
  - type: battery_level
    device_id: 
    entity_id: 
    domain: sensor
    below: 50
    for:
      hours: 0
      minutes: 0
      seconds: 10
    id: "UPS Discharging: 50%"
    trigger: device
  - type: battery_level
    device_id: 
    entity_id: 
    domain: sensor
    below: 10
    for:
      hours: 0
      minutes: 0
      seconds: 10
    id: "UPS Discharging: 10%"
    trigger: device
  - entity_id:
      - sensor.main_ups_status
    from: null
    to: Online Battery Charging
    id: UPS Charging
    for:
      hours: 0
      minutes: 0
      seconds: 30
    trigger: state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - UPS Discharging
        sequence:
          - metadata: {}
            data:
              title: UPS
              message: Main UPS is Discharging
              data:
                notification_icon: mdi:battery-arrow-down
                color: yellow
            action: notify.mobile_app_rkphone
      - conditions:
          - condition: trigger
            id:
              - "UPS Discharging: 50%"
        sequence:
          - metadata: {}
            data:
              title: UPS
              message: Main UPS is at 50%
              data:
                notification_icon: mdi:battery-50
                color: yellow
            action: notify.mobile_app_rkphone
      - conditions:
          - condition: trigger
            id:
              - "UPS Discharging: 10%"
        sequence:
          - metadata: {}
            data:
              title: UPS
              message: Main UPS is at 10%
              data:
                notification_icon: mdi:battery-10
                color: red
            action: notify.mobile_app_rkphone
          - device_id: 
            domain: button
            entity_id: 
            type: press
          - device_id: 
            domain: button
            entity_id: 
            type: press
      - conditions:
          - condition: trigger
            id:
              - UPS Charging
        sequence:
          - metadata: {}
            data:
              title: UPS
              message: Main UPS is Charging
              data:
                notification_icon: mdi:battery-charging
                color: green
            action: notify.mobile_app_rkphone
mode: single

APC don't ship them with their UPSs any more. They say it's for "environmental reasons" but you can request a free cable off them, which they'll happily package & ship separately after you discover it's missing (no idea if the shipping is free). So much for the environment.

They also went out of their way to create a 10 pin RJ connector & made sure to use the outermost pins, so you can't simplify swap it for an RJ45 connector.

Similar to you, I got my hands on a used UPS from work. Just out of warranty with no cable & no way to claim a free one. You could buy one from them for something close to €50 though.
Ended up getting one from AliExpress for €8 shipped that's been rock solid. Screw your predatory habits, APC!

I ordered replacement data cables for my two UPS's on ebay iirc at the time so yea its easy enough to get them as long as you need spares or what not.