Help with Logic for PIR, Light Sensor

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by paulwat, May 26, 2012.

  1. paulwat

    paulwat

    Joined:
    Apr 30, 2009
    Messages:
    23
    Likes Received:
    0
    Location:
    Bristol, UK
    Hi all,

    I have had a Wiser for several months now and I am finally getting to the point where enough of the physical CBUS wiring is completed that I can turn my attention to programming the Wiser to do all of the fancy stuff.

    My main problem is that when I did the CBUS course in the UK years ago there weren't any logic based products so I am starting from scratch. I have played a bit with PICED and also looked in the forum at logic examples but am a bit stuck as to where to start as my last experience in programming was over 20 years when i was at uni.

    Here's the scenario.

    Landing lights connected to a relay channel
    Light Sensor on outside of house - currently set to enable a group address when light level reaches x
    360 PIR in Landing ceiling
    Group address operated from multiple swtiches and screens around house.

    What I want to achieve is as follows:-

    1. During daylight light only operates on the switches

    2. Once light level drops to a specific point light should come on based on PIR movement for a specific time i.e. 5mins- light level determined by logic i.e. light sensor now outputting a light level not just enabling a group address.

    3. If light is switched on via a switch then light should not be influenced by PIR unless if light is on and PIR is not triggered for 15mins then switch off light. - Basically i want to avoid the ability to leave the light switched on all night accidentally

    I have achieved 1 and 2 by simply setting up the light sensor and PIR with a trigger group but the fact that the PIR keeps switching off a light when it detects no movement that has been switched on at the switch is beginning to infuriate my wife!!

    Can someone give me a starting point for this logic which on the face of it seems simple but has me completely baffled currently.

    Once I get my head around the logic I will happily post what I come up with for people to use - no guarantee it will be any good though:)

    Many thanks in advance

    Paul
     
    paulwat, May 26, 2012
    #1
  2. paulwat

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Hello Paul
    Fortunately most of the functions you want are built into the sensor, so you probably don't need much logic.
    Unfortunately the 360 degree sensor is rated for indoor use only.
    Some people including myself have used indoor sensors in situations such as yours on a verandah and had some instances of unwanted triggering.
    You can search the forum to find out more.
    http://www.cbusforums.com/forums/showthread.php?t=461&highlight=indoor+sensor

    This can be set via the light level pot on the sensor.

    You can do this with the previously mentioned light level sensor pot in conjunction with the timer for the sensor in Toolkit.
    I do not like your chances of getting the light measurement sensor working to set a certain lux level on the attached lighting and I wonder why you would want to do that since the lights are only going to turn on in the dark anyway.
    The outdoor sensor does not have light level maintenance.
    If I got that wrong and you are just after a different level other than 100% you should be able to set this in the sensor using a recall level.

    When programming the sensor with Toolkit you will find a section which allows you to set a group to enable or disable the sensor.
    If you set the actual lighting group which is controlled for example "verandah lights" to be the group which "disables" the sensor, you will avoid the scenario where someone manually turns the light on and then 15 minutes after some motion the sensor turns the lights turn off.
    There is an application note here about this function.
    http://www2.clipsal.com/cis/technical/technical_support/application_notes
    Perhaps then use a schedule or a timer to turn the light off if it has been turned on manually.

    Unfortunately in my instance there was a lot of unwanted motion events in the middle of the night which I put down to the indoor sensor being mounted outdoors.
    Then with the method above I had no way to disable the sensor.
    Even with the outdoor sensors there are times when the customer just wanted to turn it off (clothes lines strung in front of the sensor and windy nights).
    So I put some buttons with groups called "sensor enable on" on the Touch screen so the customer could enable or disable the sensors.
    Then I created some schedules to enable the sensors at sunset and disable them at 9.00pm so they didn't have to remember to turn them on.

    This brought back the issue where the sensor will turn off the lights even if it was triggered by the light switch but only if the sensor is enabled.
    There is a handy reset to default setting in Toolkit for the sensors and I suggest you use it if you go making a lot of changes.

    Hope that is of some help.
    If someone knows a way to disable or enable the sensor yet not have it overide the manual operation I'm keen to hear it too.
     
    Last edited by a moderator: May 26, 2012
    DarylMc, May 26, 2012
    #2
  3. paulwat

    paulwat

    Joined:
    Apr 30, 2009
    Messages:
    23
    Likes Received:
    0
    Location:
    Bristol, UK
    Hi Daryl,

    Many thanks for the response, I should perhaps clear up one thing, the Light sensor is the Outdoor Lux Sensor and is waterproof and mounted on the outside of my house.

    I have a number of PIR of various different types including the 360degree and directional PIR's indoors and also some outdoor PIR units (the ugly looking ones).

    My thought process was that I want all of these sensors and more in future to use a uniform trigger point to start operation - i don't want it to be piece meal set at each sensor (plus some of the sensors don't have the more sophisticated light level functions).

    I was starting with the example of the Landing and then planning to reuse the code with some modifications to work in other areas of the house and garden.

    Regards

    Paul
     
    paulwat, May 29, 2012
    #3
  4. paulwat

    paulwat

    Joined:
    Apr 30, 2009
    Messages:
    23
    Likes Received:
    0
    Location:
    Bristol, UK
    I just realised Landing might be a very British term and given this is a very multinational forum might cause some confusion.

    I am talking about a first floor hallway at the top of a flight of stairs, off which there are numerous bedrooms/ bathrooms, hence it being useful to have the lights come on automatically when someone stumbles from a room half asleep in the middle of the night but also a pain that you can't get them to stay on while cleaning etc without waving your arms at the sensor.

    thanks

    Paul
     
    paulwat, May 29, 2012
    #4
  5. paulwat

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Yes it did confuse me.
    I'm not sure any of my reply was much use to you.
     
    DarylMc, May 29, 2012
    #5
  6. paulwat

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    The other alternative which I use is to utilise the logic functions of the output units. Create a different group for the light switch and use the OR function of a relay or max function of the dimmer. This way whenever the group assigned to the switch is on, the light will be on regardless of the PIR group. If the light switch group is off, ther PIR group will control it. This also allows you to use the preset level function in the PIR to turn the light on dimmed during the night, but the switch can still operate as a normal dimmer function.
     
    Ashley, May 29, 2012
    #6
  7. paulwat

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,308
    Likes Received:
    49
    Location:
    Cleveland, QLD, Australia
    Thanks Ashley
    I will have a look at that too.
     
    DarylMc, May 30, 2012
    #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.