The e.manager offers different possibilities to realize the control.
Blockly is a graphical interface for easy creation of programs without the need to have programming knowledge. By simply dragging program blocks can be linked with each other and so simple or complex functions and program sequences can be created.
A Python script is then automatically generated from these modules, which can then be automatically activated at startup or at desired times.
The graphical user interface can be found under Configuration = > Blockly
Blockly bietet standardmäßig einige Blöcke an, wie z.B. Schleifen, Logik, Mathematik. Diese wurden zu gerätespezifischen Blöcken ergänzt, Eingänge, Ausgänge und Zeit
Under Inputs you will find all devices that are connected to the e.manager nD. You can read out e.g. the current power, voltage, current, switching state, power reduction, etc..
All devices that can be switched, such as relays, are displayed here. In addition, you can set the maximum power of the inverters here.
Here you can control your actions depending on time. For example, you can filter by time, day, weekday, month, year or by runtime.
You can also send e-mails directly from the Status program.
In this example, you would get an email every 30 seconds about the status of the relay.
Logic, loops, mathematics
Here there are standard blocks like infinite loops, comparisons or mathematical calculations.
You can create as many variables as you like in your program. Set them in the course of the program and read them out again later.
If some block combinations repeat over and over again, you can group them into functions.
Start Blockly programs
For each Blockly program you can decide whether this program should always run in the background and monitor the measured values, or whether the program should be executed at certain times.
For this purpose a so-called cronjob is created. You can create this conveniently via a graphical user interface.
If you want to run a program at startup, then please select "At startup". The Blockly program should then be executed in an endless loop, so that this runs constantly in the background.
Save and load Blockly programs
You can save your Blockly programs. Please use only the following characters A-Z a-z 0-9 _.
You can reload, edit and resave your programs under new names at any time.
Switch two heating elements
In this endless loop, a check is made every 10 seconds to see whether the feed-in power is greater than 1000 W. If this is the case, "Heating rod 1" is switched on, provided it is still off. If "Heater1" is already on and there is still more than 1000 W being fed in, "Heater2" is switched on.
If the PV power drops and power is drawn from the public grid, "Heater 1" is switched off first and then "Heater 2" if required.
The e.manager offers you the possibility to create your own rules for consumer control.
You can create up to 50 rules. The rules are checked independently of each other (OR Linked). The conditions within a rule must all be fulfilled for the rule to be executed (AND Linked).
The following conditions exist:
- 2 x Current power (PV, residual feed-in, purchase, generator, consumer, etc.)
- 2 x time
- 2 x Analog input (e.g. PT1000)
- 2 x Stauts relay
As a result the following outputs can be switched:
- both internal solid state relays
- both internal S0 outputs
- optional: analog output, switchable sockets (Allnet), relay card
Since each rule provides only one result, which e.g. switches on a relay, another rule must switch off this relay again.
The rules are checked every 60 seconds.
Example: Heating cartridge
- Photovoltaic system: 6 kWp
- Data logger: e.manager
- 2-direction meter (residual feed and purchase) e.g. SMA Energy Meter
- 2 ,5 kW heating cartridge for the hot water tank
The surplus energy from the PV system is to be used to heat the hot water storage tank. The PV system is monitored with an e.manager, in addition the residual feed-in and the draw is monitored with an SMA Energy Meter. The heating cartridge is connected to relay 1 via an external relay.
The cartridge heater should only be in operation when there is enough PV power.
1st rule: Switch on when more than 2.5 kW is fed in.
2nd rule: As soon as current is drawn, the cartridge heater should be switched off again. So when reference > is 0
In this case, with approx. 2.5 kW residual feed-in, it may be that the relay is constantly switched on and off as soon as the irradiation fluctuates a bit. If you want to prevent this, you must set the switch-on condition or switch-off condition upwards.