Notify when Hub is offline?

Has anyone setup a way to notify when the hub goes offline?

A couple of ways I have in my mind but not sure how to implement...

  1. ping the device and notify when the hub is no longer offline, i have a windows pc permanently on so could maybe use this - not sure how i would implement the notifications (email / sms)

  2. Does a TP-Link Kasa monitor power? so it could send an alert through the app when power drops? Obviously if the hub locks up and doesnt lose power this alert wouldn't trigger.

I am looking for something as yesterday my hub locked up and needed to be unplugged and reconnected to get it working again, this meant that during the afternoon when I was at work and wife was at home the automations weren't firing. I am considering a Kasa plug to give me a way to power cycle / hard reset the hub if needed and I'm away from home

A ping really wouldn't do much as the hub could still have a network connection, but be locked up internally. I use the Maker API for this. Basically, I have a flow in NodeRed that checks the Maker API every 10 minutes and looks for a HTTP status code of 200. If a 200 is not returned, it sends a notification to my phone. Depending on the error code (404, 500, no response), I can decide which action I need to take.

You could use this same method in a batch script or whatever and then toggle a wifi plug.

Not even heard of NodeRed will look into that...

When it locked up the other day it wasn't pingable so hoped this would have been enough.

I'm interested to hear more about your solution if you have time to elaborate.

@corerootedxb Interested as well!

1 Like

LOL NodeRed is a DEEP rabbit hole, just be warned. I use it on a dedicated RPi and use it for dashboards, status of things both in and out of the house. It's just freaking AWESOME. When coupled up with the Maker API and the (currently undocumented) web socket interface (ws://[hubitat IP]/eventsocket), you can do all sorts of crazy crap with it. :wink:

Once you get started with NodeRed, it's REALLY hard to go back to writing rules in other systems.

This is my flow for checking if Hubitat is alive:

[EDIT]: I had a typo. The web socket interface is ws://[hubitat IP]/eventsocket.
[EDIT 2]: Fixed the image and added a ping check.

2 Likes

Lol...the primary reason I haven't looked down the well. I'm really curious to see what doors open up using NodeRed, but I know I'd get lost in the wonderland of options. One day...just not today.

Yeah, I felt that way too. But honestly, once you start with it, you get that "ah ha" moment of "where have you been all my smart home life?!". I've even started using NodeRED for some of my work routines. It's awesome for writing flows for doing things like truncating backup logs, moving files around, etc. Makes my job 100x easier and pretty much anyone on my team (even the junior developers) can jump in and figure out what a flow does.

Check your PM

1 Like

Big Brother (Xymon) is also a monitor and alert application that is pretty easy to setup on Linux.

http://xymon.sourceforge.net/

1 Like

I agree with that, wholeheartedly. The flow layout in node-red is awesome, and very easy to follow. Some would even say, self documenting...

1 Like

I've used Xymon at work for years now (I monitor ~250 Windows/Linux servers, services, and APIs). I've had to start transitioning off of it (to NodeRED) because a lot of the juniors that we are hiring now have ZERO Linux shell experience (damn whipper-snappers and get off my lawn!).

If it isn't point and click, they're lost. It seems that mastery of the Linux shell is a lost art now a days.

3 Likes

To be fair, they would probably argue that mastery of the Linux shell isn't really needed any more BECAUSE we have tools like node-red. :smile:

2 Likes

Not probably. I've actually had this very same discussion with many of them. That's almost always the answer they give. "I don't need to know the shell because I can use [insert app name here]". LOL

1 Like

Using Monitorr here, but at the min there is no integration to Pushover although its on the Devs list. So at the moment its manual, and along with PIVPN I can check from anywhere on my phone. So its more of a way to check if my cloud dash isn't loading whilst away.

I've had it running around a month and not noticed any issue with it, like slowing my hub.

3 Likes

@Royski is that running on linux? I currently have a windows server running 24/7 but could add a linux VM if needed. I also have a Synology NAS in use

I'm running it on a PI :slight_smile: You can also download a docker for it.
https://hub.docker.com/r/monitorr/monitorr/

Whats more, the items above can also serve as links, and open up the device etc in a new page, very handy.

2 Likes

I have a pi too on the network so can use that :slight_smile:

Have never locked into docker but keep reading about it so maybe that's the way to go...

My dash will look pretty much the same as yours too

2 Likes

I have a question. What's the Aquarium Heater tile tied to?

Make sure to get the pre-reqs done, this caused my brother a few issues, he said he'd installed sqlite3 yet it didn't show when running info.php. That said, I installed it and rebooted, then ran fine :+1:

Just A Pi?! Just one?! I have 6 on my network normally and during the holidays, that number goes up to 12.

You're not trying hard enough. LOL :wink:

2 Likes