gmail IMAP idle stalls after a while?

blysik
Posts: 213
Joined: Tue Jan 06, 2015 6:05 pm

gmail IMAP idle stalls after a while?

Post by blysik »

Setup gmail running via IMAP and IDLE. Things work fine for a while, then in my logs I see something like this:

Dec 15, 2016, 4:28:13 AM
Better Email Debug Gmail IMAP: IDLE Event Received
Better Email Debug Gmail IMAP: Doing checkMsgs
Better Email Debug Gmail IMAP: msg_ids = ['']

Dec 15, 2016, 4:29:30 AM
Z-Wave received "002 - Luminance" sensor update to 0 lux

Dec 15, 2016, 4:36:00 AM
Better Email Debug Gmail IMAP: IDLE Event Received
Better Email Debug Gmail IMAP: Doing checkMsgs

And it just stops. It doesn't do anything after that until I restart the Better Email plugin,.

Any ideas? Thanks.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: gmail IMAP idle stalls after a while?

Post by FlyingDiver »

As far as I can tell, it's a Gmail bug. It just stops sending to IDLE connections. The best I can suggest is that you set a schedule (hourly, maybe) that disables then enables the GMail server device. That will cause it to reconnect to GMail. Just make sure you delay the enable action by 10 or 15 seconds after the disable.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
blysik
Posts: 213
Joined: Tue Jan 06, 2015 6:05 pm

Re: gmail IMAP idle stalls after a while?

Post by blysik »

Sounds good. I'm having trouble finding my IMAP server device under the Actions. Am I missing something obvious? I can't get to it via 'Device Actions' or 'Better Email' actions.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: gmail IMAP idle stalls after a while?

Post by FlyingDiver »

Enabling/disabling devices is an Indigo server action. So Server Actions -> Enable/Disable Actions
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
blysik
Posts: 213
Joined: Tue Jan 06, 2015 6:05 pm

Re: gmail IMAP idle stalls after a while?

Post by blysik »

Aha! Got it, thanks.
Bollar
Posts: 528
Joined: Sun Aug 11, 2013 3:14 pm

Re: gmail IMAP idle stalls after a while?

Post by Bollar »

FWIW, I have been using the following Python script to do a restart:

Code: Select all

plugin = indigo.server.getPlugin("com.flyingdiver.indigoplugin.betteremail")
if plugin.isEnabled():
   plugin.restart()
Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: gmail IMAP idle stalls after a while?

Post by FlyingDiver »

Bollar wrote:FWIW, I have been using the following Python script to do a restart:

Code: Select all

plugin = indigo.server.getPlugin("com.flyingdiver.indigoplugin.betteremail")
if plugin.isEnabled():
   plugin.restart()
That certainly will work, but I'm thinking why restart the whole thing when it's just the one connection that needs a restart? Though I think I was the one that told you to do it that way.

I guess I could add an action that would restart the connection. Not sure it's worth the effort. :)
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Bollar
Posts: 528
Joined: Sun Aug 11, 2013 3:14 pm

Re: gmail IMAP idle stalls after a while?

Post by Bollar »

FlyingDiver wrote:I guess I could add an action that would restart the connection. Not sure it's worth the effort. :)
Probably not. This account is pretty much my sole remaining tie to Google, so perhaps I'll migrate to something else...
Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts
Post Reply

Return to “Better Email”