This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Strange behavior after connection change
#1
Hi
I've found a problem in touch mode. Sometimes when a  connection is lost and re-opened again the visualisation looks like everything is OK but in reality it has stopped sending and receiving data. The only option for an user is to reload the page. The worst is the user can't see the visu has been disconnected. This is very frustrating because he things he made some change but it hasn't been applied.
The same situation occures when you change the connection from LTE to WiFi or back.

Do you have any workarounds like:
1. Inform the user "You are offline"
2. Show "Reconnect" button
3. Repeatedly trying of doing auto-reconnect

OS: Android 6.1, browser "browser".

Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#2
Have you tried using Chrome instead? Auto-reconnect is already implemented, but I'm not sure if OS is reporting problems correctly when switching connections.
Reply
#3
I installed chrome and it looks OK. So it's probably a workaround of the part of the problem.
The second part occurs if the user is really offline. May I inform him somehow? The best solution would be to disable controllers (and show it) until he is back online.

Ad Chrome, the problem persists if you add the page to your Home screen as a web app.
The page will never reconnect in this case.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#4
Sorry, but this is really annoying. For some reason my VPN had disconnected when I was doing some settings in the building. The visualisation was runnimg in fullscreen so I didn'd noticed the VPN state change.
Wouldn't be really possible to show a small "you're offline' message somewhere in case I don't know for example there was no traffic between the client and LM in the last minute?
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#5
Add this to Custom CSS:
Code:
.offline {
  position: absolute;
  z-index: 9999;
  top: 10px;
  right: 10px;
  padding: 10px;
  background-color: rgba(255, 0, 0, 0.5);
}

And this to Custom JS:
Code:
$(function() {
  if (typeof localbus !== 'undefined') {
    var offline = $('<div class="hide offline"></div>')
      .text('No connection')
      .appendTo('body');

    setInterval(function() {
      offline.toggleClass('hide', !!localbus.ws);
    }, 1000);
  }
});
Reply
#6
Hi Admin,

Will this be default included in the next FW with a enable/disable parameter in the vis config?

BR,

Erwin
Reply
#7
Not yet decided Smile
Reply
#8
Hi Admin,

Just tested it, but if you decide to include it default in the FW maybe a bootbox would be better noticed then a div in the visu.

Please take that into account when making your decicion (;

BR,

Erwin
Reply
#9
hmm, Don't work for me.
I have the message always display event if connected...
Maybe I did something wrong, but don't know what.

I tried on hL, latest FW. Will try later on LM.

One question about the JS.
The loop is true untill disconnection so after 1s the hide class is remove?
Reply
#10
There's no loop but a timer which runs every second.
Reply
#11
Hi,

I have same on HL, showed even when connected, will check tonight why..

BR,

Erwin
Reply
#12
Randomly works. My observation is it depends on disconnection type. For example if the disconnection is triggered by sleeping of the mobile phone then the message is not shown.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#13
It won't happen instantly anyway. For example, if you disconnect the Ethernet cable from the device it will take some time for the OS/browser to report a connection error.
Reply
#14
Hi Admin
It's correct the messagebox is not shown immediately. But believe me I've an Android 4.2.2 device at my desk with Chrome 55 installed on, connected via Ethernet cable. So I can simply unplug it. I tried different users (under both touch and user modes) but I've never seen the "Offline" message at this device.
I have been waiting for more than 10 minutes for the message.
I tried to install Opera browser to this device. Here I saw the message only once - when I was logged out.
There's no proxy server on the device. I really don't know why the message hasn't been shown.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply


Forum Jump: