iPad SHAC display stops working intermittently

Discussion in 'C-Bus Automation Controllers' started by tassiebean, Jan 4, 2022.

  1. tassiebean

    tassiebean

    Joined:
    Dec 24, 2018
    Messages:
    30
    Likes Received:
    6
    Hi,

    I've had a 5500SHAC displaying onto a wall monted iPad working flawlessly for over a year. Recently I've noticed that the system stops working after perhaps a week (maybe 4 times in the last month). That is, the visualisation continues to APPEAR to work (sliders move, pages can be selected, etc) but the controlled items don't change. The fix is to force close the running Safari display, and start it again (i.e. open the SHAC web page again), and it all works again. Nothing needs to be power cycled, etc (i.e. the iPad or the SHAC).

    It 'seems' to have started happening after I upgraded the SHAC to the 1.10.0 firmware, but iOS on the iPad has also had some upgrades too, so hard to pin down to anything definatively.

    Has anyone else experienced this?

    Thanks, Phil
     
    tassiebean, Jan 4, 2022
    #1
  2. tassiebean

    tassiebean

    Joined:
    Dec 24, 2018
    Messages:
    30
    Likes Received:
    6
    Update:
    One of my customers who has had a 5500SHAC working on a wall mounted iPad for well over a year also reported this to me. He wasdn't too fussed, and was happy to close Safari and restart it again when the problem occurred.
    So, the good news is that it doesn't seem to be a SHAC issue (I didn't upgrade his to 1.10.0), so it must be the result of a Safari/iOS update that has occurred along the way.
    It's hard to replicate, apart from waiting for a few weeks for it to happen. I've completely reset a different iPad and put it on my wall to see how it fares, but since he's reporting the same thing as me, I'm not holding my breath. Might explore some different browsers (e.g. Chrome) running on iOS (actually iPadOS).

    Cheers, Phil
     
    tassiebean, May 24, 2022
    #2
  3. tassiebean

    tassiebean

    Joined:
    Dec 24, 2018
    Messages:
    30
    Likes Received:
    6
    PART SOLVED! OK, I'm a little surprised there hasn't been any response on this - I can't be the only one having this problem!

    Anyway, I had started to notice a pattern of it failing at the same time every week. Initially, I thought it was the same time every week, but that's not quite right. It fails exactly 7 days (to the minute) after the browser session is opened. That is, last week it stopped, so I quit and restarted the browser again at 5.37pm on 23 June.

    Tonight, I was waiting, and at 5.30pm 30th June it was still working. But 10 minutes later, at 5.40pm 30th June, it had stopped responding. Voila!

    Now I just need to figure what causes a Safari browser session to stop responding precisely 7 days after it is started.
    The PadOS version is 15.4.1.

    Any ideas, anyone?
     
    tassiebean, Jun 30, 2022
    #3
  4. tassiebean

    Nobes

    Joined:
    Oct 7, 2004
    Messages:
    164
    Likes Received:
    1
    Location:
    Hobart
    I've noticed something like this, I notice it because the time displayed on the screen is wrong. I presumed it was the wifi dropping out. I'll take notice of how often net time.
     
    Nobes, Jun 30, 2022
    #4
  5. tassiebean

    tassiebean

    Joined:
    Dec 24, 2018
    Messages:
    30
    Likes Received:
    6
    Yes, I programmed a large time display clock on my customer's display, and that's how he knows the problem has coccurred.

    Apparently, since Safari 13.1 and iOS/iPadOS 13.4, app data is deleted after 7 days, and I suspect that is the cause of the problem. I have programmed my SHAC to refresh the browser at 3am every night, and I'm hoping that might solve the problem. We'll see. I'll post the code if it does.
     
    tassiebean, Jul 11, 2022
    #5
  6. tassiebean

    zylex

    Joined:
    Jul 17, 2020
    Messages:
    9
    Likes Received:
    0
    If the above didn't help, it may also be worth checking if your DHCP lease expiry is set to 7 days and try changing that in the router and then renewing (or setting a static IP on the iPad) to see if it helps. From memory, iOS devices drop wifi and re-associate when renewing IP lease which could also be causing you issues. Not sure how long that's been the case or what iOS versions it's the case with, or if that's in any way related, but worth exploring if your browser refresh isn't helping.
     
    Last edited: Jul 20, 2022
    zylex, Jul 20, 2022
    #6
  7. tassiebean

    tassiebean

    Joined:
    Dec 24, 2018
    Messages:
    30
    Likes Received:
    6
    OK, refreshing the browser seems to have fixed it. Paste the following code into the Custom Javascript file:

    Code:
    // Here is a custom JS to refresh the browser from server side.
    // The refresh is triggered if the user updates the 'Browser refresh' user parameter.
    // This is scheduled to occur once a day (at 3am) to ensure Safari keeps working.
    
    $(function(){
      if (typeof grp != 'undefined') {
       grp.listen('0/250/560', function(object, state) {
         if (state == 'value') {
             location.reload();
         }
       });
      }
    });
    I created a User Parameter (Boolean) called 'Browser refresh' at address 560 (i.e. 0/250/560). Whenever that user parameter is changed, the browser refreshes.

    To make this happen on a schedule (i.e. at 3am every morning), I created a Sheduled Script (i.e. select Scripting>Scheduled>Add new script. Then create your script to occur everyday at 3am (i.e. parameters 0 3 * * *)
    This script simply toggles the 'Browser refresh' parameter (thus refreshing the browser via the javascript above). The scheduled script code is a single line as follows:

    Code:
    SetUserParam(0, 'Browser refresh', not GetUserParam(0, 'Browser refresh'))
    That's it. I hope this helps someone.

    Cheers, Phil
     
    tassiebean, Aug 8, 2022
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.