Energy manager

With this function block you can direct the produced energy to various consumers based on priority.

Loxone Musterkoffer


The Energy manager function block allows you to use the current power production and consumption for maximum efficiency.

The block supports up to 12 consumer devices which can be set to have different priorities. If more electricity is being produced than is currently being consumed then the different consumers will turn on automatically according to priority.

The outputs can also be turned on using the trigger inputs on the blocks, for example if you need the washing machine consumer to start immediately.


If there is enough excess power (AQp - AQc) then the Energy manager will switch one or more of the consumers on. If the current power of the consumers is connected to AI1-A12 respectively this data is also used in the calculation. If this information about the consumers is not available then the calculation is performed with the data set in the edit window of the Energy manager.

Consumers will remain on at least as long as the "Min. on duration" set in the block editor. Once a consumer has been switched off it will remain off for the "Min. off duration". This cycle is repeated throughout the day until at least the "Min. on duration per day" has been reached.

If there is not much energy produced during the day, and the minimum on duration per day cannot be reached for the consumers, the consumers will come on before midnight so that the minimum on duration per day is reached using imported energy.

If you would like to switch on a consumer immediately (overriding the priority list), you can do this with a pulse (shorter than a second) on the respective trigger input Tr1-Tr12. The output Q1-Q12 will then be activated for the minimum on duration even if there is no excess power currently available. If the pulse on a Tr1-Tr12 input lasts for more than one second the respective output is switched on until the input goes to 0.

Basic setup

Step 1: Connect inputs & outputs

For the Energy manager to work the block has to know the current power production and consumption. So the current power production needs to be connected to the AIp input and the current power consumption needs to be connected to the AIc input. If you are using a Fronius inverter then you can connect the Fronius block and the Energy manager directly as in the setup in the example below.

The next step is to connect the consumers to the digital outputs of the block Q1-Q12.

If you want to manually turn a consumer on and off, you can connect the digital input (switch or a virtual input on the app) to the respective trigger input Tr1-Tr12. In the example below we have a switch in the utility room that turns the washing machine on.

Step 2: Priority

The next step is to setup the priority and settings for each of the consumers. To do this double click on the Energy manager block to access the edit window.

In this window you have 6 different information fields, the output number, description of the consumer, the durations and the power of the consumer:

Output The number of the consumer output. 
Description Here you can enter a name for the consumer so you know which is which.
Min. on duration Minimum time (mins) for the consumer to be on before the next consumer is switched on.
Min. off duration Minimum time (mins) for the consumer to be off before it can be switched on again.
Min. on duration per day Minimum required time the consumer needs to be on over the whole day. 
The rated power of the consumer (kW) usually on the device or in the manual.

Once you have put in the information for each of your connected consumers you can change the priority order of the devices using the green up down arrows. The top most consumer has the highest priority.

Step 3: Settings

If electricity is produced using the sun and photovoltaic panels then you need to tick the box "Production period of the excess input (only during daylight)".

In addition any residual power can be stored in a battery, to do this tick the box "Remaining energy (AQr) can be used to charge battery". The battery should be connected to the output AQr and the energy manager will output the current that the variable charger is allowed to use. The battery calculation will decide whether to store the power that is available or not.

Optimised setup

For the Energy manager to work most efficiently the current power of the individual consumers should be connected. For this you can connect analogue inputs to the AI1 to AI12 inputs, for example the power input of a Smart Socket Air.

If a variable charger is connected for a battery then you should also connect the charging power of the battery to the AIb input.



AI1-AI12 Analogue input for power Current power of the respective consumer output.
AIb Analogue input for battery power Current power of the battery.
AIp Analogue input for current production Current power that is being produced.
AIc Analogue input for current consumption Current power that is being consumed.
AIt Analogue input for priority selection Not yet implemented.
Tr1-12 Digital input priority A pulse will activate the corresponding output.
R Reset Switches of all the outputs.


Q1-Q12 Digital output load Connect the consumer devices to these outputs.
AQr Analogue output residual power Can be used with a variable charger for a battery.