The DAY AHEAD DAILY (and hourly) ENERGY PRICES for Domoticz
A small dzVents script for Domoticz for counting your electricity use (in Euro's) during the day. Use with 'Dynamic' provider prices (electric hourly, gas daily (6-6h)). Prices are obtained directly from Entso-E and EEX.
Cost counters are updated every 5 min. Watch your realtime electricity, gas and water costs!
Total costs a day are calculated against hourly different electric prices and daily (6-6h) gas prices.
One special field 'Electricity color' is filled with a color. Electricity color changes during the day from BLUE (normal), RED (more than 10% higher than day avarage) or GREEN (more than 10% cheaper than day avarage) - You can switch devices at cheap of expensive times, or install a RGB lamp to indicate to your family :-)
During the day, the counter 'Self produced percentage' is updated. It is calculated between used electricity and power obtained from your solar panals. Very nice to follow the percentage change when the sun shines, or car is charged.
Electricity prices are obtained hourly from ENTSOE (you need an API key, explained below), gasprices obtained daily from EEX (no API key needed).
Enable the report function (at line 315) to send the report (composed in string message) to send a complete report to your (Telegram) family group app at 8:05AM to show stats of the previous day.
Requirements: Domoticz with P1 counter for Electric and Gas, Counter for Solar panels, Dynamic prices contract, API-key (free) from ENTSOE. Optional: Water counter, Telegram implementation for Report.
Installation steps:
- Create these 8 Virtual Counters in Domoticz
Read the https://www.domoticz.com/wiki/Dummy_for_virtual_Switches if you don't know how to!
- 'Elektriciteit prijs dit uur' -- your device for hourly kwh price | type: add dummy device -> Custom sensor (cents)
- 'Electriciteit kleur nu' -- your device for the color *1 | type: add dummy device -> text device
- 'Elektraverbruik vandaag' -- your device for today's electric costs. resets at midnight. | type: add dummy device -> Custom sensor (euro)
- 'Gasprijs nu' -- your device for gasprice of today | type: add dummy device -> Custom sensor (cents)
- 'Gasprijs morgen' -- your device for gasprice of tomorrow | type: add dummy device -> Custom sensor (cents)
- 'Gasverbruik vandaag' -- your device for today's gas costs. resets at midnight. | Type: add dummy device -> Custom sensor (euro)
- 'Waterverbruik vandaag' (optional) -- your dummy device for today's water costs. resets at midnight. -> Custom sensor (euro)
- 'Zelfproductie vandaag' -- your dummy device for today's self produced perc. *2 -> Custom sensor (%)
*1 Electricity color changes during the day from BLUE (normal), RED (more than 10% higher than day avarage) or GREEN (more than 10% cheaper than day avarage) - You can switch devices at cheap of expensice times, or install a RGB lamp to indicate to your family :-)
*2 Self produced today, until now. Percentage self produced (solar) against used today. Nice to follow as the sun shines!
- Configure the names of your creatd DUMMY sensors in the setting part of the script (dadep.lua)
(only needed if you did choose an another name)
- Obtain an API key for ENTSOE
To request access to the Restful API, please register on the Transparency Platform (https://transparency.entsoe.eu/) and send an email to [email protected] with “Restful API access” in the subject line. Indicate the email address you entered during registration in the email body. The ENTSO-E Helpdesk will make their best efforts to respond to your request within 3 working days.
-
Enter the your API key in the setting part of the script
local ApiEUtoken='YOUR_TOKEN_HERE' -- your personal API token of user account from entsoe
-
Configure the prices in the script (dadep.lua) for you current provider's prices
- local EnergyTax = 0.12599 -- Electric tax per kWh in euro
- local HandlingFee = 0.016528925619835 -- Electric handling fee per kWh (excl vat)
- local GAStax = 0.48980 -- Gas tax per m3 in euro
- local GAShandlingfee = 0.04959 -- Gas handling fee per m3 (excl vat) in euro
- local GAStransport = 0.01652 -- Gas transport costs (excl vat) per m3 in euro
- local water_cost = 1.21 -- Water the cost of m3 (1000 liters) water including taxes
- local Tax = 0.21 -- tax (0.21 for 21%)
- (These are my current prices (july 2023) for Zonneplan)
-
Enable report function for family if you want
On line 315 dz.helpers.telegramnote(dz, message) use a own function to send 'message' to family group app daily at 8:05
- Place the script (dadep.lua) in your domoticz/scripts/dzVents/scripts directory
And have fun!