heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)

First, I have tried the Push Notification Fixer App from Play Store to adjust the hearbeat and have had no luck in the past. On the use of Pushbullet for notifications, I believe this would not give you the voice notifications you get with Vera Alerts. To me, those voice notifications are the best thing going for Vera. I rely on them big time.

I just created two tasks and profiles in tasker to make my phone turn off wifi anytime my phone display is in the off state and turn wifi back on anytime the phone display is in the on state. So far it seems to work fine and resolve the push issue while hopefully cutting down my data use while at home. Tired of sacrificing my data for the ability to get timely notifications. I wish I could find a router to resolve this issue. Still looking. Agree with tom, the comcast router is a joke at best.

Shawn what interval do you have between turning off the wifi and back on?

Pretty new to tasker but I think the answer is none. I simply created two separate profiles and two separate tasks. Does this help? Playing with Autovoice now… :slight_smile:

I’m giving this a try in tasker as well.

I first set up the display state off = wifi off portion of it, and upon doing so received a note that wifi would return to its previous state when the profile became inactive.

As such I only have the one profile setup (turns wifi off when display state is off) and it automatically turns wifi back on if I had it on prior.

Will see if this works out…

Those are probably good ideas too. I’m one of those that has the screen timeout set for 10 minutes. That’s just me. Since I already occasionally get disconnect/reconnect I could probably set this up for whatever interval. The tricky thing for me is the interval without killing battery, might not be to bad but there’s some articles indicating timeouts on ports somewhere like 17 minutes or something I read so if you miss the interval and switch to 4g to late you could still encounter latency. Eh, I’ll experiment on it.

Seems to have resolved my issue while still spending most of my data on wifi. Notifications are solid and fast. Right on time. Keep us posted.

If you are interested, get the app on mios called Push Notification. You can then sign up for various push accounts. I used pushover. I paid for the android app, $4.99.

So my point and a caveat…

Looks like development stopped and it doesn’t send the messages in UI7 however if you by chance run the AltUI plugin on this forum (I highly suggest you do) it works from there.

The app is designed to be able to code a scene. You could silence the notifications so you don’t see them but the purpose is to keep your GCM port alive since they are push messages.

I’ll try and experiment to see. I know it’s an app cost and partially broke since you have to get AltUI to see if it works but whatever solution is best for each person.

Please do let us know. I really don’t mind the $5 for a fix. I am still on UI5, “if it ain’t broke” LOL

Any thoughts on Android apps like Keep Wi-Fi alive?

I think any new phone shouldn’t have a need for keep wifi alive app. In our advanced settings you know there is keep wifi on during sleep and judging by your Tasker screenshots, looks like you have a Samsung phone…just guessing.

I set up a scene in AltUI (this is a mod for the entire Vera UI. It works for UI5 too).
http://forum.micasaverde.com/index.php/board,78.0.html
Have a look, custom themes, advanced options, all sorts of goodies.

I believe for the Push Notification app for the Vera, somewhere they have a device variable wrong which I’ll look at later but after getting it to work in AltUI, the Vera UI now shows the app working correctly however I can’t send manually from the Vera UI but not a problem since the AltUI scene works like a champ.

I set it every 1 minute, works great but that’s a test, so now it’s every 15 minutes. I hide notifications from the Pushover app on the phone.

There was a site that went in depth on the GCM polling interval…can’t find the darn site…talking about 3g/4g having sockets open for 17 minutes or something while home wifi was 28 minutes. I could be saying this wrong but the point is 1 message every 15 minutes is being sent by Vera which is always on and internet connected to work to keep your phone’s push active.

I can’t say this has solved it, I’ll have to notice a problem or lack of problems before I know for sure.

You are mixing apples and oranges.

The problem is not to keep the WIFI active … it’s to keep a particular socket active.
Socket’s are being closed because of inactivity … a socket is a link between an APP and a server.
In this case from the Google Play Services APP and the Google GCM server.

Opening another socket from a different app to a different server does not change this behavior.

Techniques to solved the problem involve sending packets at a LOWER LEVEL network stack protocol, in a manner that do not impact the higher level protocol.
This is typically only available to apps running as ROOT.

Hi Richard, I agree with you in terms of keeping the socket alive, that is my goal. Normally apps would open some form of upnp socket and that is why I would agree it might not do what I’m looking for, however here: http://updates.pushover.net/ is a snippet that leads me to believe I’m on the right trail:

In early versions of Android, Google provided a mechanism for apps like Pushover to receive notifications called C2DM, which Pushover used until Google deprecated it in June 2012. In version 1.6.2 of Pushover for Android we started switching devices to Google?s new notification system called GCM, which the majority of Pushover users are now using. In August 2014 we finally removed all support for C2DM in our Android app and required all new devices to use GCM.

I can’t root the Note 4 the way I would like, they only have a temp root solution that I do not care for. Otherwise your comments about lower level network stack I’m in agreement with.

So my point is I will simply run some tests to see if the outcome helps me. If it does then I will stick with it. If it does not then that is that.

With C2DM and GCM the APP (i.e PushOver or Vera Alerts) never actually open the socket … The socket was always managed by Googles Software … for GCM it’s Google Play Services. The Google software calls back apps on the Android (PushOver, Vera Alerts, App Store Updates, …) when there is data for them. The idea behind C2DM/GCM is that there is only a single network socket polling loop, independent of the # of application protocols an Android App was running. Having servers that can handle an unbounded number of connections is a technically challenging job … and Google decided it would be best if they managed that problem.

You can’t get at the socket for that … With root you can find the socket and do some low level socket communication that does not effect the higher level socket protocol.

You may help for the cases where the LOCAL phone hardware is dropping the connections because of data inactivity. That’s the case for S6 running IPv6.
The only way to solve this for everyone is for Google to lower there interval (or at least provide an option for users to lower the interval) to a value that is smaller than ALL
of the HARDWARE between the APP and the Server that is looking to drop connections to save resources:

This includes:

  1. Your Phone (power savings)
  2. Your Data Carriers (free up server resources)
  3. Google (I am pretty sure they are not dropping the connections)

FYI - I just recently received an update to my Samsung Galaxy S6 Edge through Verizon. I noticed in the notes it mentioned “IMPROVED WI-FI PERFORMANCE”. Since the update, my alerts, Pandora and other apps that were being delayed and effected by being on Wi-Fi seem to be working as they should, even while on Wi-Fi. Meaning, no need for my tasker fix to turn the Wi-Fi off while screen is locked and back on when screen is unlocked. Just wanted to pass along that it looks as though this issue is finally resolved!!

Is that the 5.1 update? I wasn’t sure if M was available yet.

Looks like I am on 5.1.1

Ok, I think the Note 4 for Verizon will be February and not sure if it will be 5.1.1 or M. But this is better news. Thanks!

Looking forward to marshmallow myself! Keep me posted when you get your update and let me know if that did the trick. There is a light at the end of the tunnel. Luckily, for me, it wasn’t a train :slight_smile: