Overview MQTT energy community


This 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).

Setup

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.

Topics

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 portMQTT broker of the community, default port 8883.
User, passwordAccess of the community at the broker, the same for all members.
Group topicShared topic. Empty = user name.
RoleMember 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.
IDEmpty = derived from the VPN ID.
Participation factor import, exportShare of the metering point in the community in %, usually 100.
Community import priceEnergy price for import from the community without grid fee and levies. Default: the own energy price.
Community remunerationRemuneration for delivery to the community. Default: the own feed-in tariff.
Grid fee reductionReduction of the grid energy price for import from the community, e.g. 57 % (local) or 28 % (regional).
Community leviesLevies 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.
DiagnosticsWrites 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.


See also the general parameters of all function blocks.