Webhooks speed problem

JPM

New member
I have been playing with settings today and discovered something... When the phone screen is on, notifications are instant. When the phone screen is off, notifications were 8 to 29 seconds delayed, or sometimes do not happen until the power button is pressed and phone wakes.

Macrodroid and helper are already allowed "background data" and "unrestricted data" and "battery optimization: not optimized"

Seems motorola might have hidden the "disable WiFi sleep" option under WiFi > Advanced - or it's no longer a thing under Android 11 - I can't determine what's true.

I'm playing with the idea of a) having Macrodroid make constant HTTP requests to keep WiFi alive, and/or b) playing with WiFi AP's DTIM period and Airtime fairness setting.

I will post back what I learn - but because I can consistantly get alerts fast, as long as phone is awake - I no longer hold the opinion that trigger.macrodroid.com is at fault. Funny thing is everything was working great for awhile, and then motorola pushed Android 11 update to the phone and I happily accepted :-/ perhaps my bad.
 

JPM

New member
Playing with the WiFi AP's settings...
DTIM (Delivery Traffic Indication Message) period
(ATF) Airtime fairness
(U-APSD) Unscheduled Automatic Power Save Delivery
...made no difference, when the screen was off, notifications were still delayed, or didn't happen at all until screen was turned on

What works to keep notifications fast? Macrodroid > Macros > "WiFi keep alive" >T= Interval: 10s, A= HTTP Request (GET), C= WiFi connected
T= we'll see if I can live with the battery life consequences of doing this every 10s
A= using an HTTP get request to a home automation server on my LAN that simply replies with "ok" and not a full HTML page, for sake of speed and bandwidth
C= when connected to my home's SSID

Posted for posterity, and my apologies for being the one hammering your server today during tests.
 
Last edited:

MacroDroidDev

Administrator
Staff member
I suspect as you probably already know that this is just a fairly normal delay with Firebase Cloud Messaging when your device is in a sleeping state. Thanks for sharing your findings and I'm glad to know that it's not my server crapping out that is causing your woes!
 
Top