Internet Status Notification?

WE have been having alot of internet outages lately, and while I did have some limited issues with local control, it got me thinking, is there a way to set up a notification if the internet goes down, and when service is restored?

This cat has many skins.... You could likely use either hub info or something @thebearmay has written..... Alternatively you could use an always on machine to periodically check your Internet connection.... I think you have one of those :wink:. I'm sure other options are available.

The real issue is how to get the notification out without internet, If you’re home and on the local LAN the Mobile App can do it, but if you’re out you would need some sort of alternate communication path.

6 Likes

Edit - Ugh... Haven't had my coffee. You were asking for the scenario where you're not at home. My answer doesn't help with that.

You can self-host a notification server on your LAN.

I run Gotify, which only has an Android app, but there is also ntfy which I believe also has an iOS app.

While I supplement it with email to SMS and the built-in Hubitat notifications for some alerts, Gotify is my primary notification method. When I'm home, everything is local. I was able to hack together a simple device driver to make it available as a notification device for Hubitat.

More edit: Without a device sitting at home with a cell connection that can get a message out, I don't know how you solve that. Flash the the porch lights and tell the neighbor that when they notice that they should release the homing pigeons that are trained to roost on your car?

I was mostly thinking of how to get all notifications, but for your original question of just being notified the internet is down, you can use healthchecks.io. I have a heartbeat signal coming from multiple devices at home to healthchecks.io and it will notify me if they can't reach it. I set it up using the 'email to SMS' gateway for my cell provider.

2 Likes

I use the Hubitat Ping Device to periodically check various connections to make sure devices are connected to my home router and my router is connected to the Internet. I check individual devices by pinging their IPV4 address on the local LAN. I have separate cable modem and router, so I also ping their IPV4 LAN addresses. I have Zigbee smartplugs on each of these devices. If the ping is false, I have apps that will turn off the specific plug for 30 seconds and then turn it back on to reboot the device.

To check if the Internet is active, I ping the Cloudflare DNS server at 1.1.1.1. That server address has a very high uptime, so that ping should be true if you are connected to the Internet. Of course, if you cannot reach your router or modem, you won't be able to reach the Internet.

As @thebearmay has indicated, checking the Internet connection is easy. The issue is being able to be notified outside your local LAN if the pings to your modem and router are true, but the ping to the DNS server is false.

1 Like

Short of adding a cheap celluar modem to give you an alternate path out I'm not sure what your options are.

I think @Alan_F 's recommendation of healthchecks.io is the way to go. (I know I'm going to be exploring this later) But in short you either need something on the outside doing the monitoring, or you need a backup connection for getting messages out in the case of your main connection being down.

I see a couple of options.

  • Roll your own on the free tier of your cloud provider of choice.
  • Use Heathchecks.io since they give you the first 10 free.
  • Set up a cross check by putting a Pi at a relatives house. You monitor their connection. They monitor yours.
4 Likes

Well, I did, turned out I didn't have a reason so, I've been shutting it down. I was really looking more for a no effort just tell me when its back up option. Down actually isn'tt a problem, My Ecowitt gateway tells me when its down, but not when it comes back.

1 Like

One nice side benefit of using Ring Alarm (Gen2) is that it sends notifications whenever power or Internet service goes out, and again once service is restored. It does so using a battery backup and included cellular fallback communications.

Since all of my installations are monitored (either self- or Ring-, both paid options), I can't state with certainty whether this also works with an unmonitored system.

It's also a feature of my Synology DiskStation NAS that if it loses Internet connectivity, Synology immediately alerts me, then again once the NAS is back up and running.

2 Likes

Same here.

The heartbeat won’t distinguish between a hub that lost power/crashed/disconnected Ethernet or WiFi, from a hub that lost its connection to the internet.

Healthchecks.io only knows it didn’t receive an http call at the interval that the user configures.

But all of those issues warrant a notification anyway, and none of the built-in notification methods would work if the hub itself is down for some reason.

1 Like

It might be fun to shoe-horn those Healthchecks status badges into a dashboard tile for quick reference. Definitely going to look into that further!

FULL DISCLOSURE: I was the creator of the original Uptime Monitor™, a paid web service that allowed owners of Web-connected cameras, lightweight servers and other IoT devices to track connectivity via a dashboard. It's nice to see newer, better, more modern versions of this service living on!

1 Like

For all the other internal health checks besides internet connectivity, I'm using Uptime Kuma (https://uptime.kuma.pet/) running under Docker. I have one instance on one Raspberry Pi, and a second on another Pi. They're monitoring each other, plus a ton of other services on my LAN. I use them to call the healthchecks.io endpoint every 5 minutes.

Uptime Kuma lets you set up both outbound checks (like calling a http endpoint and looking for a keyword in the response), and inbound heartbeats where another application needs to periodically call a URL on the Uptime Kuma service, ping connectivity checks, and a bunch of other types of monitors. It's also set up to connect to an extensive list of notification services.

Distinguishing between a hub with a disconnected network (but still running its automation rules) and a hub that's crashed/locked up seems like a challenge. You'd have to use Zigbee or Z-Wave to create the heartbeat to know the hub is up but without a network connection. Either way, if the hub isn't sending its heartbeat signal to Uptime Kuma, I need to check the hub and probably need to reboot it.

4 Likes

I spun this up in a container recently as well, haven’t had much time to add many checks but I’m also planning to use it for monitoring LAN connectivity.

I hadn't heard about Uptime Kuma until a post from @jtp10181 (I believe) a while back mentioning it. I have 10 monitors setup and it is great:

4 Likes

Took my own advice and created this dashboard tile using Tile Builder: Grid … reading the "Weather" section of the app Docs helped a lot.

1 Like

Nice, what attribute are you pulling for those?

Healthchecks.io gives you specific SVG image URLs for each "check's" current status. I just tucked those into a Hub Variable and created a Variable Connector for each one, then brought those into Tile Builder: Grid with a reference to the %variable% attribute.

In retrospect, I could simply have pasted the source URLs directly into TB:Grid "Free Form" table cells surrounded by <img> tags, but this method was more fun to try.