Notification delay (#samsung #s10)

Tags: #<Tag:0x00007f3263fd88c8>

Hi,

The notifications on my Samsung S10 phone quite often come with a bit of a delay. Sometimes it’s just seconds but worryingly often it’s even looong minutes. It seems like the Companion App is frozen in the background and when I wake up my phone, only then the notification pops up (like it is queued).
Is this some kind of a battery saving mode problem on Samsung phone (had the same issue with S8) or am I doing something wrong?
And yes - I have all notification options on for the Companion App.

MORE READING: Example to visualize the effect:
I am at home. My phone is not used for some hours. There is automation in HA that fires notification when someone is at my door (motion sensor). Then I hear a doorbell (because someone came). Some minutes later (e.g. 30) I get a notification on my phone (sic!). If I’d pick up the phone earlier, I’d probably receive the notification just at the moment I unlock the phone or open the Companion App.

The problem is persistent and behaves the same for all types of notifications I have set up. This makes it completely useless :frowning:

Did you try to use the priority: high setting ?

In fact I did with and without the high priority. Still no luck :frowning:

Funny, I came here to post the same thing. I have the same issue (and the same phone).

99% of my notifications come from Node Red flows. I recently redesigned notification flows to work with the app better (support channels, priorities, actionable notifications, etc.), but to test for reliability, I also made change node to format the message into a Pushover message (which was my previous goto notifier). So right now, I get two messages that are sent at the same time for each notification (Home Assistant app and Pushover). Pushover always comes through right away on my laptop and phone. The Home Assistant messages only seem to come in with a large delay when my screen is off, or within 10-15 seconds after turning my phone screen on. Battery saver and other settings like that are off/not optimized like they should be so my phone shouldn’t be forcing it to sleep or anything. Delay doesnt happen every time, but at least 75% of the time.

You need ttl too, follow the provided example

I’m using TTL too.
Truly I don’t think it’s the setup in HA. It’s something wrong with the app setting on Samsung S# (tested on 8 and 10). Like gregg098 said, it works for the other streams/technologies. Only Companion App is not reliable.

You know I came across this site the other and they were pretty interesting. Maybe it can be of help? I don’t own any Samsung devices, I’m a Pixel user lol.

I have the same problem except on a Mi Mix 3 running AOSP.

I still have notifications enabled via join and they come a lot quicker than the ones via the companion app. I’d much prefer to use the companion app so I can customise the notifications.

Battery optimization is disabled for the app.

Has anyone figured it out?

Did you add ttl and priority like the example in the link up above?

Same problem, just had a notification take 2 mins longer to arrive than the telegram notification.

Once it gets one notification it’s ok for a while so it seems to be getting put to sleep somehow.

I have ttl and priority set. I have a Node Red flow that currently sends a Pushover and Home Assistant notification at the same time with the same message for events. Pushover is instant on multiple devices. Home Assistant will come in quick if my screen is on, otherwise it takes up to a few minutes. Battery saver modes and all similar settings are off off my S10.

Yes i have the same issue, on Pixel 4. Created an Alarm channel using high importance, but the notifications are delayed. Hope this will be solved soon!

Can you share an example of a delayed notification?

I use appdaemon for this:

 self.call_service(self.args['frans_notifier'],title=self.args['title'],message=self.args['message'],data={"image":"/local/snaps/voordeur.jpg","channel":"Doorbell","importance":"high","clickAction":"/lovelace/deurbel"})

I want these messages to arrive instantly but they don’t. Also tried a channel with name ‘Alarm’ but same behaviour.

It looks like you completely skipped over what the second post in this thread suggested, you need to set ttl and priority just like the link in that post mentions.

Just follow the android example at the bottom.

If i use priority and ttl i get no notification at all. I need the notification to overrride Do Not DIsturb (so i need the channel); so what would the syntax be with these combined?

EDIT: Ok i changed the line to:

self.call_service(self.args['frans_notifier'],title=self.args['title'],message=self.args['message'],data={"image":"/local/snaps/voordeur.jpg","channel":"Doorbell","importance":"high","clickAction":"/lovelace/deurbel","ttl": 0,"priority":"high"})

And i got notified, will let you know it this work instantly in the next couple of days

I use NodeRed and have a node to call the notify service with the following data:

{
    "title": "{{title}}",
    "message": "{{message}}",
    "data": {
        "data": {
            "ttl": "0",
            "priority": "high"
        },
        "group": "{{group}}",
        "tag": "{{tag}}",
        "color": "{{color}}",
        "sticky": "{{sticky}}",
        "clickAction": "{{clickaction}}",
        "channel": "{{channel}}",
        "image": "{{image}}",
        "importance": "{{importance}}",
        "persistent": "{{persistent}}",
        "timeout": "{{timeout}}",
        "actions": [
            {
                "action": "{{action1}}",
                "title": "{{actiontitle1}}"
            },
            {
                "action": "{{action2}}",
                "title": "{{actiontitle2}}"
            },
            {
                "action": "{{action3}}",
                "title": "{{actiontitle3}}"
            }
        ]
    }
}

This lets me use a change node or something else to just set msg.group, msg.tag, msg.timeout, etc. Notice that ttl: 0 and priority: high are hard coded.

you have ttl and priority in the wrong location…there is only 1 data entry after message and title.

Not according to the documentation page at https://companion.home-assistant.io/docs/notifications/critical-notifications

The example shows this:

automations:
  - alias: 'Fire Detected'
    trigger:
    - platform: state
      entity_id: sensor.smoke_alarm
      to: 'smoke'
    action:
    - service: notify.mobile_app_<your_device_id_here>
      data:
        title: "Wake up!"
        message: "The house is on fire and the cat's stuck in the dryer!"
        data:
          ttl: 0
          priority: high

If I get rid of one data: level, the messages dont come through at all.

I just tested this code - result was no message getting sent to me phone:

{
    "title": "Test Title",
    "message": "Test Message",
    "data": {
        "ttl": "0",
        "priority": "high"
    }
}

This worked:

{
    "title": "Test Title",
    "message": "Test Message",
    "data": {
        "data": {
            "ttl": "0",
            "priority": "high"
        }
    }
}

EDIT: And by works, I mean I do get a notification, but still delayed if my screen is off.

Yes pay attention to the example in the docs. There is only 1 data entry after message and title not 2 like you have so ttl and priority are not getting set properly which is why you see a delay.

here is a quick service call I just sent to myself that works and the message comes through immediately, it seems you may be using node red or something and may not be making the proper call:

message: Test 123
data:
  ttl: 0
  priority: high
1 Like