Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Losing http gateway connection on tablet sleep or lock

Since Android version 2.0 I have noticed that my Nexus 7 has been missing commands to my ISY994i. I would have to re-sync to get the commands to execute. Losing the connection to this http device seemed to only happen after I was ending a session of movie watching or gaming. I did some initial testing and couldn't get it to repeat while I was actively using the tablet.

Further testing has led me to the conclusion that iRule is dropping the connection to the http gateway when the tablet goes to sleep or gets locked. I can repeat the behavior when those events occur. The dropped connection appears to be permanent until a resync occurs, although sometimes it does seem to pick it back up. When the commands don't run, I can open a browser window with the page for my ISY and execute the commands right away from there (showing that the tablet itself can still talk to that device).

Again, this behavior was not noticed until the upgrade to version 2. I am running 2.0.6 (1700) on a first gen Nexus 7. ISY is an always-on device so there shouldn't be any waking needed on that side of the interface. Any suggestions would be greatly appreciated.
3 people have
this problem
+1
Reply
  • I should add that commands within the same macro that runs the ISY commands perform as expected. I have a Network gateway to my Onkyo and a Global Cache gateway to all my IR and RS232 devices. Those commands work fine even when the http gateway commands fail.

    Android version 4.4.2
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • I have been having similar issues as well. I have been losing IP communication with devices when the app has been running long periods, To fix I just have to restart the app. Other apps running on me device do not seem to have the same problem.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • I am trying to test this issue of dropping gateways. It has been occurring inside drawers as well. So it is an issue we are aware of and trying to fix.

    Scott
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Thanks Scott. Yep, my system off macro is in a drawer and that's where I most often see the missed commands.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • I’m frustrated
    Sorry to keep bumping this thread, but this is a major source of frustration when it happens. Any update?

    It can be annoying when you are trying to show off what iRule can do and... oh, sorry it didn't work, just let me resync, wait a few minutes, get back to the page I was on...and hey yeah there, that's what I was trying to do. Doesn't reflect well on iRule as a product either.

    Maintaining a connection to devices is like the #1 thing this product should be rock solid at or it loses usefulness.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Would you mind emailing support@iruleathome.com I have some questions about your project that I would like to discuss over a direct email rather than open forum.

    Scott
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Any news on this? I'm having what I assume is a similar issue ( at least it's to do with the connection dropping on sleep. ) Essentially, the first command after the device ( in my case a Nexus 7 ) wakes up doesn't get sent - this is for a simple TCP command.

    Essentially, my helper device now controls everything so that I can re-use all of the iRule panels without duplication. I have a "Select Room" panel which consists of a link for each room - each button being a link to my "select source" page with a single command, which tells my helper device which room has been selected. ( It also sets a few iRule variables for things like the name of the room. ) I've now had to put this command twice on each button - otherwise when you wake up the Nexus 7, the command doesn't get run ( though it still jumps to the source select page, which is problematic as you can imagine. ) Putting the command on there twice ( with a 0.5 second delay ) works around the issue, but you couldn't do that with every single button on every page for obvious reasons! )

    What seems to happen here is that even though when the device wakes up it *looks* as though it's made a TCP connection to the gateways for the page, it actually hasn't. The connection is only made when you try to send the first TCP command, though iRule doesn't seem to realise that it wasn't actually connected and assumes that the command was sent. This is the most obvious example, but it seems to happen everywhere ( e.g. the Sky remote control page always seems to miss the first button you press after a wake up. )
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Do you have a time frame for when you wake the tablet from a sleep state? I have been trying to replicate this issue in our office for our developer but have been unable to.

    Scott
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited

  • First I think that my issue is slightly different to the one that this thread was originally about ( I posted again under the Android 2.1 release thread ) so maybe this needs it's own thread?

    Anyway, I've just carried out some tests and in my case it only affects one device, which happens to be my own iRule helper daemon. It may affect other devices but didn't on the page I tested. As far as iRule is concerned, this is just a device which only has network codes which I've created. Time after sleep seems to make no difference.

    I have a page which contains only links, and those links only have commands to my helper. When you put the tablet to sleep, the connection to my helper drops, as confirmed by both a log message, and tcpdump. When you wake the tablet, the connection status icon is green, BUT no attempt to reconnect to my helper is made, again as confirmed by both logs and by tcpdump. Pressing a link causes the connection to be made, but the first command is never sent.

    Interestingly, there is another page that I use to control one of two sky boxes. This page uses four devices in total - all proxied through my helper but as far as iRule is concerned they are connected to channels on Global Cache devices. When you wake this page from sleep, the three Global Cache connections are made immediately, but the fourth connection to my helper is not, and follows the above pattern. It may be that it affects all non Global Cache devices but I haven't had a chance to test.

    Let me know what you want me to do in order to help you test this. I can obviously send you a backup of my config if it helps ( to where? ) but also if you have a Linux box or VM knocking about then I can compile my daemon for whatever flavour it is so that you have both ends of the connection.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned happy, confident, thankful, excited