We have moved at community.getvera.com

Author Topic: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)  (Read 8574 times)

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #15 on: September 30, 2015, 12:43:39 am »
Hey Tom, thanks for your expertise on the subject. Yikes, I get the feeling if you can't beat it, I don't know that it will be beaten LOL The timeout issues sounds like the real deal and perhaps makes some sense of why the original poster, gsheremeta, seems to have resolved his issue by replacing his new version router with a much older router. Perhaps the timeouts are different. gGsheremeta mentions he felt it was an ipv6 issue. I could not conclude the same result as it didn't work for me when I turned off ipv6 on my comcast router. This does provide a shred of hope though :-)

Question, do you know of a router that would provide such capabilities? I would be more than happy to purchase a more robust router with additional options to resolve this issue once and for all.

Again, thanks for your input and contribution to the cause!!

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #16 on: September 30, 2015, 04:07:22 pm »
Hey Tom, thanks for your expertise on the subject. Yikes, I get the feeling if you can't beat it, I don't know that it will be beaten LOL The timeout issues sounds like the real deal and perhaps makes some sense of why the original poster, gsheremeta, seems to have resolved his issue by replacing his new version router with a much older router. Perhaps the timeouts are different. gGsheremeta mentions he felt it was an ipv6 issue. I could not conclude the same result as it didn't work for me when I turned off ipv6 on my comcast router. This does provide a shred of hope though :-)

Question, do you know of a router that would provide such capabilities? I would be more than happy to purchase a more robust router with additional options to resolve this issue once and for all.

Again, thanks for your input and contribution to the cause!!

Hey Shawn, I'm not sure what router to choose. What I would tell you when researching is get reviews of the software on the router and what you can actually do with it. That might tell you if you can increase the timeout before a port will close it's connection.

DD-Wrt has cool software mods for the Buffalo routers which comes pre-loaded, that might do the trick.

I have the newer Comcast xfinity gateway. I was not able to find a way to turn off IPv6, how did you do it? Maybe I missed it?

I also thought about port forwarding GCM 5229, perhaps the rules of port forwarding on the Comcast router might have longer keep alives but I doubt it. If you explore this option make sure all IP's on your home network get this forwarded or no one but you will get push messages. :)

Make sure you review the ports, I think it is 5229 only but might need to look that up again.

Push NOtification didn't work because all it does is broadcast an intent. I configured Tasker to do this as well and proved with logs that it would send out the intent. But since there is no data to transmit it doesn't use 5229 to transmit anything thereby not "waking" the port up.

Good luck, I still face the problem and would like a fix where I didn't have to pay money. :(

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #17 on: September 30, 2015, 05:27:44 pm »
Thanks for all the input, will have to do some research on a good router. My guess, nothing I can easily buy/try/return at Best Buy for the sake of research. Headed out for the evening but I did want to share this image with you. I had called and asked tech support for Comcast how to disable iPv6 (insert grain of salt). This is what they had indicated would do the trick. Selecting and saving the bottom option, disable entire firewall for the iPv6 option. I agree my friend, paying more to get what should already work doesn't sound like fun LOL I do wonder if it's Comcast related though. I'm pretty sure they prevent me from getting 3D content over NetFlix as well. Both customer support departments are usually worthless.

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #18 on: September 30, 2015, 09:35:43 pm »
I don't think it's comcast only but Comcast seems to give us the Fisher price of options to control anything.

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #19 on: October 01, 2015, 10:24:17 am »
Would any of the other push software variations available under veraalerts potentially work around this issue?

I am not familiar at all with pushbullet or the other options to know if they use GCM.

Down the road I also want to attach pictures to alerts (once I have cameras...) which I suspect might only be available in the veraalerts app itself, or via SMTP (and I am trying to avoid using email for this).

Thanks both of you for the information you're sharing!

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #20 on: October 01, 2015, 10:40:10 am »
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.
« Last Edit: October 01, 2015, 11:45:01 am by ShawnInFL »

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #21 on: October 01, 2015, 12:53:22 pm »
Shawn what interval do you have between turning off the wifi and back on?

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #22 on: October 01, 2015, 01:06:24 pm »
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... :-)
« Last Edit: October 01, 2015, 01:13:21 pm by ShawnInFL »

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #23 on: October 01, 2015, 05:36:55 pm »
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....

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #24 on: October 01, 2015, 08:42:26 pm »
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.


Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #25 on: October 02, 2015, 12:55:08 am »
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.

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #26 on: October 02, 2015, 06:16:09 pm »
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.

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #27 on: October 02, 2015, 06:26:08 pm »
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?

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #28 on: October 02, 2015, 06:46:41 pm »
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.


Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #29 on: October 02, 2015, 08:09:02 pm »
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.