eDLT Logic Code Problems

Discussion in 'Pascal Logic Code Examples' started by IanCun, Apr 22, 2015.

  1. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    Hi folks, I've got my first eDLT installed and I've tried to create my first script thanks to some help from Daniel in this thread.

    I've got an eDLT with 2 buttons set, the first controls the "hall" lights and the 2nd is a switch to enable the "exit mode" state.

    I'd like exit mode to turn off all the lights, then when I re-enter the house (min 30 seconds later) and it's getting dark, I can wave my hand in front of the eDLT to trigger the prox sensor and the hall lights will turn on.

    So far, the lights turn off as expected when I enable exit mode, but as soon as the eDLT goes to sleep, the lights turn on to 90% (the default max on the dimmer module). When I wait over 30 seconds and wave my hand in front of the prox sensor, the lights will then illuminate as expected to 100%. If I turn off the hall lights from another switch after the unexpectedly re-light, then wave my hand over the prox sensor, everything seems fine.

    It seems that something turns on the lights to the default max when the eDLT sleeps, but there's nothing in the code to do this. I only discovered this accidentally as the dimmer units will normally only set lighting to 90% (thanks to a tip from this forum).

    Any thoughts on what this could be, or how I could troubleshoot it?

    Here's my very simple code:

    Code:
    once (GetEnableState("Exit Mode") = ON) then
    begin
      SetLightingLevel("All Lights", 0%, "8s");
      Delay("0:00:30");
      SetTriggerLevel("Main Door eDLT Proximity", "Main Door eDLT Proximity Off");
      SetEnableState("Exit Mode Armed", ON);
    end;
    
    once (GetEnableState("Exit Mode") = ON) and
         (GetEnableState("Exit Mode Armed") = ON) and 
         (GetTriggerLevel("Main Door eDLT Proximity") = 100% {"Main Door eDLT Proximity On"} ) then
    begin
      SetEnableState("Exit Mode", OFF);
      SetEnableState("Exit Mode Armed", OFF);
      if (Time > sunset - "10:00:00") then SetLightingLevel("Hall Lights", 100%, "4s"); 
    end;
    
    
    
     
    IanCun, Apr 22, 2015
    #1
    1. Advertisements

  2. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    It looks like there was a conflict with an existing scene, as when I removed all scenes and started from scratch this works :).
     
    IanCun, Apr 24, 2015
    #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.