I’m using mailgun to notify myself of state changes. On last hass startup, perhaps my internet was down or flakey, hass could not connect to the mailgun server when initializing the notify.mailgun
so it disabled this notification method. Is there a way to, uh, notify myself when this happens so I can fix it? or is there a way to retry initializing the mailgun notifier later?
I always check the logs after a restart.
I seem to recall a post somewhere in this forum that employed the File Sensor integration to monitor the log for error/warning messages. The state of the File Sensor could be used to trigger notifications. The actual implementation details are foggy to me now.
You would need an alternate notification method.
And something to monitor that. Which would require an alternative notification method to monitor it… ad infinitum.
It’s turtles all the way down…
Really, it only takes a second to glance at the logs after a restart and you are 100% sure things are ok.
I was thinking along the lines of persistent_notification. So, at the very least, upon opening the UI, the little orange dot draws one’s attention. Other than that, yes, turtles all the way down.
Problem is when I have power outages, hass is restarting while I’m not looking at it. So I may not know to check the logs. Maybe I could have a script that sends email via notify.mailgun
every week. Then a calendar reminder to mentally remember if I got the email that week. I also like the idea of something on the dashboard that says “notifications not enabled” if it detects that notify.mailgun
failed to load.
Finally getting around to detecting when notify.mailgun
has not initialized correctly. To reload notifications, should I call ha core restart or ha supervisor reload or ha host reboot ?
Core restart.
Now I’m trying to figure how the heck to periodically run a script… cronjobs don’t run. Can’t get crond to run on startup. Why is everything so hard.
Use an automation with either a time trigger or time pattern trigger. Use in combination with conditions if you only want to fire it on particular days.