#notification not reliable

1 messages · Page 1 of 1 (latest)

pure mango
#

im running homeassistant 2024.10.4
and im having trouble receiving notifications on both a samsung and a pixel8 android phone when their screens are turned off..

ive checked that the app is allowed to run the background which is also shown in the companion apps settings with the checkmark
the battery settings in android also reflect this.

my action is :

metadata: {}
data:
  message: doorbell rings...
  data:
    ttl: 0
    priority: high
    channel: alarm_stream
    color: "#2DF56D"
    importance: high
    clickAction: /custom-dashboard/doorbell-feed
action: notify.mobile_app_pixel_8
#

is my yaml wrong here or should i setup some other magical switch which enables near instant notifications? since currently the notification can arrive up to 30mins late..

dusky sinew
#

are you following the critical format?

pure mango
#

critial path is for ios no?

dusky sinew
#

android has its own format if you look at the actual link 🙂

pure mango
#

check my original post, android specific high priority params are already in the notification
see:
ttl: 0 priority: high

#

reset the app today, the frist notification that was send was from a automation that gets triggered at 7pm, it tells me if waste is going to be collected the next day, received this notification 55mins later, phone was on and above 80% charge.
background and battery optimalisations both in app and in android are set correctly

thorny stirrup
#

I can't offer any help only confirm that I have the same issue with a Pixel 7. Just upgraded to Android 15 and the issue persists. Other messaging apps (like Slack) are immediate. This has to be an Android setting thing as I get flooded with Gmail and HA Companion notifications when I wake up my phone. I have been through all of the settings suggested for allowing background activity notification settings, but so far same outcome.

dusky sinew
#

I'm unable to reproduce on my Pixel 9, notifications arrive immediately every time I use the critical format

pure mango
#

@dusky sinew
can you further specify the critical format since this message is already the "critical format" for android as per
https://companion.home-assistant.io/docs/notifications/critical-notifications#android

message:

metadata: {}
data:
  message: doorbell rings...
  data:
    ttl: 0
    priority: high
    channel: alarm_stream
    color: "#2DF56D"
    importance: high
    clickAction: /custom-dashboard/doorbell-feed
action: notify.mobile_app_pixel_8```
dusky sinew
#

taht is the correct format to use, its the same one mentinoed in my link

#

same one i use in all my own notifications that arrive immediately

#

is the notification triggered by something else that may be delayed from teh phone?

#

try testing it as an action directly from developer tools

pure mango
#

this is the format used as seen in my OP,
As far as automations which ones are triggered does not seem to matter since i notice it with anything that sends one.
I have 2 automations that are triggered by time, they check a condition and if the condition is valid a notification is send.
2 examples of this are
at 7pm check if i have battery powered zigbee devices below 10% and list those in a notificaiton message
the other automation
at 7pm check if waste collection comes next day and send message of whats collected

both automations are late quite regularly while when checking the logs the automation was triggered on time
the latter one being received super late at 7:54:36 just this week
needless to say that in this config one could not use such messaging for doorbell notifications etc..

dusky sinew
#

for the pixel 8 you confirmed the app has background access granted with the checkmark? for samsung you have multiple things to turn off in addition to the background access tile in settings. you wnat to look for thngs like data saver, power saving etc... on samsung