NAC Touchscreen Timeout and User Timeout Query/Scripting.

Discussion in 'C-Bus Automation Controllers' started by cbuslegend, Mar 4, 2020.

  1. cbuslegend

    cbuslegend

    Joined:
    Feb 24, 2020
    Messages:
    4
    Likes Received:
    0
    Hey guys,

    I was wondering if anyone could possibly throw some light on how on how to have the touchscreen timeout to a standby page after a certain number of seconds, say 60 of inactivity.

    Also the user would then have to enter their pin code on awakening the screen. Does anyone have sample lua scripting or is there a in-built function/feature that I've missed?

    Thanks in advance.
     
    cbuslegend, Mar 4, 2020
    #1
    1. Advertisements

  2. cbuslegend

    Spooky

    Joined:
    Aug 28, 2006
    Messages:
    14
    Likes Received:
    1
    Hi,

    You need to do it in "edit custom javascript" as it needs to be performed by the browser loading the page.

    This is found under tools on the scripting tab.

    Code:
    function defaultplan(){
        return function(){
        
          showPlan(Globals.defaultPlan || planids[ 0 ]);  // times out to plan id 0
        }
    }
    
    var t;
    
    $(document).on('click touchend', function(){ 
      clearTimeout(t);
    t =   setTimeout(defaultplan(),30000);     // 30000 ms time out
    });
    
     
    Spooky, Mar 5, 2020
    #2
    1. Advertisements

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.