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 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.
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.
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.
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.
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
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”.