PIR Triggers and Overriding PIRs

Discussion in 'General Discussion' started by Robbo_VIC, Jul 19, 2012.

  1. Robbo_VIC

    Robbo_VIC

    Joined:
    Jan 24, 2011
    Messages:
    143
    Likes Received:
    0
    Location:
    Melbourne, VIC
    Hi All, I have a project where there are multiple rooms with 360 degree Internal PIRs and key switches for lights in said rooms.

    Whats the best way to have the PIR pulse the GA for 5 mins, but the switch will be an on/off for the GA and also disable the PIR when the GA is turned on by the switch. I also have a Wiser in the installation.

    My first solution was to use blocks and have a second (override) GA assigned to the same button, which is also assigned as the PIR Disable. Then i ran into the problem of some rooms having DLTs, so there are no free blocks. I also want the Wiser Widget to be able to turn on/off/dim the GA, which will also activate the Disable group to override the PIR.

    I'm thinking I need the GAs:
    1. LIGHTS (the dimmable lighting circuit)
    2. PIR TRIGGER (an address which gets pulsed for 3 seconds whenever movement is picked up. Wiser logic written for when this GA is ON and time > sunset etc pulse LIGHTS)
    3. PIR OVERRIDE (PIR is disabled when this is ON)
    4. MANUAL TRIGGER (Assigned to button as dimmer)

    Logic: When MANUAL TRIGGER = ON, set PIR OVERRIDE = ON and LIGHTS = ON

    When MANUAL TRIGGER = OFF, set LIGHTS = OFF, delay 5sec, set PIR OVERRIDE = OFF

    Firstly, this seems like too many GAs to keep track of for 1 circuit, and secondly, how can i set LIGHTS to follow the dimmed level of MANUAL TRIGGER so that to the client it just seems like the button or wiser widget controls the lighting circuit directly?

    Any ideas on the best way to get around this?
     
    Robbo_VIC, Jul 19, 2012
    #1
  2. Robbo_VIC

    ashields

    Joined:
    Feb 2, 2011
    Messages:
    20
    Likes Received:
    1
    Location:
    Nottinghamshire,UK
    I tend to use two GA's , an "auto" one for the PIR (or in this case the wiser logic) and one for the switch, and use OR logic for the two GA's on the output unit.

    The downside of this approach is that if the brightness level set by the switch is lower than that set by the PIR/logic you get annoying brightness level changes as the PIR triggers.

    To handle the sunset I have the PIR set to a third GA and my wiser switches the above mentioned auto GA, a more efficient way would be to have the PIR enable/disable group set to a sunset GA which is just toggled twice a day at the appropriate times by wiser.
     
    ashields, Jul 22, 2012
    #2
  3. Robbo_VIC

    Robbo_VIC

    Joined:
    Jan 24, 2011
    Messages:
    143
    Likes Received:
    0
    Location:
    Melbourne, VIC
    thanks ashields, the problem with the single GA to enable/disable the sensor is that after say 11PM the lights need to come on at a lower level.

    After speaking quickly with Darren this morning, i have used the TrackGroup function. So far i have this for my logic:
    Code:
    {Logic for PIR Triggers depending on day or night}
    once (GetLightingState("PIR Trigger Pantry") = ON) then
    begin
      PulseCBusLevel("local", "Lighting", "Pantry", 100%, 0, "0:00:05", 0%);
    end;
    
    once HasChanged(GetLightingState("Manual Pantry")) then
    begin
      TrackGroup("local", "Lighting", "Manual Pantry", "Pantry");
      if (GetLightingState("Manual Pantry") = ON) then
      begin
        SetLightingState("Override PIR Pantry", ON);
      end;
      if (GetLightingState("Manual Pantry") = OFF) then
      begin
        Delay("0:00:02");
        SetLightingState("Override PIR Pantry", OFF);
      end;
    end;
    I've tested this using the Workspace area and everything seems to be good, except when i ramp the manual switch to a certain level, the light keeps ramping even after i stop. I'm thinking the TrackGroup function might need to be run again after the ramp is released... Is it bad to have the TrackGroup function running every cycle? Also the problem with having that function outside of the HasChanged query is that then the PIR Trigger part of it wouldn't work, as it would always be tracking the manual group.
     
    Last edited by a moderator: Jul 23, 2012
    Robbo_VIC, Jul 23, 2012
    #3
  4. Robbo_VIC

    Robbo_VIC

    Joined:
    Jan 24, 2011
    Messages:
    143
    Likes Received:
    0
    Location:
    Melbourne, VIC
    just realised the HasChanged function should be using a GetLightingLevel instead of a GetLightingState

    Tested on site and it all appears to be doing what i want it to be doing so far. The minor issue is the indicator on the switch is not showing the current status of the lighting circuit. I can probably do without this
     
    Robbo_VIC, Jul 24, 2012
    #4
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.