Chapter 3 · Programming in Config
Making Lighting Automatic
Automatic lighting is what separates a lighting installation from an intelligent building. Anyone can wire a switch. Light that arrives before anyone asks for it, at the right brightness, and leaves again when nobody is there, is what a customer remembers and talks about.
It is also where partners most often get stuck, because the timers behave differently with motion and with presence. Once that difference is clear, the rest follows.
By the end of this lesson you will be able to:
- Set up automatic lighting with a presence sensor
- Choose between the motion input and the presence input for a room
- Explain what each of the three timers does, and set them for a real room
The situation
A customer comes home in the evening with full hands. As they step onto the landing, the light comes on. At midday they walk across the same landing and nothing happens, because there is already enough daylight.
Later they sit down in the living room, choose a soft television mood, and stop moving. The lights stay on. When they fall asleep in front of the screen, the lights switch themselves off.
All of that comes from one sensor, one block and three timers.
What the sensor detects
The LOXONE Presence Sensor combines three sensors in one device: a PIR motion sensor, an acoustic sensor that measures the noise level, and a brightness sensor.
It gives you two different signals, and choosing between them is the most important decision in this lesson.
Motion is a short pulse each time the PIR sensor detects movement. Use it for rooms people pass through, such as a landing, hallway, stairs or utility room.
Presence is a continuous signal built from motion and noise together. Use it for rooms people stay in, such as a living room, office or bedroom.
Each motion pulse is extended by the sensor's own overrun time, so the bus does not become busy with constant messages. The overrun is 60 seconds by default and can be set as low as 2 seconds.
The acoustic sensitivity is set in the sensor's properties. There you can watch the background noise in the room and set the presence threshold above it.
Brightness decides whether it happens at all
Before any automatic mood is turned on, the Lighting Controller compares the brightness measured in the room with the brightness threshold you have set.
If the room is brighter than the threshold, there is already enough light, and the automatic mood is not turned on. If it is darker, the automatic mood is turned on.
This one comparison stops a house switching lights on all day. It is the difference between automation that feels intelligent and automation that feels broken.
The three timers
Three parameters decide how long automatic light stays on. Read this part slowly.
Motion extend time. After the last motion, this decides how much longer the lights stay on. Any new motion restarts it. It is used with the motion input. It is not needed with presence, because the presence signal stays on by itself while someone is in the room.
Manual operation extend time. As soon as someone changes the lighting by hand, for example by choosing a different mood, this timer takes over. It starts counting when motion or presence ends, and any motion restarts it. This keeps the lights on while someone sits still watching television, and turns them off if they fall asleep.
Presence automatic timeout. When someone switches the lights off by hand and leaves, this stops the automation switching them straight back on. With the motion input, each new motion restarts the timeout, and the automation returns once the room has been quiet for the set time. With the presence input, the automation returns as soon as presence ends.
| Timer | Starts when | Needed with |
|---|---|---|
| Motion extend time | Motion ends | Motion only |
| Manual operation extend time | Someone changed the light | Motion and presence |
| Presence automatic timeout | Someone switched off by hand | Motion only |
Setting it up
The connections in LOXONE Config are short. Which inputs you use depends on whether people pass through the room or stay in it.
- Connect the brightness output of the sensor to the brightness input of the Lighting Controller.
- Connect the movement signal. For a room people pass through, connect the motion output of the sensor to the motion input of the block. For a room people stay in, connect the presence output to the presence input.
- Set the timers. With motion, set the motion extend time, the manual operation extend time and the presence automatic timeout. With presence, set only the manual operation extend time.
- Set the brightness threshold, so the lights come on only when the room is too dark.
- On the Automatic tab of the block settings, create a rule that links an operating mode to the mood the automation should turn on.
Automation rules and priorities
The Automatic tab holds a list of rules. Each rule links an operating mode to the mood the automation should turn on. The rules are checked from the top down, and the first rule that matches is used.
This lets a room behave differently at different times. A rule near the top might say that in Night mode, motion turns on a dim mood. A rule below it says that in any other mode, motion turns on a bright mood.
You also choose how the automatic mood works with the light that is already on. It can turn on only if the lights were off, add the automatic mood to the current lighting, or replace the current mood.
Testing without waiting
Automatic lighting is hard to test with real timer values. You end up standing still in a room for minutes, waiting for something to happen.
Shorten everything while testing. Set the sensor overrun to 2 seconds and each timer to a few seconds, for example 2, 4 and 2. The behavior is the same, just fast enough to watch. Set the real values again when you finish.
LiveView shows when motion ended, when each timer started, and the current brightness. Show the mood output as well, and you can see which mood is active at every moment and watch the block make its decisions.