Persistent Notification - Listening to Home Assistant via Websocket

Companion App on Android version beat-1970-b7f6a732-full.

The app updated overnight, and this morning there is a consistent notification that won’t clear (rebooted phone as well) which reads “Listening to Home Assistant via Websocket”.

I see opening the app from this persistent notification is in the ChangeLog (#2173), but curious why this persistent notification is “added” as I never had it before. Can it be silenced as I really don’t want a persistent notification about this, or about HA in general unless there is something triggered.

Thanks.

3 Likes

Go to your notification settings on your phone, you can ca turn off notifications for just that

3 Likes

Thanks.

I didn’t realize there was a specific “Websocket” notification that could be silenced.

What would normally come throught he websocket notification that I might now miss?

More info here Local Push | Home Assistant Companion Docs

1 Like

Thanks for the Info. I have read this doc and it still is not clear to me if other notifications come though the Websocket one. I.e if I disable the persistent notification as above , will I still get notifications from HA. Also I assume the Websocket setting needs to be set to “always” to get push notifications all the time? The default on My android phone seems to be “while the screen is on” and this suggests suggests I wont get notifications when the phone is locked and screen off?

So before this change notificaitons came from Firebase, now when the websocket is connected they come directly from user. The service will still run based on the settings you chose. If you set it never then the app will continue to use Firebase.

Only if you run a device that has no google services or if you only want to notifications to come directly from your server. We made a note in the settings page and the doc to mention minimal users have to set it to always as they do not have Firebase.

This means that wehn your screen is on notifications will come from websockets instead of firebase. Firebase is basically the fallback wehn you have websockets enabled.

4 Likes

Many thanks for the clarification. Got it now! :slight_smile:

I’ll put a second on the Thanks. Clears up the purpose and use.

Other than when Firebase isn’t present, what is the benefit of Websocket over Firebase, whey would we want to use one over the other?

1 Like

Firebase notifications have a daily rate limit of 500 while websockets does not.

The notification is also sent over to a Firebase server before being sent to your device. This is something google setup to help with battery drain as its more efficient and has a lot of logic around when you can see notifications. We mention this in the link up above too.

Ok, not being near the 500 message limit, I’m tempted to stick with Google Logic (even if it is delayed sometimes) on battery drain.

are you noticing excessive drain? on my pixel 6 pro its barely noticeable even with it set to always

Honestly haven’t looked - my 5 yo phone drains pretty quick regardless, but working from home this isn’t an issue at present so haven’t spent time digging into where the drain is. I was just replying to your comment about Google’s setup to help with battery drain.

Presumably the other benefits of the websocket are, instant widget updates and live webcam image widgets. It’s not just all about the notifications.

These only happen when the screen is on and the user has widgets added. We also use websocket in the device controls menu. It will eventually be used everywhere.

This is part of the frontend actually and not the apps websocket connection.

I’ve not had a chance to look into this yet but my battery life has definitely taken a hit… my phone no longer lasts a full day and the home assistant app is top of the list for battery use. I’ll have a play when I get a spare few minutes.

I’m not really sure websocket is meant for phone (or anything battery-powered, really).
Their use-case is likely always-hooked tablets used as kiosks.

So based on the exchanges here and the documentation, I conclude that in the Android settings for notifications I can disable “Websocket” to disable the annoying persistent notification “Listening to Home Assistant via Websocket”. Local push using websocket will still work.
Please correct me if I’m mistaken :slight_smile:

From tthe Companion App on my Android, I have Websocket Settings at “While Screen On”, and then in “Manage Websocket Notification Channel”, I have “Show Notifications” disabled. Everything seems to be working as I expect…

The Home Assistant Companion App was updated today and now in the settings there is indeed a sort of hyperlink “Manage Websocket Notification Channel” where you can directly disable this persistent notification.
That’s a great addition. It even comes with an explanatory text, but that can perhaps be a bit clearer as it recommends to “minimise the notification” while it would have been easier to understand if it recommended to disable “show notifications”.

We won’t recommend disabling because if you get an issue we will ask that it remain minimized.