Logic Machine Forum
Visualization, Pin code after wakeup - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Visualization, Pin code after wakeup (/showthread.php?tid=4023)



Visualization, Pin code after wakeup - Jonas S - 27.04.2022

Hello

Is it possible to somehow to get it to ask pin code after device has been inactive for x minutes in visualization. Like you can set it to dim and on wake up it would ask for pincode after that time


RE: Visualization, Pin code after wakeup - admin - 27.04.2022

Enable "Visualization pin code" in User access settings. Add this to Custom JavaScript. Inactivity timeout is 60 seconds, adjust as needed.

Code:
$(function() {
  var timeout = 60 * 1000;
  var oldfn = $.stopEvent;

  function ontimeout() {
    window.location = '/scada-vis/pin?return=index';
  }
  
  $.stopEvent = function(event) {
    clearTimeout(timer);
    timer = setTimeout(ontimeout, timeout);
    return oldfn(event);
  };
  
  timer = setTimeout(ontimeout, timeout);
});



RE: Visualization, Pin code after wakeup - Jonas S - 28.04.2022

Thanks, Works Smile


RE: Visualization, Pin code after wakeup - domotiqa - 12.01.2024

We have customer that control installation from computer, smartphone.... and there is also 2 big touch sreen in showroom with specific page only for this showroom. 3 pages: light, shutter and temp. Temp page is pin protected. However if someone use the pin to change temperature, then there is no need to put the pin again. They need to close Chrome webapp (android shortcut on desktop), to have the pin asked again.

I would use the trick you mention above, however, all other person using the LMĀ  (secretary, director...) in their office will have the same behaviour.

I can't find an option to ask everytime we click on the buton link of the link page.

I precise there is user access enable (one for direction one for showroom)


RE: Visualization, Pin code after wakeup - admin - 15.01.2024

One option is to add pin code protection to objects instead of a whole plan.

You can also modify this script so it runs only for certain users: https://forum.logicmachine.net/showthread.php?tid=5140&pid=33255#pid33255

Line 6 (window.location...) can be changed to showPlan(1); so a certain plan is shown instead of the global pin input when timeout happens. Change 1 to the default plan ID.


RE: Visualization, Pin code after wakeup - domotiqa - 18.01.2024

thks for your help