Track count of messages that are sent using Google Firebase cloud messaging?

There is a 500 message (out of HA network) limit as per

Is there any way that I can monitor that in Home Assistant so that I can modify messages sent if it approaches that 500 limit for any device? Kinda just want to keep an eye on it too, just in case I ever make some change that is not ideal for that 500 limit.

I did add this under notifications in the Configuration.yaml, but was not sure where to look for that log, and if that can be done from an automation.
== homeassistant.components.mobile_app.notify: info

I also looked in the App Configuration in the companion app. I can see the count sent in there. I looked through the “Manage Sensors” hoping that there was an option to send that back to HA, but I could not find anything. There is an “Active Notificaiton Count”, but that is how many notifications are displayed right now.

Thanks

Create a counter:

Increment it every time you send a message.

Use an automation to reset the counter at midnight UTC.

Use another automation to alert you if the counter gets up to 450 (90% of your allocation). Or 449 if you count that message too :slight_smile:

I have done that. It just counts the messages sent. I would like to know how many of my 500 daily Google Firebase massage limit I have used. I am not aware of any way that I can detect if the message was sent via local network (in which case I do not care to count), or via Google Firebase (which I want to limit). If I can keep an eye on how many are sent via Google Firebase, I can detect if I am home, connected to wifi, and then alert that I need to fix the issue. The Companion app regularly uses Google Firebase messaging even though I am at home and local network messaging is available.

Doesn’t answer your original question, but do you have your phone/HA app set to always or at least when on Home WiFi?

Yes, Persistent connection has been tried, both “Always” and “when connected to home wifi”. This does not help, it often just sends via Google Firebase instead of local network.