# Continuously sell energy to the grid 

**URL:** <https://community.openems.io/t/continuously-sell-energy-to-the-grid/10130>\
**Category:** Uncategorized\
**Created:** [May 29, 2025, 5:46pm UTC](https://community.openems.io/t/continuously-sell-energy-to-the-grid/10130 "2025-05-29T17:46:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [May 29, 2025, 8:46pm UTC](https://community.openems.io/t/continuously-sell-energy-to-the-grid/10130/3 "2025-05-29T20:46:49Z")

</div>

Hi Andreas and welcome to the OpenEMS Community,

What you are planning to do is not (yet) legal here in Germany, but you could possibly adapt my prototype developments for upcoming German legislation:

> [@Feature Request: TimeOfUse controller: Discharge to grid](https://community.openems.io/t/feature-request-timeofuse-controller-discharge-to-grid/2663/8):
>
> @yvesilknievil, @as_py: I’ve been playing with implementing this feature in Energy Scheduler v2 recently and it looks promising: The code is already on develop branch. You just have to configure controlMode to DISCHARGE\_TO\_GRID ([openems/io.openems.edge.controller.ess.timeofusetariff/src/io/openems/edge/controller/ess/timeofusetariff/Config.java at develop · OpenEMS/openems · GitHub](https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.ess.timeofusetariff/src/io/openems/edge/controller/ess/timeofusetariff/Config.java#L26-L27)) and version to V2\_ENERGY\_SCHEDULABLE in the Energy-Component ([openems/io.openems.edge.ener…](https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.energy/src/io/openems/edge/energy/Config.java#L21-L22)

See also my latest Video with Felix Goldbach on EES Europe Exhibition this May in Munich.

[![](https://i.ytimg.com/vi/-pdx44EZAuU/hqdefault.jpg "Das kann kaum ein Speicher! Abregelung bei PV Anlage umgehen.") ](https://www.youtube.com/watch?v=-pdx44EZAuU&t=1s)

In principle if you adapt (and improve) the existing code, you could achieve an optimized energy schedule that predicts your local production and consumption and evaluates when and with how much energy to discharge the battery to the grid.

Regards,  
Stefan

---

_[View the full topic](https://community.openems.io/t/continuously-sell-energy-to-the-grid/10130)._
