home-assistant / mobile-apps-fcm-push

Push Notification Sender for Home Assistant official mobile apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

request_location_update is counting towards rate limit

mdrichardson opened this issue · comments

Home Assistant Android version:
1.6.0 (112)

Android version:
9

Phone model:
Galaxy S8+

Home Assistant version:
0.105.3

Last working Home Assistant release (if known):
N/A

Description of problem:

Per the docs,

Requesting location updates via push notiifcation and the special clear_badge notification type also do not count towards your rate limit.

However, the only notifications I'm sending are request_location_update and they're counting towards the limit.

Traceback (if applicable):

2020-02-13 15:11:52 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for <omitted>: 32 sent, 150 allowed, 0 errors, resets in 0:48:07
2020-02-13 15:11:52 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for <omitted>: 34 sent, 150 allowed, 0 errors, resets in 0:48:07
2020-02-13 15:11:55 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for <omitted>: 33 sent, 150 allowed, 0 errors, resets in 0:48:04

Screenshot of problem:
N/A

Additional information:

I'm guessing there'd just need to be something like this, here:

if (payload.data.message === 'request_location_update') {
    updateRateLimits = false;
}

...but I figure you guys know best how you'd want this implemented.


I'm using this for location updates that change based off of time of day and whether the person is in "expected" locations. If you ask me, it was beautiful:

image

...so it would be great to get this working.

@robbiet480 What's the status on this? No rush and I understand this probably isn't high priority for you guys.

@JBassett If you have a moment can you migrate this code from the legacy function into the Android function? Basically just if (message == "request_location_update") updateRateLimits = false;. I would but up to my eyeballs in work for the next 36 hours or so.

@robbiet480 @JBassett This still seems to be an issue, even after merge:

image

These are the only notifications I've sent in weeks.

This is the message:

{
    "message": "request_location_update"
}

@mdrichardson What version of the android application are you using now?

@JBassett Android app is 1.8.0-162. Home Assistant is 0.109.4

And here's how I'm triggering the logs:

image

Is this isolated to me, or do you guys experience this as well?

@JBassett Can we re-open this? This appears to still be an issue: request_location_update is still counting against the rate limit. I can call it in HASS > Services > notify. and see the count increase in the Android app under "Notification Rate Limit". I'm on the latest stable release of everything.

@mdrichardson looks like theres another issue thats open that appears to be identical. Since this one has been closed for so long lets stick to #17