LUA Levels

Discussion in 'C-Bus Automation Controllers' started by magic8, Oct 5, 2021.

  1. magic8

    magic8

    Joined:
    Jan 6, 2009
    Messages:
    97
    Likes Received:
    1
    Can anybody help with simple script
    how to set a limit for a group after a certain time
    i have set up a dummy group for the time i need it limited
    eg if group 6 selected on by pir at night set to 15%
    thanks
     
    magic8, Oct 5, 2021
    #1
  2. magic8

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    What exactly are you trying to accomplish here? What's it's purpose? Do you want the group to come on at different levels for different times of the day? Do you want to be able to change it manually after it has been set?
     
    Ashley, Oct 5, 2021
    #2
  3. magic8

    magic8

    Joined:
    Jan 6, 2009
    Messages:
    97
    Likes Received:
    1
    Sorry for not explaining it very well
    motion sensor brings ensuite lts on at 100% during day
    At night would like sensor to bring them on dim say 15%
    My scripting brings them on dim at night but only after they have got to 100% then they dim down!!!!
    So just need them not to go bright first
    Thanks
     
    magic8, Oct 6, 2021
    #3
  4. magic8

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Do it the other way around. Get the sensor to always turn it on at 15%, then the script to set it to 100% during the day. You won't notice the initial 15%.

    There are also other ways you can do this without a script.

    First just using the sensor. Set Movement in light to 100% and movement in dark to preset 1 and set preset 1 to15%. Set the sensitivity so movement in light isn't triggered at night once the light is on at 15%.

    The senond option is to set the sensor to always turn the light on to 100%, then use logic in the output unit to limit it to 15% at night. Create a new ga and assign it to one of the logic channels and select MIN as the function. Create a schedule that sets this ga to 100% in the morning and 15% at night.
     
    Ashley, Oct 7, 2021
    #4
  5. magic8

    magic8

    Joined:
    Jan 6, 2009
    Messages:
    97
    Likes Received:
    1
    I think I am going nuts
    how do i get the sensor to always turn on at 15%?
    Also when i select preset 1 obviously i lose the movement in dark so it does not activate.
    SORRY TO BE A PAIN!!!!!!
     
    magic8, Oct 7, 2021
    #5
  6. magic8

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Uncheck "Use same response. setting ..." if it's there.
    Put the ga in both ML and MD.
    Go to the functions tab and for ML set On Key, Retrigger Timer, Retrigger Timer, idle.
    For MD set Recall1, Retrigger Timer, Retrigger Timer, idle.
    Go to blocks tab and set recall 1 to 15% for the ga.
     
    Ashley, Oct 7, 2021
    #6
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.