Logic Machine Forum
Javascript to check lost communications - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Javascript to check lost communications (/showthread.php?tid=3817)



Javascript to check lost communications - Leo681 - 17.01.2022

Is there a way to check in the Custom Javascript if there is communicaiton with the LM?

Smetimes the clients loose comms and the touch screen seems to work, but all actions are not sent to the LM.

Thanks in advance,

Leonardo


RE: Javascript to check lost communications - admin - 18.01.2022

There are two events that you can use:
Code:
$(localbus).on('connect', function() {
  console.log('connected');  
});

$(localbus).on('disconnect', function() {
  console.log('disconnected');  
});