My first post as a new user; moved over from having OpenHab for many many years (and loving HA)!
Problem description: At times my wifi would drop at home, or my ISP will have an outage. In these cases I’m unaware that HA is disconnected from the internet and therefore Nabu Casa and would like to be informed of this.
Suggestion: Add some configurable timer to Nabu Casa / Cloud integration that would detect such disconnects on their backend, then alert (email?) the user. That way you wont be surprised when you get home and something has happened without HA alerting you or doing some automation didn’t happen.
Hi @Tertiush, welcome to the Home Assistant community.
I came here to suggest something similar. I had a power failure at home (due to a faulty light) while I was away for a few days, fortunately I check Home Assistant regularly and noticed it was unavailable and someone was able to get it sorted. A backend check on Nabu Casa would help with both our cases.
Maybe there could be different levels of alerts depending on how long it has been disconnected for? When it has been disconnected for a few minutes it may just be a WiFi issue (like your case) but an hour or longer could indicate a power (like mine).
Exactly that yes. In the meantime I think I’m going to use the android Tasker app to periodically check if a certain dummy socket is open on my PI (through port forwarding). That would at least prove my internet connection is up.
It would be indeed nice to have a first-party solution since there is now a cloud offered by HA, although at the moment I’m really happy with healtchecks.io - just one line in crontab and you get a nice dashboard view of any and all servers
I might take a look at that. I’m actually using Uptime Robot, which seems to work well enough for what I need (checking if the remote UI is available).
Well it’s what is doing the ping sensor included in ha It displays automatically if your internet connection is up and average round-trip time if you want too !
This service (healthchecks.io) turns out to be exactly what I need. It is insanely easy to configure, and can adapt to a wide variety of notifier channels and heartbeat/keepalive methods.
Here is the code, this was for the iOS 2.0 beta app but you can change the bottom part to whatever notify service.
automation:
- alias: "System - Notify if Nabu Casa Unavailable"
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.remote_ui
to: 'unavailable'
for:
seconds: 60 # allow a min to attempt connecting before showing error
action:
- service: notify.mobile_app_sean_s_iphone_xs
data_template:
title: "Home Assistant Cloud Unavailable"
message: "You are not connected to Home Assistant Cloud! Troubleshoot now so mobile app works."
data:
url: ""
push:
sound: "SiriStopFailure_Haptic.caf" # must import System sounds from App Configuration -> Notifications -> Sounds
category: "ha_cmds"
thread-id: "system"
badge: 0
I haven’t been in that specific situation yet, but my automation catches the errors when you restart HA and can’t make a successful connection to Nabu Casa. That happens to me from time to time and sometimes I don’t notice, so this warns me right away so I can fix the issue (by restarting again usually).
I know it’s not exactly the same problem OP is facing, but saw this thread and thought I’d share.
It doesn’t show up on the Integrations page, just on your States page or Configuration -> Entity Registry page if you’re a Nabu Casa subscriber and have HA >0.90.
It’s a binary_sensor that reports if you’re connected to Nabu Casa (Home Assistant Cloud) Remote UI or not. In this case when it fails to connect to their servers at all, the sensor reports a state of “unavailable” rather than the usual on/off. My automation just notifies me when it hits that state.
Ditto. I also set this up and has been working like a charm for sometime now. In addition I’m pinging a local wifi device from within HA and linked this to a notification to warm me of any drops.
I just point Uptime Robot to the https://longstring.ui.nabu.casa URL. I don’t have any authentication set up at all.
Since the HA authentication is form based (rather than via authentication headers), this seems to work for me. If my HA server is down the request to that URL fails with a timeout and Uptime Robot detects it as down.
If you are havinhg issues, it may be that you need to upgrade your HA instance to 2021.1.5 as the Nabu Casa remote access has been updated to block access to insecure versions of HA (and this may give a non-success HTTP code which Uptime Robot may detect as it being down):