PIR on schedule for dual purpose.

Discussion in 'General Discussion' started by SeanA, Nov 14, 2019.

  1. SeanA

    SeanA

    Joined:
    Jul 3, 2017
    Messages:
    3
    Likes Received:
    0
    Location:
    Australia
    I'm using a 5753 sensor currently on light level for turning on hall lights after dark for 5 min. I now want it to also operate just one light group in a bathroom for simple 'on' function, then time out after 5 minutes and turn 'off' . I only want this function to happen between 10pm and 7am.

    Am I best using the PAC for this function? My thoughts are that I have a group called say "ABC" and when the sensor is breach it turns on ABC and then off again in 5 mins. Within the scheduler in PAC I would create two schedules. #1 is 24hr, is enabled by group "ABC" and turns on hallway light group as before (should only work when lux is low as sensor shouldn't trigger otherwise) . #2 only operates between 10pm-7am and is enabled by "ABC" to turn on Bathroom light group. My understanding would be that at any time of the day, so long as its dark enough, the hallway lights should activate on movement. Then if its between 10-7, the hallway lights will still operate as normal but the bathroom light will also turn on. in all cases the triggered light group will turn off in 5 min.

    I feel like I'm massively over-complicating this. Is there a better way? Will this way work?

    Thanks all in advance.
     
    SeanA, Nov 14, 2019
    #1
    1. Advertisements

  2. SeanA

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    974
    Likes Received:
    73
    Location:
    Adelaide, Australia
    Assuming the Hall Light is on group 'Hall Light' and the bathroom light on group 'Bathroom Light' then just add a single logic line in the pac:

    ONCE getLightingState("Hall Light") then
    if (time > "22:00") or (time < "07:00) then pulseCbusLevel(254, 56, "Bathroom Light", 100%, 0, 300, 0);
     
    Ashley, Nov 14, 2019
    #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.