Skip to content

Chapter 3 · Programming in Config

Central Functions

  • Lesson
  • 12 min

Lighting programmed room by room still leaves the customer walking through the home, switching off lights one room at a time. Central functions connect the whole building, so one action, going to bed or leaving home, takes care of every room at once.

Good Night and Leaving House are among the most used functions in any LOXONE home, and the ones a customer proudly shows visitors. They are also the first time you combine several blocks into one piece of logic, so take it step by step.

By the end of this lesson you will be able to:

  • Control the lighting of a whole building from one central block
  • Build a Good Night function that turns everything off from the bedroom, and dims the lights for the rest of the night
  • Build a Leaving House function that turns everything off from the entrance

The situation

A customer is going to bed. They do not want to walk through the apartment switching off lights. One triple click on the Touch by the bed should turn off every light. If they get up in the night, a movement on the landing should bring on a dim light, not full brightness in their eyes.

In the morning they leave for work. One triple click on the Touch at the entrance, and the whole apartment goes dark behind them.

The Lighting Central block

Both functions are built on the Lighting Central block. A central block controls many linked blocks at once. It has only inputs. A command sent to one of those inputs is passed on to every Lighting Controller the block is linked to. A central block has no outputs and no parameters of its own.

Central blocks sit on their own program page, set up as a Central Function. That is what makes them appear in the Central tab of the app.

Set up Lighting Central with Auto Configuration

The quickest way to set up Lighting Central is to let Auto Configuration create it. It builds the Central page and the central blocks for you, based on the rooms and devices in your project.

  1. Assign each device to its room, for example the Touch and the lights of the living room to Living Room.
  2. On the Tools tab, click Auto Configuration.
  3. In the basic functions, select the rooms you want to program.
  4. In the comfort functions, select Central Functions, then confirm.
  5. Open the Central page and check the Lighting Central block. Double-click it to see which Lighting Controller blocks it controls, and make sure it has at least one favorite star.
Information

Once linked, Lighting Central can switch all the lights in the building on or off at once. It also gives access to each linked room's settings from one place in the app. To change the list of linked blocks later, double click the central block.

How Good Night works

Understand the logic before you build it, because it is less obvious than it looks.

A triple click by the bed must do two things. It must turn off every light through Lighting Central. And it must switch the building into a Night operating mode, so any light turned on afterwards by motion comes on dimmed.

The triple click turns on a Switch block called Night. When the Night switch turns on, that change turns off all the lights. But at the second triple click, the Night switch is already on. Nothing changes, so the lights would not turn off.

The solution is a memory flag. A memory flag carries a signal from one place in the program to another. Sending the triple click through a memory flag directly to Lighting Central makes the central off work every time, not only the first time.

Tip

On most projects you will not build this by hand. Auto Configuration creates the same logic in seconds. Building it once yourself is how you learn what Auto Configuration does, so you can adjust or repair it later.

Build Good Night with Auto Configuration

Auto Configuration creates Good Night for every room set up as a bedroom. A triple click on the bedroom Touch then turns on the Night operating mode and turns off every light in the building.

  1. Check the bedroom. It needs a Touch and at least one light, both assigned to the room Bedroom, and its room type must be Bedroom.
  2. On the My Project tab, click Auto Configuration.
  3. In the basic functions, select Bedroom.
  4. In the comfort functions, select Good Night, then confirm.
  5. Check what Auto Configuration built. On the bedroom page, the Goodnight Bedroom memory flag is connected to the 3C output of the Lighting Controller. On the Central page, you find the Night logic and the Pulse At block that ends Night in the morning.
  6. Check the time of the Pulse At block, and change it if the customer gets up at a different time.
  7. Test it in simulation. Triple-click the bedroom Touch twice in a row, and check that all lights turn off both times.

Adding a dim night light

Good Night turns everything off. The Night operating mode changes what happens next. While it is active, motion should bring on a soft, dim light instead of full brightness, so a trip to the bathroom does not dazzle anyone.

Here are the steps:

  1. In each room that needs a night light, for example the landing, create a Night mood in the Lighting Controller with a low, gentle brightness.
  2. On the Automatic tab, add a rule: when the Night operating mode is active, motion or presence turns on the Night mood.
  3. Check the rule order. Rules are checked from the top down. The Night rule must sit above the normal rule, so it is used first while Night is active.
Warning

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

Building Leaving House

Leaving House is the same idea as Good Night, with two differences. It is triggered from the entrance instead of the bedroom, and it uses a switch called Away instead of Night.

The timing problem is the same too. After the first triple click, the Away switch is already on, so the triple click must also go directly through a memory flag to Lighting Central. Build it with the same steps, using these names:

PartGood NightLeaving House
Triple click onBedroom TouchEntrance Touch
Switch blockNightAway
Flag from 3C outputGoodnight BedroomLeaving House Entry
Flag to Lighting CentralGoodnightLeaving House
Information

Away is usually ended by a successful entry through an NFC Code Touch at the door, if the project has one. Because Away is an ordinary Switch block, the customer can also switch it off in the app.

Takeaway

Central functions turn one action into behavior for the whole building. Good Night and Leaving House both turn off every light through Lighting Central and switch on an operating mode, one from the bedroom and one from the entrance. Send the triple click directly through a memory flag as well as the switch, so it works every time and not only the first time.

Apply What You've Learned

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

In a LOXONE Config project with at least a bedroom, an entrance and one other room:

  1. Create the Central page with a Lighting Central block, and link all the rooms to it.
  2. Build Good Night, so a triple click in the bedroom turns off the whole project.
  3. Add the Night operating mode and a dim Night mood in one room, so motion after Good Night brings on soft light.
  4. Build Leaving House from the entrance.
  5. Test both, and confirm that a second triple click still turns everything off.