In this status report I document the optimisation of the grid feed-in of a photovoltaic system using battery storage and vehicle batteries. The aim is to reduce feed-in peaks, increase self-consumption and achieve grid-friendly operation.
What is SmartmeterFaker?

SmartmeterFaker is an open-source project for the intelligent control of PV feed-in and battery storage. The software processes smart meter data, PV forecasts, battery states and – optionally – dynamic electricity prices. The aim is to distribute the available energy optimally over time depending on the respective requirements.
The most important features of SmartmeterFaker
- ☀️ PV generation forecast based on weather data
- 🌬️ Wind energy forecast with configurable power curve
- 💧 Hydropower generation and forecast
- 🔮 Fictitious systems for planned extensions and simulations
- 📊 Historical system simulation – “What would have happened if …?”
- 📅 Evaluation and comparison on a daily, monthly and yearly basis
- 🔋 Battery monitoring including SOC and available capacity
- ⚡ Intelligent charging and discharging strategies
- 💶 Dynamic electricity prices taken into account in feed-in planning
- 📈 Price-optimised feed-in at economically attractive times
- 🌙 Day/night shifting of the available energy
- 🚫 Consideration of negative electricity prices
- 🤝 Optimisation of feed-in for energy communities
- 📡 MQTT connection for live data and external systems (ioBroker, Home Assistant, Loxone)
- 💾 Storage of measurement and forecast data in SQLite
- 🔌 Support for various smart meters and protocols
- 🏭 Fronius, Eastron, Victron, Huawei and SunSpec
- 📉 Forecast/real comparison to assess forecast quality
- 🧮 Traceable calculation and visualisation of energy flows
- 🧩 Manufacturer-independent and modular design
- 🐙 Open source and therefore extensible for your own systems and applications
- Detecting and controlling consumers (Tasmota, Shelly, TWCManager - Tesla charging stations Gen2+3, Luxtronic heat pumps)
Open-source smart meter for PV systems and battery storage
The project is evolving from a dedicated controller for a Fronius PV system into a manufacturer-independent open-source platform for smart meters, renewable energy generation, battery storage and intelligent energy flow control. In addition to PV, wind and hydropower plants can now also be forecast and simulated for planned plant extensions.
After a detailed evaluation of the system architecture, the logic of the SmartmeterFaker fundamentally reworked. The system now specifically emulates or manipulates the grid transfer power reported to the inverters. This realises a dynamic increase in the feed-in power into the public grid, in order to use surpluses more efficiently.
Current development status (as of 23.06.2026)
The project is still under active development. The basic control logic is functional and is continuously validated and extended on the basis of real operating data:
Predictive data acquisition: The forecast of the expected PV generation for the following day is retrieved via the Open-Meteo API.
Feed-in calculation algorithm: Based on the available battery capacity and the configured PV peak power (Ppeak), the optimum feed-in quantity for the time window between sunset and sunrise is calculated.
Operating mode: During daylight hours, the primary aim is strict zero feed-in (self-consumption optimisation).
Current development status (as of 24.06.2026)
Configurable base offset: Implementation of a permanent minimum feed-in (e.g. 200 W) during daylight hours. This serves to compensate for load peaks when consumers are switched on and minimises the system-related control delay of the inverter.
Current development status (as of 04.07.2026)
Offset for start and end configurable in the YAML file
PV system with orientation, angle and tilt configurable in the YAML file
Calculation of the yield based on the PV system and the cloud cover on the following day - several compass directions or configurations are possible and are taken into account.
Graphical display and debug menu for the calculation

Current development status (as of 09.08.2026)
Granular battery monitoring: Inclusion of the exact state of charge (SOC) of the individual modules via dynamic cascade iteration, as well as automatic reconciliation of the forecast next-day yield with the required recharge capacity (intrinsically safe autonomy protection).
Dynamic electricity prices: Economically optimised feed-in during the X most expensive peak hours of the day, including integrated protective shutdown (zero feed-in) at negative exchange electricity prices on the spot market.


Current development status (as of 15.08.2026)
Forecast / Real: The forecast/real analysis makes it possible to compare the forecast PV generation with the actually measured values. This allows the plausibility of the calculations to be checked and the forecast quality to be evaluated historically as well. The data is stored in SQLite and additionally provided as JSON.
MQTT messages: All raw data and calculated values can now be followed live via MQTT and processed further by other systems.
Smart meter support (as of 22.08.2026)
Added manufacturers and protocols:
Eastron SDM120 - SDM630
Victron ET340 - EM24
Huawei DTSU666h
SunSpec (general)
SmartmeterFaker is thus increasingly evolving from a solution tailored to a specific system into a manufacturer-independent open-source platform for smart meter data and intelligent energy flow control.
The design has been slightly revised.



Current development status: profit-optimised feed-in
(as of 24.08.2026)
The calculation of the available energy has been visualised in a fully traceable way. This makes it possible to see how the expected available energy is determined from the PV forecast, the battery state and other known data.

A health check has also been implemented.

At the same time, the feed-in logic was extended for dynamic exchange prices. The available energy is no longer simply distributed evenly over defined periods. Instead, the available feed-in hours are prioritised according to their expected economic yield.
The software first uses the hour with the highest expected feed-in revenue. If energy is still available afterwards, the second-best hour is used, and so on. This allows the stored energy to be fed in specifically at the economically most attractive times. The software continues to take into account the PV generation expected for the following day and the required energy buffer of the battery storage. The economically best feed-in hour is therefore not automatically the hour with the highest price – the decisive factor is the combination of available energy, forecast and feed-in limit.

More than just photovoltaics: plant extension simulator
PV, wind, water
(as of 25.08.2026)
SmartmeterFaker is no longer limited exclusively to photovoltaic systems. The forecast and simulation logic can additionally take wind energy and hydropower into account.
The project is thus evolving from pure PV feed-in optimisation into a more general platform for forecasting and evaluating various renewable energy sources.
Each generation plant can be configured as real or fictitious. A fictitious plant represents, for example, a planned plant extension, a possible wind turbine or an additional hydropower plant.

Fictitious systems never influence the real charge or discharge decision of the battery storage.
They are used exclusively to calculate how a future extension would affect the expected energy generation.
Statistics:

Simulate a plant extension before it is built
A further function of the project goes one step further: planned generation plants can be configured virtually before they actually exist.
For this, a system is marked with fiktiv: true.
The software then calculates not only the current or future generation, but can also reconstruct historical periods.
This makes it possible to examine, for example, what additional energy yield a planned PV, wind or hydropower plant would have delivered in the past.
For PV and wind, historical weather data from Open-Meteo is used for this and processed with the same physical calculation models as in the normal forecast. Hydropower can be reconstructed without weather data owing to the currently used constant power model.
That answers the question:
What would my planned system have produced over the last 12 months?

28.08.2026 – Energy management: detecting, monitoring and controlling consumers
With the new consumer management, SmartmeterFaker is increasingly evolving into a complete energy management system. Consumers can be detected automatically in the local network, configured and – depending on the supported device – also controlled.
Currently supported are, among others, Tasmota devices as well as the detection of TWCManager. Measured consumer power is not only displayed live, but also integrated into the energy flow display and the historical evaluations.
In addition to generation and storage, SmartmeterFaker can now also take the consumption side of the energy system into account.
The new dashboard has also been given an appealing design.

SmartmeterFaker is thus evolving step by step from software for optimising grid feed-in into an open energy management system that can consider generation, battery storage, consumers, electricity prices and grid flow together.
Planned extensions (roadmap)
For future iterations of the control algorithm, the integration of the following variables and features is planned:
Grid-dependent charge/discharge connection depending on the grid operator's requirements. (Study: grid-supportive use of storage systems)
Further smart meter interfaces and protocols
Advanced battery strategies and consideration of capacity, SOC and PV forecast
Further optimisation models for energy communities and dynamic electricity prices


Why the project is more than a technical gimmick
The technical development is only one part of the project. An essential use case is the intelligent feed-in of PV energy into energy communities.
In the detailed Practical articles I show, using real measurement data, how the share of feed-in to the energy community has changed from 43% to 85% thanks to the software – and why, despite possibly higher market prices, I deliberately opt for the energy community.
Frequently asked questions (FAQ)
SmartmeterFaker is an open-source project for the intelligent control of PV feed-in and battery storage. It processes smart meterdata, PV forecasts, battery states and, optionally, dynamic electricity prices in order to distribute the available energy optimally over time.
The available feed-in hours are prioritised according to their expected economic yield: first the hour with the highest expected revenue on the Electricity exchange is used, then the second best, and so on. At negative exchange electricity prices, a protective shutdown with zero feed-in automatically kicks in.
Based on real measurement data, the share of feed-in into the Energy community increased from 43% to 85%, even though higher prices would in part have been achievable on the free market.


