Temporarily Disabling Lights and limiting max brightness?

Discussion in 'C-Bus Wired Hardware' started by IanCun, Sep 28, 2015.

  1. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    I've got a 5500PACA pascal unit for logic programming, plus one of the new eDLT units to store scenes. I had an idea for a setup I can use to automate how I use the lights when using my telescope in the garden.

    I'm trying to add a button to the eDLT which I can toggle on/off to do the following:

    • Turn off outdoor lights (all on one dimmer output, controlled via outdoor light sensor).
    • Limit max brightness of all other lights to 20%
    • Fade all lights that are currently on down to new 20% max level

    I'm a novice to c-bus and I'm not sure on the best way to go about doing this. Is there a way to avoid using the logic engine? I'm unsure of how to disable the outdoor lights when the existing light sensor will keep checking light levels to turn the lights on.
     
    IanCun, Sep 28, 2015
    #1
  2. IanCun

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    You should be able to do this without the PACA by utilising the logic in the output dimmers. You need to create a new GA that will be used to set the maximum brightness. Put this in the logic section for all required output channels and set the function to MIN. Under normal operation this GA will be set to 100% and therefore not affect the output. Your scene just has to set it to 20% to limit the max brightness then back to 100% when you are done. You could try ramping this value down to 20% but I have no idea whether the dimmers will honor ramp commands for logic GA's (I've never tired it).

    Then just create a scene to do what you want, including this GA.

    To disable the sensor, create another GA for it's enable/disable function and put this in the same scene.

    You will need 2 scenes. One to set it all up, and the second to revert it back to normal operation. If you want to do this with a single button look here:

    http://www.cbusforums.com/forums/showthread.php?t=12401
     
    Last edited by a moderator: Sep 30, 2015
    Ashley, Sep 29, 2015
    #2
  3. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    Thanks Ashley, I'll have a go of this now. I've taken a backup of the current programming, so I can have a dabble.
     
    IanCun, Sep 29, 2015
    #3
  4. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    I've had a go at this in the Toolkit, but I think I'm more likely to understand how to do things via Pascal after all (using the groups/logic for the dimmers in toolkit is too unfamiliar). I've created a few simple modules before and they work well, so perhaps this is the route I should stick to.

    I've added an enable switch to my eDLT, which I can get to run code once when it is set to "on" or "off". Is there a command to disable the light sensor and set max lighting levels that I can use in Pascal? I've had a read through the docs, but I can't see anything (just things like setting current brightness, which I can use to turn off the outside lights).
     
    IanCun, Sep 29, 2015
    #4
  5. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    I read up on the sensor docs which explained a bit about how to enable/disable it via the toolkit. I've managed to get an switch to toggle an enable on/off, which can then disable the light sensor (combined with some code to disable the outside lights).

    That's half the job done :D. I'm going to tackle setting all lights to have a max of 20% brightness tomorrow.

    Thanks again for the help, I'd be lost without this site :).
     
    IanCun, Sep 29, 2015
    #5
  6. IanCun

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Personally I would spend the time to understand the output unit logic. It's much simpler really and much more efficient in operation. It's really not that complicated and you should be able to get it done in a few minutes work.

    If you really want to use logic, the SetLightingLevel and/or SetLightingState commands should do all you want. Stopping the lights being turned up above 20% will be an interesting exercise. So much easier using the output unit logic.

    To trigger logic from a switch, you need to set the switch to just an ON function. Then when the logic triggers with a ONCE command, set the group back to OFF in logic. This way you won't loose any presses.
     
    Ashley, Sep 30, 2015
    #6
  7. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    Sorry for the slow reply Ashley and thankyou for your help.

    As disabling the lights works well via Pascal/eDLT, I've kept the programming rather than switching over to unit logic - as even if it should be simpler I can't get my head around it! :eek:

    Is it even possible to limit the max brightness to 20% for all the lights in the house? I had a good read of the programming documentation this morning, but couldn't see anything relating to it?
     
    IanCun, Oct 5, 2015
    #7
  8. IanCun

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    OK, step by step setting up output logic:

    1/ Open up the output unit and select the LOGIC tab
    2/ On the first line of the logic groups place a tick in the channels you want to limit.
    3/ Click the + button to create a new ga and call it say "Max Level"
    4/ Select MIN

    It's all done.

    Now open a switch and assign the "Max Level" to one of the keys, and set its function to Dimmer. It will now control the max brightness for all the channels you have selected. If you just want to swap between 100% and 20% set Short Release to ON and long press to recall 1, then set recall 1 to 20%

    This way you can control any number of lights you desire with little effort.

    To do the same thing in logic, you either need to test each GA independently and if it is greater than 20%, set it back to 20%, or else set up an array containing all the GA's you are interested in and loop over them.

    The problem with doing this in logic is that the ga must actually go over 20% before you get to it, so if someone turns on a light it will probably flash briefly to 100% before the logic gets to it.

    Just use the output unit logic. Its what it's there for.
     
    Ashley, Oct 7, 2015
    #8
  9. IanCun

    IanCun

    Joined:
    Sep 6, 2012
    Messages:
    71
    Likes Received:
    0
    Location:
    UK
    Thanks for the step by step instructions - it sounds like that's the only way to go about it, so I'll give it a shot at the weekend :).
     
    IanCun, Oct 8, 2015
    #9
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.