MQTT energy communityThis function block connects the controllers of an energy community via a shared MQTT broker – without a server of its own. Each controller sends the schedule of its Block EMS optimizer to the group. One controller is the coordinator: it adds up the schedules of all members and sends the sums of planned import and planned export back to everybody. From these, each EMS optimizer calculates its own share of the community, the same way the community allocates dynamically by consumption.
With every new sum all members recalculate and report their new schedule; the coordinator adds up again. After a larger change, e.g. new prices, this settles within a few minutes. When community energy is scarce, no plant tries to obtain a larger part by drawing more – that would only take it away from the others.
Prerequisite: every member has a controller with a Block EMS optimizer and this block. The connection is always encrypted (TLS).
Each controller registers under an ID derived from its VPN ID; it is written to the log at startup. Without a VPN ID the ID can be entered on the block. Two controllers must not share an ID, otherwise the broker disconnects the first one.
If the project also contains the block MQTT EMS platform, the community data comes only from this block; that of the platform is acknowledged but not used.
All messages are below the group topic and are sent retained:
If a controller fails, its last schedule keeps counting until it has expired. If the coordinator fails, everybody keeps using the last sum until its quarter hours have passed, then without the community.
Inputs |
||
| KO | Coordinator | 1 = this controller is the coordinator, 0 = member. If the input is connected, it applies instead of the parameter Role – this way the coordinator can be changed from the visualization, e.g. with a password-protected control. On a change the block reconnects. |
Outputs |
||
| VB | Connected | 1 = connected to the broker and subscription confirmed. |
| MA | Members active | Number of members with a current schedule according to the coordinator's last sum. |
Parameters |
||
| Broker domain, broker port | MQTT broker of the community, default port 8883. | |
| User, password | Access of the community at the broker, the same for all members. | |
| Group topic | Shared topic. Empty = user name. | |
| Role | Member or coordinator. Exactly one coordinator per community; a second one stops sending and reports an error. If the input KO is connected, it applies instead of this setting. | |
| ID | Empty = derived from the VPN ID. | |
| Participation factor import, export | Share of the metering point in the community in %, usually 100. | |
| Community import price | Energy price for import from the community without grid fee and levies. Default: the own energy price. | |
| Community remuneration | Remuneration for delivery to the community. Default: the own feed-in tariff. | |
| Grid fee reduction | Reduction of the grid energy price for import from the community, e.g. 57 % (local) or 28 % (regional). | |
| Community levies | Levies on import from the community. Default: the levies of the own tariff. | |
| Members (coordinator) | Coordinator only: one line per member with ID, participation factor import and export in % and a name. Schedules of other IDs then do not count. | |
| Diagnostics | Writes messages about connection, schedules and sums to the log and receives all messages of the group. Without diagnostics a member only receives the sums, the coordinator also schedules and status – this saves data volume at the broker. | |
One MQTT energy community block is possible per project. On a backup controller in standby the block does not send anything.