Notification when one HA server is down

Let’s say the power goes out at my house. Obviously the HA server cannot send notification of the outage because even the internet will be down, even if I use a UPS.

But I do have another instance of HA running at a separate location, a few miles away. Is there a way I can send a notification from location B if location A is down, and vice versa? There are some really savvy folks here. I wonder what good ideas there might be.

Multiple options here, off the top of my head I’m thinking either a VPN connection between the sites, or external monitoring like uptimerobot or similar.

Won’t you still have internet if you also hook up your router to the Ups?

I presume the ISP’s hardware on the street would suffer from the outage as well. Maybe there is no such hardware (?)

In my case, one location has a UPS and another doesn’t (just an RPi), and I don’t intend to purchase one anytime soon. I’d rather just be able to receive a notification when the server is down.

Looking into uptimerobot, it seems that it would require port forwarding. If so, that’s not something I’d like to use.

Are your HA instances connected to one another ? via VPN or similar ?
If so, a simple ping sensor would get you the state of HA (but you would need to add your router to the UPS)

If not, do you have nabu casa or any other public path to your HA instance ? If so, monitor that.
You could do it via a shell command to call curl and check the HTTP response code.

Here is one i use to monitor a different internal web service

command_line:
  - sensor:
      name: Random Web Server HTTP CODE
      command: curl -I http://blah/index.html 2>/dev/null | head -n 1 | cut -d$' ' -f2
      scan_interval: 180

Then create an automation to fire a notification if this is anything other than 200

FYI: For what it’s worth - I think i recall hearing on either the HA podcast or the 2024.5 release live stream that there is possibly a new feature coming (don’t know when?) that would be provided by Nabu Casa & the cloud service. I believe the thought is that such outages could be detected & reported by Nabu Casa.

Depends. If the power failure only occurs in your house, the ISP is unaffected.
If it’s a broader power cut, the ISP might be affected but not immediately. Last power cut we had, it took about an hour of no power for internet & cellular data to be affected. That’s plenty of time to send a notification.

In case you change your mind, there’s small, cheap UPSes made for routers & small electronics to be found for purchase on the usual sites. Even if they give you only 5 minutes of power before they run out of juice, it should be more than enough to fire a notification & perform a graceful shutdown of your server

Regarding the VPN approach, would I be able to monitor both locations? I mean, I could host a WireGuard server at location A, and location B could be a client and ping server A. But could I then also ping location B from server A while server B is the client? …and even if that were to work, while location B is logged in as a WG client, won’t that prevent me from accessing location B locally on the location B network while I’m at location B?