Chapter 3 · Programming in Config
Central Functions
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.
- Assign each device to its room, for example the Touch and the lights of the living room to Living Room.
- On the Tools tab, click Auto Configuration.
- In the basic functions, select the rooms you want to program.
- In the comfort functions, select Central Functions, then confirm.
- 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.
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.
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.
- 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.
- On the My Project tab, click Auto Configuration.
- In the basic functions, select Bedroom.
- In the comfort functions, select Good Night, then confirm.
- 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.
- Check the time of the Pulse At block, and change it if the customer gets up at a different time.
- 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:
- 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.
- On the Automatic tab, add a rule: when the Night operating mode is active, motion or presence turns on the Night mood.
- 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.
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:
| Part | Good Night | Leaving House |
|---|---|---|
| Triple click on | Bedroom Touch | Entrance Touch |
| Switch block | Night | Away |
| Flag from 3C output | Goodnight Bedroom | Leaving House Entry |
| Flag to Lighting Central | Goodnight | Leaving House |