Push Notifications now available!

I see with the latest app update that Notification channels are now available.
THANK YOU!!

Now, how do I specify a a channel/category for a particular notification?

the docs should always be the first place you look :slight_smile:

1 Like

It should be…unless you are lazy…like me.
Thanks for the link. I’ll bookmark that one.

Hi,

I’m trying out this Home Assistant Companion for Android and so far it looks good and runs really smoothly. Also the battery usage seems to be quite fairly (I don’t use the GPS tracking thing, so I save a little there of course).

I’m having an issue with the Notifications on my OnePlus 6, when I get Push Notifications with Pictures from my survelliance. I use the DeepStack component to scan every time there is a movement in front of my cameras and based on that it saves a file with a timestamp (plus it creates a file named xxxxx_latest.jpg). This file is being overwritten every time there is a new detection (person / car etc.).
But it seems that when I get the notifications, the same picture is being sent multiple times. If I check the folder where the files are saved, I see multiple files with different pictures.

I’m not 100% sure, but it looks like due to my testing, if the phone is “Sleeping” if you can say so (the screen goes black) and you wake it up, then all the notifications comes and I see the same picture.
It also looks like I can reproduce it by turning off the WiFi, fire the automations and then turn on the WiFi and then it fetches the notifications - unfortunately with the same picture.

If I move around in front of the camera, while I run the automation multiple times (+ keeping the phone awake), I get the different pictures taken.
So to me it looks like when I get the notifications while the phone is “sleeping or not accessible”, then when the connections establishes, then it gets the notifications but kinda looks at the same file path.

Have anyone else experienced this or maybe have a solution that will help me in this case?

Thanks :slight_smile:

This is to be expected because the image needs to be publicly accessible so if your device is sleeping and the phone attempts to load the same URL later it will look the same. You will want to save each image with a timestamp and show that if you wish to show everything. The app does not upload the image it just renders it at the time the notification was received.

Oh okay…

Any idea of how I might be able to achieve that?

You need that custom integration to provide the image with a timestamp in the name so you can then send that image out instead of just the latest one. Alternatively you can use something like discord to send the images to so you can view them in history. That is what I am doing personally for things that I want a history to be retained.

Nice idea - thanks! I will look into that!

I prefer Telegram still.

One more.

I read that rates are at 150 at the moment, but if I have like Critical notifications like the alarm goes off, I could bypass that with a setting like (on Android):

    - 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

But even though my Notification for my wather leak sensor was having this, I still got the error in the log that I had reached the threshold of 150.
Do I need to do something ekstra?

Is this the only notification being sent?

Well I do have others as well, but not with high priority.
Or where you searching for something else?

I was trying to see if you were hitting the limit before these notifications were sent.

Yeah actual it was. I was hitting the limit at 150 and after that, one of my sensors was Triggered, but the Notification didn’t come through.

Out of curiosity this 150 limit, is it due to Google cost or just raw bandwidth/power of the webserver bouncing the notices?

Due to the cost paid for by the dev I believe.

Cost pretty much

Currently, you are allowed to send a maximum of 150 push notifications per day per device. The rate limit resets at midnight UTC daily. This is to ensure that the service remains cheap to maintain. In the future we may add support for upgrading to allow more notifications.
1 Like

Hi :slight_smile:
The documentation says “Critical alerts” do not count towards the 150 rate limit.
It seems that a “high” priority is not a critical alert. Can you say us what is a critical alert so ?

Oh and is it possible to have a list of keyword to set the priority ? Is it like “low”, “medium” and “high” ? I haven’t seen this in doc.

Forgot to say that I’m using Android

Thanks :slight_smile: this app rocks !

There are only 2 options and high is not the default for priority so the docs are showing the example you want to follow. This is standard FCM priority: https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message

Critical alerts are something iOS offers that allows the phone to ring when the device has the ringer turned off. Android does not offer this unless you use channels and also use do not disturb. The docs were just updated to reflect that.

Thank you for all those precisions !