Skip to content

Chapter 3 · Programming in Config

Making Lighting Automatic

  • Lesson
  • 12 min

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.

Information

Presence must always be started by motion. Noise alone can never start presence. It can only extend a presence that motion has already started. That is why a television or a passing sound cannot switch the lights on in an empty room.

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.

TimerStarts whenNeeded with
Motion extend timeMotion endsMotion only
Manual operation extend timeSomeone changed the lightMotion and presence
Presence automatic timeoutSomeone switched off by handMotion only
Tip

Follow one evening through the block. Someone walks in, it is dark, the automatic mood comes on and the motion timer runs. They choose a television mood, so the manual timer takes over. They stop moving, the manual timer runs out, and the lights go off. If they had switched the lights off by hand on the way out, the timeout would stop the automation switching them back on.

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.

  1. Connect the brightness output of the sensor to the brightness input of the Lighting Controller.
  2. 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.
  3. 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.
  4. Set the brightness threshold, so the lights come on only when the room is too dark.
  5. On the Automatic tab of the block settings, create a rule that links an operating mode to the mood the automation should turn on.
Warning

Never mix the two. Do not connect the presence output of the sensor to the motion input of the block, or the motion output to the presence input. The timers behave differently for each, and mixing them gives confusing results.

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.

Warning

The last rule in the list must always be a condition for any operating mode. If it is not, there will be situations where no rule matches, and the automatic lighting will not come on at all.

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.

Takeaway

Automatic lighting is one decision followed by three timers: motion for rooms people pass through, presence for rooms people stay in, and never a mix of the two. The brightness threshold decides whether the light is needed at all. Always end the rule list with a condition for any operating mode.

Apply What You've Learned

Quick self-check — ungraded. Just to be sure everything sticks.
Task

On the Democase, or in a LOXONE Config project with a presence sensor:

  1. Set up the landing with the motion input and the brightness input.
  2. Set short test values on the sensor overrun and on each timer.
  3. Watch the timers in LiveView. Trigger motion, stop, and watch the lights switch off.
  4. Change the setup to a living room, using the presence input and only the manual operation extend time.
  5. Sit still and make a small noise. Confirm the lights stay on, because noise extends presence.