Entso-e electricity prices for EU countries and solar photovoltaic forecast

From Domoticz
Jump to navigation Jump to search

Electricity prices from Entso-e portal (for european countries)

The Entso-e EU portal permits to know the day-ahead electricity price for european countries and sub-zones, useful for who want to save money and help for electricity grid stabilization by charging the electric car when electricity price is low and control heatpump and boilers to reduce consumption when electricity price is high.

The LUA script_time_entsoe.lua in https://github.com/CreasolTech/domoticz_lua_scripts permits to

  • define your bid zone (e.g. Germany, Netherlands, Northern Italy, ...)
  • get everyday, in the afternoon, the prices for the day ahead, hour by hour
  • save electricity hourly prices in a user variable (values separated by ";") with the average price in the end (total 25 values)
  • update a general counter so it's possible to have a chart with daily, weekly, montly, yearly with the powerful of Domoticz charts and reports.
  • compute the real cost of energy, as a linear function Cost=(Price+spread)*MULTIPLY_FACTOR+OFFSET , and update a general conter with that hourly cost

Why a variable? Because it can be easily accessed by any script/automation to decide when activate loads and how to control heatpump, boiler, electric car charging, ...

For example, if the heat pump permits to set the max power, it's possible to set the heat pump max power proportional to average_price/current_price or, even better, to (average_price/current_price)² .

Script to get electricity price for european country, from Entso-e portal

Installation

cd DOMOTICZ/scripts/lua
git clone https://github.com/CreasolTech/domoticz_lua_scripts
# a new folder named domoticz_lua_scripts will be created, within all files
cd domoticz_lua_scripts
# copy files
cp script_time_entsoe.lua globalvariables.lua globalfunctions.lua ..
cd ..

globalvariables.lua contains the user configuration: note that many variables inside are used by other scripts, so you can edit just what you really need

globalfunctions.lua contains several useful functions that can be called by scripts

script_time_entsoe.lua contains some configuration parameters, in the top part: parameters can be moved to globalvariables.lua if need, in that way it will be possible to update the script without the need to reconfigure it. Also, the script contains all commands to fetch data from Entso-e and create the variables, charts, ...

To update the script, cd domoticz_lua_scripts directory and execute the command git pull then cp script_time_entsoe.lua ..

Heatpump optimized electricity solar forecast

Solar photovoltaic energy production forecast

The same script above can also fetch the solar energy production forecast for one or more photovoltaic plants, combining energy together to get an accurate energy production forecast.

The forecast can be useful for example to decide if keep heat pump / boiler ON during peak hours (when electricity price is high) or turn off heat pump / boiler because in the next hours we'll have a good solar production.

The same for electric car charging: an automation can decide if delay charging because we expect a huge photovoltaic production in the next hours.

The script permits to define one or more photovoltaic systems, defining the kWp and orientation for each string, so it's possible to get an accurate forecast: the system take into account the weather forecast for the selected location (coordinates).

The script write two user variables, containing the hourly and total energy forecast for today and tomorrow.

Montly and weekly price of electricity