Override For Light level sensor

Discussion in 'C-Bus Wired Hardware' started by Brianman, Sep 24, 2014.

  1. Brianman

    Brianman

    Joined:
    Aug 3, 2004
    Messages:
    4
    Likes Received:
    0
    Location:
    Durban;South Africa
    Hi is there a way to disable the light level sensor (5031PEWP,GY) during the day in order to test which outside lights need replacing from a switch on a touch screen .
     
    Brianman, Sep 24, 2014
    #1
  2. Brianman

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    Use the Enable Group option of the sensor. Create a group address called, say, "Enable Light Level Sensor", select it in the Enable Group option. Stick a button on the touch screen (or wherever) to turn the group on or off as required, and another button to turn the lights on for testing.

    Alternatively, use the OR/MAX logic in the output units. Create a group address called, say, 'Test Lights' and stick it on a switch. On the output units controlling the lights, go to the logic tab , enter this group address and select the appropriate channels in the check boxes. Select OR for a relay unit, or MAX for a dimmer. When TestLights ga is on, the lights will be on regardless of what the sensor is doing.
     
    Ashley, Sep 24, 2014
    #2
  3. Brianman

    Nick G

    Joined:
    Jun 19, 2014
    Messages:
    6
    Likes Received:
    0
    Location:
    New Zealand
    Hi Ashley,

    Is there any documentation on how to recreate the OR/MAX functionality as above using the PAC logic engine?
    The lights I am trying to control are on DALI so there is no logic tab to make it easy.
    I have 1x multi sensor and 1x EDLT controlling the DALI lights.

    If the user turns the lights on from the EDLT (override on), I don't want the lights to turn off after the timer on the multi sensor has expired.

    If the lights are off at the EDLT (override off), the sensor will turn the lights on when movement is detected and turn the lights off when the timer expires.

    Ive searched the forum and haven't found what Im looking for, however you seem to be the person to ask.
    Any help would be greatly appreciated.
    Thanks
     
    Nick G, Feb 22, 2019
    #3
  4. Brianman

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    Unfortunately there is no way to tell which unit originated a command which makes doing what you want a bit complicated. What you could do is set up the Edlt to control the light, then set up the sensor on a separate ga. Then in logic when the sensor ga is triggered, test if the light is off, and if so issue a pulse cbus command for the required duration. The only issue with this is that the sensor would not retrigger as the logic would ignore future sensor trigger commands because the light would already be on. It would then time out and trigger again when there is movement. This may be ok though. Something like:

    Code:
    once GetLightingState("sensor trigger ga") then
    begin
      if GetLightingState("Light ga") = OFF then PulseCBusLevel("Local", "Lighting", "Light ga", 100%, "0s", "0:00:15", 0%);
    end;
     
    Ashley, Feb 22, 2019
    #4
  5. Brianman

    Nick G

    Joined:
    Jun 19, 2014
    Messages:
    6
    Likes Received:
    0
    Location:
    New Zealand

    Thanks for your reply Ashley. The retrigger part may be an issue. However what you have said has given me an idea. What if I had 3x group address. One for edlt, one for sensor and one for the dali light.


    When edlt GA is on, use the track function to make the dali GA mirror what the edlt is doing.


    Then when sensor GA is triggered, turn on dali group regardless off the state of the edlt. Or it could even match the state of the edlt.


    When sensor expires and sensor GA turns off, check if edlt GA is off and if so turn off the dali GA.


    Would this work, and if so what is the cleanest way to write the logic code. I’m still learning.


    Thanks again.
     
    Nick G, Feb 24, 2019
    #5
  6. Brianman

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    Using 3 groups is possible but a lot more complex if you want a dimming function. You have to check in logic if the ga from the switch is ramping, get the ramp rate and then issue a ramp command on the lighting ga. So the logic will have to check if the switch ga has changed, then you can use the getCbusRampRate function to see if it is ramping, then the getCbusTargetLevel to see where it is ramping to. See how you go :)

    If I get a minute I'll have a go at it
     
    Ashley, Feb 27, 2019
    #6
  7. Brianman

    Nick G

    Joined:
    Jun 19, 2014
    Messages:
    6
    Likes Received:
    0
    Location:
    New Zealand
    Thanks for pointing me in the right direction. I'll give it a shot.
     
    Nick G, Feb 28, 2019
    #7
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.