# ESS that can talk with OpenEMS using Modbus TCP

**URL:** <https://community.openems.io/t/ess-that-can-talk-with-openems-using-modbus-tcp/1029>\
**Category:** Uncategorized\
**Created:** [July 21, 2022, 9:08am UTC](https://community.openems.io/t/ess-that-can-talk-with-openems-using-modbus-tcp/1029 "2022-07-21T09:08:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stefan.feilmeier](https://community.openems.io/user_avatar/community.openems.io/stefan.feilmeier/32/2585_2.png) [@stefan.feilmeier](https://community.openems.io/u/stefan.feilmeier)\
**Post date:** [March 6, 2023, 9:23am UTC](https://community.openems.io/t/ess-that-can-talk-with-openems-using-modbus-tcp/1029/4 "2023-03-06T09:23:07Z")

</div>

Hi Klinki,

I understand that it is neither very clear nor well documented how this has to be implemented. If you implement a `ManagedSymmetricEss` - i.e. a controllable energy storage system - you do not directly implement the `SET_ACTIVE_POWER_EQUALS` (and similar) Channels. Instead, you have to implement the `applyPower(activePower, reactivePower)` method, which is called once per Cycle (i.e. once per second). There you forward the requested `activePower` to the hardware device.

The FENECON Commercial 40 (\*) implementation is really a very good and simple example how this works:

Add a `SET_ACTIVE_POWER` Write-Channel. This is coming from a “Nature”, but is local to your device:

> <https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.ess.fenecon.commercial40/src/io/openems/edge/ess/fenecon/commercial40/EssFeneconCommercial40.java#L71-L73>

Map the `SET_ACTIVE_POWER` Channel to a Modbus-Register:

> <https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.ess.fenecon.commercial40/src/io/openems/edge/ess/fenecon/commercial40/EssFeneconCommercial40Impl.java#L402-L403>

In the `applyPower()` method forward the set-point to the Write-Channel.

> <https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.ess.fenecon.commercial40/src/io/openems/edge/ess/fenecon/commercial40/EssFeneconCommercial40Impl.java#L129-L138>

* * *

NOTE: The `SetActivePowerEquals` Channels etc. are not directly forwarded to the `applyPower()` method. There is much more ‘intelligence’ inbetween, e.g. for cases where you have multiple Energy Storage Systems in a Cluster, you want to apply a PID filter, etc.

* * *

(\*) The FENECON Commercial 40 was one of the first Commercial scale energy storage systems by FENECON. It is not sold anymore, but the implementation serves as a nice and simple example. The logic is smarter and more complex now with the current Commercial [30](https://fenecon.de/fenecon-commercial-30/)/[50](https://fenecon.de/fenecon-commercial-50/) and Industrial [S](https://fenecon.de/fenecon-industrial-s/)/[M](https://fenecon.de/fenecon-industrial-m/)/[L](https://fenecon.de/fenecon-industrial-l/) series

Regards,  
Stefan

---

_[View the full topic](https://community.openems.io/t/ess-that-can-talk-with-openems-using-modbus-tcp/1029)._
