An energy management system comprising a data network and a building electricity network, wherein an energy consumer comprising an energy generator is integrated into the building electricity network, the building electricity network being connected to an electricity network via an electricity meter connected to connecting cable, the energy generator is electrically incorporated into the building electricity network via an inverter via a generator cable, the energy consumer is connected to the building electricity network by an electric consumer connection located between the inverter and the electricity meter, wherein a controller of the energy consumer is connected to the data network, wherein an energy measuring device is connected to the connecting cable and the building electricity network by a power measuring unit, and the energy measuring device is connected to the data network by a first data connection, wherein the energy measuring device is configured to determine the energy generated in the building electricity network by the energy generator minus the energy consumed in the building electricity network to identify an excess of power, characterised in that the controller is configured to control an electrical apparatus of the energy consumer dependent on a value of the excess of power, and, provided power deviating from a set value of power transmission is determined by the energy measuring device, to adjust the output of the energy consumer such that only the exact amount of power is supplied to the energy consumer at all times as the building electricity network has available in excess, and wherein solely a connection via the data network exists between the energy consumer connected to the building electricity network and the energy measuring device. the energy generator is electrically incorporated into the building electricity network via an inverter via a generator cable, the energy consumer is connected to the building electricity network by an electric consumer connection located between the inverter and the electricity meter, wherein a controller of the energy consumer is connected to the data network, wherein an energy measuring device is connected to the connecting cable and the building electricity network by a power measuring unit, and the energy measuring device is connected to the data network by a first data connection, wherein the energy measuring device is configured to determine the energy generated in the building electricity network by the energy generator minus the energy consumed in the building electricity network to identify an excess of power, characterised in that the controller is configured to control an electrical apparatus of the energy consumer dependent on a value of the excess of power, and, provided power deviating from a set value of power transmission is determined by the energy measuring device, to adjust the output of the energy consumer such that only the exact amount of power is supplied to the energy consumer at all times as the building electricity network has available in excess, and wherein solely a connection via the data network exists between the energy consumer connected to the building electricity network and the energy measuring device.