Notifications When HA Has Restarted

So, today, due to the ice that has been laid down in the are due to the storm that is moving through, we had a power outage. The first since I started using HA more seriously. I got a notice from my Vera hub that it had lost connectivity and when it reconnected. The only thing I have that around for, now, is just my ZWave door locks ('cause, apparently, there are no options to program door codes from within HA). Other than that I would be completely on HA.

At any rate, that brought up the thought, can I get such notices from HA? I know on most if not all cisco network devices you can get what they call Cold Start notifications from the SNMP traps. I know that the HA, if it lost power cannot see in advance and say hey, power going down, LOL. However, is there a way to record or note that power was lost and when the Pi reboots and HA restarted, get a notice that it experienced a Cold Start/Restart and then send out a notification of that via text or some other method?

It would be nice to know if the Pi were off-line, but I do not know of an easy way to do that apart from some outside the home/network monitoring through pings, etc., but it would be nice if I could pull that part off.

Anyway, I thought I would pose the question and see what ideas are out there.

I think this is what you are looking for.

https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/automation/startup_notification.yaml

Sort of OT, but take a look at this too. I use it to monitor uptime and it works rather well. It’s free and uses Google Docs Spreadsheet.

(I said OT because this won’t help you in a power failure.)

Thank you both for your input. I guess this is one of those things that is going to be harder or more trouble than it is worth. It would be nice to have this information but it already seems like there will be a bunch of moving pieces trying to get it all into one picture.

This may be one of those projects that I put off for now until I can invest more time figuring out what all the pieces are going to be.

I have mine send me notifications via email and my Kodi media center on startup:

- alias: 'Hass startup'
  trigger:
    platform: event
    event_type: homeassistant_start
  action:
    - service: notify.group_notify
      data:
        message: 'Hass: Starting...'
1 Like

For the record, the link I sent you took me all of five minutes to set up - worked first time out. If you don’t already have a Google account, it might take you ten. :smile:

Well it’s not that so much rather, I, we, have gone through all this to have a self-hosted home automation system that it seems not in keeping with the whole concept to use third party resources to accomplish such a task. Then again, its probably irrational to go through such lengths for such a simple task.

I think it would be cool, if each HA user could activate some feature, provided they wanted to do so, that would make their Pi part of a pool of Pi’s that all pinged off one another for the purposes of determining up/down status, etc. Not sure how practical such an idea is, it was just a thought.

1 Like

Sort of like torrenting the data. But there’d still have to be at least one tracker.

Yeah, pretty much exactly like that.

A very interesting idea. You may want to bounce this off the devs.

I am not sure how to go about such a thing, but it would be worth a shot I suppose. All they can say is no. And if so, then I can just keep trying to come up with something that may be viable.

You could always bring it up in Gitter chat - lot’s of core devs there. Or you could do a Feature Request and see if other users are interested in it enough to vote on it.