I have an idea that i would like to code into logic and would appreciate some help in to what functions to use. I have a cbus motion sensor pointed across the driveway and another in the carport. The driveway sensor is assigned to the front wall lights and the carport sensor, you guessed it, the carport lights. What would be the correct functions to use to code the following - 1. If the driveway sensor is activated, cbus assumes its a guest and only turns on the front wall lights for 2 min. 2. If the driveway sensor is activated and then the carport sensor, cbus assumes that we have come home so turns on the carport lights for 2 min, back door lights, and family room. 3. If the carport sensor is activated, then the driveway sensor, cbus assumes that we are leaving so turns on carport lights, and front wall lights both for 2 min. 4. If the carport sensor is only activated then cbus, and basically anyone who knows me, assumes that I am getting another slab of ales out of the car and only turns on the carport lights for 2 min. (Later I will program cbus to detect level of my intoxication by measuring wobble and leave lights on for longer, even if I have stopped moving.:rolleyes:) Logically, 1,3 and 4 work at the moment using the existing grouping but having the added touch of case 2 would be a great little function to be able to have. Cbus would actually know if we are coming or going. Thanks in advance gents.