hourly electricity prices in domoticz (Netherlands)
Moderators: leecollings, remb0
-
- Posts: 55
- Joined: Saturday 05 March 2016 21:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5629
- Contact:
hourly electricity prices in domoticz (Netherlands)
More and more electricity suppliers in the Netherlands work with hourly prices. For example Frank Energie (https://www.frankenergie.nl/goedkoop)
The take the same price as on the wholesale market: https://www.epexspot.com/en/market-data ... 2022-07-22
See also this article in the Dutch newspaper Trouw: https://www.trouw.nl/duurzaamheid-natuu ... ~be5aaae9/
Does someone has a script that scrapes this data and integrate the values in Domoticz (for the Dutch market)?
The take the same price as on the wholesale market: https://www.epexspot.com/en/market-data ... 2022-07-22
See also this article in the Dutch newspaper Trouw: https://www.trouw.nl/duurzaamheid-natuu ... ~be5aaae9/
Does someone has a script that scrapes this data and integrate the values in Domoticz (for the Dutch market)?
Rp3, youlesss, rfxcom, philips hue, dsb1820
Re: hourly electricity prices in domoticz (Netherlands)
following....
-
- Posts: 166
- Joined: Sunday 26 April 2020 5:27
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Netherlands
- Contact:
Re: hourly electricity prices in domoticz (Netherlands)
I use Node-red to scrape the prices from a site and then inject them to user variables (24 of them). You need to define the user variables first (as float) so that you can fill in your own idx numbers for them. I split the flow into two pieces because the new rates are published at around 13.00 uur. I don't want todays rates being replaced by tomorrows in the afternoon.
Code: Select all
[{"id":"c8e4410b.3d57","type":"function","z":"e6a51a23.5d9c38","name":"Uurtarieven tot 13.00 uur","func":"var msg1 ={};\nvar msg2 ={};\nvar msg3 ={};\nvar msg4 ={};\nvar msg5 ={};\nvar msg6 ={};\nvar msg7 ={};\nvar msg8 ={};\nvar msg9 ={};\nvar msg10 ={};\nvar msg11 ={};\nvar msg12 ={};\nvar msg13 ={};\nmsg1.payload = {\"command\":\"setuservariable\",\"idx\":20,\"value\":msg.payload.apx[24].prijsEuroPerMWh.toString()};\nmsg2.payload = {\"command\":\"setuservariable\",\"idx\":21,\"value\":msg.payload.apx[25].prijsEuroPerMWh.toString()};\nmsg3.payload = {\"command\":\"setuservariable\",\"idx\":22,\"value\":msg.payload.apx[26].prijsEuroPerMWh.toString()};\nmsg4.payload = {\"command\":\"setuservariable\",\"idx\":23,\"value\":msg.payload.apx[27].prijsEuroPerMWh.toString()};\nmsg5.payload = {\"command\":\"setuservariable\",\"idx\":24,\"value\":msg.payload.apx[28].prijsEuroPerMWh.toString()};\nmsg6.payload = {\"command\":\"setuservariable\",\"idx\":25,\"value\":msg.payload.apx[29].prijsEuroPerMWh.toString()};\nmsg7.payload = {\"command\":\"setuservariable\",\"idx\":26,\"value\":msg.payload.apx[30].prijsEuroPerMWh.toString()};\nmsg8.payload = {\"command\":\"setuservariable\",\"idx\":27,\"value\":msg.payload.apx[31].prijsEuroPerMWh.toString()};\nmsg9.payload = {\"command\":\"setuservariable\",\"idx\":28,\"value\":msg.payload.apx[32].prijsEuroPerMWh.toString()};\nmsg10.payload = {\"command\":\"setuservariable\",\"idx\":29,\"value\":msg.payload.apx[33].prijsEuroPerMWh.toString()};\nmsg11.payload = {\"command\":\"setuservariable\",\"idx\":30,\"value\":msg.payload.apx[34].prijsEuroPerMWh.toString()};\nmsg12.payload = {\"command\":\"setuservariable\",\"idx\":31,\"value\":msg.payload.apx[35].prijsEuroPerMWh.toString()};\nmsg13.payload = {\"command\":\"setuservariable\",\"idx\":32,\"value\":msg.payload.apx[36].prijsEuroPerMWh.toString()};\n\n\nreturn [[msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9,msg10,msg11,msg12,msg13]]","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":620,"wires":[["568927a2.c89908","43d89f39.7c57"]]}]
Hue | Zigbee2Mqtt | MQTT | P1 | Xiaomi | RFXCom | Modbus | Qlima | Solaredge
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
Re: hourly electricity prices in domoticz (Netherlands)

Here's a code to get Frank Energy prices:
Code: Select all
--Frank Energie hourly energy prices
--forum: https://domoticz.com/forum/viewtopic.php?t=38880
--original script by willemD, see https://www.domoticz.com/forum/viewtopic.php?p=296716#p296716
--version 4/4/2023: added check to see if tomorrow's electricity values are already in, starting on line 93
--version 16/4/2023: make URL call daily instead of hourly, put the results in array, added function to calculate lowest price periods
local kwhPrice='kwhPrijs' --device name for hourly kwh price | type: dummy device -> Managed Counter
local kWhAvg='kwhGemiddeld' --device name for average daily price per Kwh | type: dummy device -> custom sensor
local gasPrice='gasPrijs' --device name for hourly kwh price | type: dummy device -> Managed Counter
local ApiEUtoken='yourTokenHere' --API token of user account from entsoe
local UrlStart='https://web-api.tp.entsoe.eu/api?' --the kwh API website
local GASUrlStart='https://api.energyzero.nl/v1/energyprices?' --the gas API website
local DocType='A44' --day ahead prices document type
local PriceRegion='10YNL----------L' --region is set to The Netherlands (adapt to your need as per API documentation)
--Frank Energie settings, feb 2023:
local kwhTax = 0.21 --BTW/VAT; set to 0.21 (= 21%)
local kwhRaise= 2.05 --Frank Energie toeslag inkoopprijs+ (14.6 for all-in price, status 01-2023)
local gasTax=0.21 --BTW/VAT; set to 0.21 (= 21%)
local gasRaise=22 --ct
local header='dzDailyEnergyPrices'
return {
on = {
timer = {
--'at 15:37', -- Timer to get new electricity prices. Adapt timer to your needs. Normally new electricty prices are available after 15:00.
--'every minute',
'every hour'
},
httpResponses = {
'EUDAYpricesToday', -- must match with the callback passed to the openURL command in the code below
'EUDAYpricesTomorrow',
'EZGASprices',
},
devices = {
'triggerhulp', --dummy decive for debug purpose
},
},
logging = {
level = domoticz.LOG_INFO, --remove comment signs to display logs
marker = 'dzDailyEnergyPrices',
},
data = {
kwh = {initial={}}, --kWh prices per hour
},
execute = function(dz, item)
function getKwhPrices (day)
--day is case sensitive and should be: 'Today' or 'Tomorrow'
if day == 'Today' then
offset=0
elseif day== 'Tomorrow' then
offset=24*60*60
else
dz.log("wrong call, unknow day (case sensitive): " .. day, dz.LOG_INFO)
end
local PricePeriodStart=dz.time.dateToDate(dz.time.rawDate,'yyyy-mm-dd', 'yyyymmdd0000', offset )
local PricePeriodEnd=dz.time.dateToDate(dz.time.rawDate,'yyyy-mm-dd', 'yyyymmdd2300', offset )
-- compose the full URL
local EUurl=UrlStart .. 'securityToken=' .. ApiEUtoken .. '&documentType=' .. DocType .. '&in_Domain=' .. PriceRegion .. '&out_Domain=' .. PriceRegion .. '&periodStart=' .. PricePeriodStart .. '&periodEnd=' .. PricePeriodEnd
dz.log("URL : " .. EUurl, dz.LOG_INFO)
-- launch the URL
dz.openURL({
url = EUurl,
method = 'GET',
callback = 'EUDAYprices'..day, -- must match httpResponses above
})
end
function getGasPrices ()
-- section to launch the EnergyZero gas prices API get request (UTC timing)
-- always get current day data
local GasPricePeriodStart=os.date("%Y-%m-%d",os.time()) .. "T00:00:00.000Z" -- this first price is valid from 01:00 CET
local GASPricePeriodEnd=os.date("%Y-%m-%d", os.time()) .. "T23:59:59.999Z"
local usageType=2 -- GAS
-- compose the full URL:
local EZurl=GASUrlStart .. 'fromDate=' .. GasPricePeriodStart .. '&tillDate=' .. GASPricePeriodEnd .. '&interval=4&usageType=' .. usageType .. '&inclBtw=false'
dz.log("URL : " .. EZurl, dz.LOG_INFO)
-- launch the URL
dz.openURL({
url = EZurl,
method = 'GET',
callback = 'EZGASprices', -- must match httpResponses above
})
end
function printPrices ()
dz.log('Overview of kWh prices, per hour',dz.LOG_INFO)
for hour = 0,47 do
if kwh[hour] then dz.log('kWh ['..hour..'] = '..kwh[hour],dz.LOG_INFO) end
end
end
function shiftPrices ()
dz.log('shift prices from 24..47 to 0..23',dz.LOG_INFO)
for hour = 0,23 do
if kwh[hour+24] then
kwh[hour]=kwh[hour+24]
kwh[hour+24]=nil
end
end
end
function updateAverage ()
average=0
for hour = 0,23 do
if kwh[hour] then
if average~=999 then average=average+kwh[hour]/24 end
else
average=999
end
end
dz.devices(kWhAvg).updateCustomSensor(average)
dz.log('Average kWh price is '..average..' ct (999 = error)',dz.LOG_INFO)
end
function cheapHour(duration)
if duration < 1 or duration > 23 then
dz.log('Invalid duration value: '..duration, dz.LOG_ERROR)
return nil
end
local kwhOrder = {}
for hour = 0, 23 do
local sum = 0
local count = 0
-- Compute the sum and count for the specified duration
for i = hour, hour + duration - 1 do
if kwh[i] then
sum = sum + kwh[i]
count = count + 1
end
end
-- Compute the average and order for the specified duration
if count > 0 then
local avg = sum / count
kwhOrder[hour] = 1
for i = 0, 23 do
if kwh[i] then
local sum2 = 0
local count2 = 0
-- Compute the sum and count for the specified duration at i
for j = i, i + duration - 1 do
if kwh[j] then
sum2 = sum2 + kwh[j]
count2 = count2 + 1
end
end
if count2 > 0 and sum2 / count2 < avg then
kwhOrder[hour] = kwhOrder[hour] + 1
end
end
end
else
kwhOrder[hour] = 0
end
end
local lowest = 1
for hour = 1, 23 do
if kwhOrder[hour] < kwhOrder[lowest] then
lowest = hour
end
end
return lowest
end
function getKwhOrderPosition(hour)
if hour < 0 or hour > 23 then
dz.log('Invalid hour value: '..hour, dz.LOG_ERROR)
return nil
end
local kwhOrder = {}
for i = 0, 23 do
if kwh[i] then
local order = 1
for j = 0, 23 do
if kwh[j] and kwh[j] < kwh[i] then
order = order + 1
end
end
kwhOrder[i] = order
else
kwhOrder[i] = 0
end
end
return kwhOrder[hour]
end
--MAIN routine --
-----------------
kwh=dz.data.kwh
if item.isHTTPResponse then
-- response to openURL (HTTP GET) request was received
dz.log(item.trigger..' <-- trigger',dz.LOG_INFO)
if item.trigger=="EUDAYpricesTomorrow" or item.trigger=="EUDAYpricesToday" then
if item.ok then
if item.isXML then -- should be XML
--check to see if tomorrow's electricity values are already in
if item.xml.Acknowledgement_MarketDocument then dz.log("Acknowledgement_MarketDocument bestaat", dz.LOG_INFO) end
if item.xml.Publication_MarketDocument then dz.log("Publication_MarketDocument bestaat", dz.LOG_INFO) end
if
item.xml.Acknowledgement_MarketDocument
then
dz.log('Fout met XML - '..item.xml.Acknowledgement_MarketDocument.Reason.text,dz.LOG_INFO)
else
--dz.log("Reason.code : " .. item.xml.Publication_MarketDocument.Reason.code, dz.LOG_INFO)
for id = 1, 24 do
dz.log(item.trigger..' - debug [id='..id..']',dz.LOG_INFO)
if item.xml.Publication_MarketDocument.TimeSeries[1] then
rawPrice=tonumber(item.xml.Publication_MarketDocument.TimeSeries[1].Period.Point[id]['price.amount']) --after 13:00 hr tommorow xml returns two timeSeries (not one), so check whether to use index number [1]
else
rawPrice=tonumber(item.xml.Publication_MarketDocument.TimeSeries.Period.Point[id]['price.amount'])
end
price=(rawPrice+kwhRaise) * (1+kwhTax) / 10
--local currentDateTime=os.date("%Y-%m-%d 00:00:00",os.time()+0*60*60+id*60*60)
if id-1<10 then hour='0'..id-1 else hour = ''..id-1 end
if item.trigger=="EUDAYpricesTomorrow" then
currentDateTime=dz.time.dateToDate(dz.time.rawDate,'yyyy-mm-dd', 'yyyy-mm-dd', 24*60*60)..' '..hour..":00:00"
-- examples from https://www.domoticz.com/wiki/DzVents:_next_generation_Lua_scripting:
--domoticz.time.dateToDate('31/12/2021 23:31:05','dd/mm/yyyy hh:MM:ss', 'dddd dd mmmm hh:MM:ss', 1 ) -- > 'Friday 31 December 23:31:06'
--domoticz.time.dateToDate('31/12/2021 23:31:05','dd/mm/yyyy hh:MM:ss', 'ddd dd mmm hh:MM:ss', -3600 * 24 - 3 )) -- > 'Thu 30 Dec 23:31:02'
dz.log('adding EL price [id='..(id+24-1)..']: ' .. price..' ['..rawPrice..' raw]' ,dz.LOG_INFO)
kwh[id+24-1]=price
else
currentDateTime=dz.time.dateToDate(dz.time.rawDate,'yyyy-mm-dd', 'yyyy-mm-dd', 0)..' '..hour..":00:00"
dz.log('adding EL price [id='..(id-1)..']: ' .. price..' ['..rawPrice..' raw]' ,dz.LOG_INFO)
kwh[id-1]=price
end
local historystring=price .. ";" .. price
--debug usage local historystring=7 .. ";" .. 7
dz.log("Used command for history update: dz.devices(kwhPrice).updateHistory(\"" .. currentDateTime .. "\",\"" .. historystring .. "\")", dz.LOG_INFO)
dz.devices(kwhPrice).updateHistory(currentDateTime,historystring)
end
--printPrices ()
end
else
dz.log('No XML received', dz.LOG_INFO)
end
end
if item.trigger=="EUDAYpricesToday" then
updateAverage ()
getGasPrices ()
end
elseif item.trigger=="EZGASprices" then
if (item.ok) then
dz.log('gasprices ok', dz.LOG_INFO)
if (item.isJSON) then -- should be JSON
--dz.log('start dumptable', dz.LOG_INFO)
--dz.utils.dumpTable(item.json) -- dumpTable can be used for debugging
--dz.log('end dumptable', dz.LOG_INFO)
--GasDayPrices.reset() -- remove historic prices from previous run
dz.log('Average:'..item.json.average, dz.LOG_INFO)
--waarde=item.json.Prices[1].price
changevalue=item.json.average * 100
if changevalue~=0 then
changevalue=(changevalue + gasRaise) * (1+gasTax)
dz.log('Gas price:'..changevalue, dz.LOG_INFO)
dz.devices(gasPrice).updateCounter(changevalue)
else
dz.log('ERROR: * NO GAS VALUE *', dz.LOG_INFO)
dz.helpers.notify(dz, header,'No gas value, daily price is not updated', -1, 2*3, 60*8,202302121111)
end
else
dz.log('No JSON received', domoticz.LOG_INFO)
end
else
dz.log('There was a problem handling the request. Item not ok', dz.LOG_INFO)
dz.log(item, dz.LOG_INFO)
end
--continue with next set, kwhtoday -> gas -> kwhTomorrow
getKwhPrices ('Tomorrow')
else
dz.log('There was a problem handling the request. Item not ok', dz.LOG_INFO)
dz.log(item, dz.LOG_INFO)
end
else --item is timer or trigger
printPrices ()
--make sure to call these functions after the price array values are filled at 14:00 hr
dz.log('the cheapest hour is: '..cheapHour(1), dz.LOG_INFO)
dz.log('the cheapest five hours in a row start on:'.. cheapHour(5), dz.LOG_INFO)
dz.log('current hour is on place '..getKwhOrderPosition(dz.time.hour).." where place 1 is the cheapest from today's 24 hrs")
if
dz.time.hour == 14 or --make a new URL call every afternoon, after the tomorrow prices are published on Entsoe (at 13:00 hr?)
kwh[dz.time.hour]==nil --No price, after problem or reboot? --> Generate prices
then --get new prices, make URL call
getKwhPrices ('Today') --Tomorrow and gas are started automaticly, after today XML is handled. Order: today (kWh) -> gas -> tomorrow (kWh)
elseif dz.time.hour == 0 then
shiftPrices ()
updateAverage ()
end
end
dz.devices(kwhPrice).updateCounter(kwh[dz.time.hour]) --update device for hourly energy price
dz.data.kwh=kwh
end
}
Last edited by renerene on Monday 17 April 2023 0:26, edited 8 times in total.
-
- Posts: 648
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: hourly electricity prices in domoticz (Netherlands)
A more optimal way would be to rank the hours by price, lowest first, and then select the first hours in the list to charge your car, depending on number of hours needed, although that possibly would mean the charging will start and stop several times during the day.
- Xenomes
- Posts: 416
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2025.1
- Location: Netherlands
- Contact:
Re: hourly electricity prices in domoticz (Netherlands)
Thanks for the script that i was looking for! Now waiting for 'Restful API access' to be approved!renerene wrote: ↑Sunday 05 February 2023 11:23 Here is a dzVents script to get the daily Frank Energy prices.
I use it in a simple way to charge my car with openEVSE: if hourlyPrice < AveragePrice then EnableCharge
Another usage is to determine optimal mix for house heating, gas versus electricity. When daily costs for both are equal, the most economic situation is reached. If gas costs are higher than electricity, the airco's should work harder.
HP T630 (256GB SSD/8GB Mem) - Ubuntu 24.04.2 LTS (64Bit) - Domoticz 2025.1 (Docker) Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
- Xenomes
- Posts: 416
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2025.1
- Location: Netherlands
- Contact:
Re: hourly electricity prices in domoticz (Netherlands)
Thanks for updating, will update mine to.
HP T630 (256GB SSD/8GB Mem) - Ubuntu 24.04.2 LTS (64Bit) - Domoticz 2025.1 (Docker) Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Re: hourly electricity prices in domoticz (Netherlands)
updated the script in the post above, to check if tomorrow's price are already available. In the previous version this would lead to an error in the log "attempt to index a nil value (field 'Period')"
However, still have to look into it, because
a) hourly kWh values seem to be not correctly updated in weekends, when daily XML is not published and hourly update therefor is not executed "if id==dz.time.hour then dz.devices(kwhPrice).updateCounter(changevalue)"
b) ther seems to be a time shift going on. XMLS values are from 22:00 hour to 22:00, and script fills from 0:00 to 23:00
However, still have to look into it, because
a) hourly kWh values seem to be not correctly updated in weekends, when daily XML is not published and hourly update therefor is not executed "if id==dz.time.hour then dz.devices(kwhPrice).updateCounter(changevalue)"
b) ther seems to be a time shift going on. XMLS values are from 22:00 hour to 22:00, and script fills from 0:00 to 23:00
Re: hourly electricity prices in domoticz (Netherlands)
I have updated the script once again, version 16 april 2023
New features:
2023-04-16 23:47:12.379 Status: dzVents: Info: dzDailyEnergyPrices: the cheapest hour is: 16
2023-04-16 23:47:12.384 Status: dzVents: Info: dzDailyEnergyPrices: the cheapest five hours in a row start on:14
2023-04-16 23:47:12.385 Status: dzVents: Info: dzDailyEnergyPrices: current hour is on place 21 where place 1 is the cheapest from today's 24 hrs
New features:
2023-04-16 23:47:12.379 Status: dzVents: Info: dzDailyEnergyPrices: the cheapest hour is: 16
2023-04-16 23:47:12.384 Status: dzVents: Info: dzDailyEnergyPrices: the cheapest five hours in a row start on:14
2023-04-16 23:47:12.385 Status: dzVents: Info: dzDailyEnergyPrices: current hour is on place 21 where place 1 is the cheapest from today's 24 hrs
Code: Select all
2023-04-16 23:47:12.363 Status: dzVents: Info: dzDailyEnergyPrices: ------ Start internal script: dzDailyEnergyPrices: Device: "triggerhulp (Dummy)", Index: 834
2023-04-16 23:47:12.368 Status: dzVents: Info: dzDailyEnergyPrices: Overview of kWh prices, per hour
2023-04-16 23:47:12.369 Status: dzVents: Info: dzDailyEnergyPrices: kWh [1] = 13.7456
2023-04-16 23:47:12.369 Status: dzVents: Info: dzDailyEnergyPrices: kWh [2] = 12.77034
2023-04-16 23:47:12.369 Status: dzVents: Info: dzDailyEnergyPrices: kWh [3] = 12.67233
2023-04-16 23:47:12.369 Status: dzVents: Info: dzDailyEnergyPrices: kWh [4] = 12.47994
2023-04-16 23:47:12.369 Status: dzVents: Info: dzDailyEnergyPrices: kWh [5] = 12.66628
2023-04-16 23:47:12.369 Status: dzVents: Info: dzDailyEnergyPrices: kWh [6] = 12.77155
2023-04-16 23:47:12.370 Status: dzVents: Info: dzDailyEnergyPrices: kWh [7] = 12.77155
2023-04-16 23:47:12.370 Status: dzVents: Info: dzDailyEnergyPrices: kWh [8] = 12.75582
2023-04-16 23:47:12.370 Status: dzVents: Info: dzDailyEnergyPrices: kWh [9] = 13.61008
2023-04-16 23:47:12.370 Status: dzVents: Info: dzDailyEnergyPrices: kWh [10] = 14.12433
2023-04-16 23:47:12.370 Status: dzVents: Info: dzDailyEnergyPrices: kWh [11] = 13.68389
2023-04-16 23:47:12.370 Status: dzVents: Info: dzDailyEnergyPrices: kWh [12] = 13.29548
2023-04-16 23:47:12.371 Status: dzVents: Info: dzDailyEnergyPrices: kWh [13] = 12.8381
2023-04-16 23:47:12.372 Status: dzVents: Info: dzDailyEnergyPrices: kWh [14] = 12.12541
2023-04-16 23:47:12.372 Status: dzVents: Info: dzDailyEnergyPrices: kWh [15] = 11.71159
2023-04-16 23:47:12.372 Status: dzVents: Info: dzDailyEnergyPrices: kWh [16] = 11.65472
2023-04-16 23:47:12.372 Status: dzVents: Info: dzDailyEnergyPrices: kWh [17] = 11.87131
2023-04-16 23:47:12.372 Status: dzVents: Info: dzDailyEnergyPrices: kWh [18] = 12.46905
2023-04-16 23:47:12.372 Status: dzVents: Info: dzDailyEnergyPrices: kWh [19] = 14.18846
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [20] = 16.32653
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [21] = 17.18805
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [22] = 16.58305
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [23] = 15.97442
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [24] = 15.4154
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [25] = 14.1328
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [26] = 13.69599
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [27] = 13.43221
2023-04-16 23:47:12.373 Status: dzVents: Info: dzDailyEnergyPrices: kWh [28] = 13.57015
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [29] = 13.55805
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [30] = 14.15216
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [31] = 17.28243
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [32] = 21.83203
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [33] = 24.36214
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [34] = 19.92507
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [35] = 16.65686
2023-04-16 23:47:12.374 Status: dzVents: Info: dzDailyEnergyPrices: kWh [36] = 14.47765
2023-04-16 23:47:12.375 Status: dzVents: Info: dzDailyEnergyPrices: kWh [37] = 12.96878
2023-04-16 23:47:12.375 Status: dzVents: Info: dzDailyEnergyPrices: kWh [38] = 12.45937
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [39] = 11.98384
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [40] = 11.4708
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [41] = 11.95601
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [42] = 12.46784
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [43] = 15.04998
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [44] = 17.62486
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [45] = 17.52443
2023-04-16 23:47:12.376 Status: dzVents: Info: dzDailyEnergyPrices: kWh [46] = 16.4923
2023-04-16 23:47:12.377 Status: dzVents: Info: dzDailyEnergyPrices: kWh [47] = 15.10927
2023-04-16 23:47:12.377 Status: dzVents: Info: dzDailyEnergyPrices: kWh [48] = 13.45641
2023-04-16 23:47:12.379 Status: dzVents: Info: dzDailyEnergyPrices: the cheapest hour is: 16
2023-04-16 23:47:12.384 Status: dzVents: Info: dzDailyEnergyPrices: the cheapest five hours in a row start on:14
2023-04-16 23:47:12.385 Status: dzVents: Info: dzDailyEnergyPrices: current hour is on place 21 where place 1 is the cheapest from today's 24 hrs
Re: hourly electricity prices in domoticz (Netherlands)
tomorrow you can earn money, check position 15 in te code below. And debug your code, because negative values don't seem to work in the kwhPrice log statistics
Code: Select all
<Publication_MarketDocument xmlns="urn:iec65325.351:tc57wg16:451-3:publicationdocument:7:0">
<revisionNumber>1</revisionNumber>
<type>A44</type>
<sender_MarketParticipant.mRID codingScheme="A01">10X1001A1001A450</sender_MarketParticipant.mRID>
<sender_MarketParticipant.marketRole.type>A32</sender_MarketParticipant.marketRole.type>
<receiver_MarketParticipant.mRID codingScheme="A01">10X1001A1001A450</receiver_MarketParticipant.mRID>
<receiver_MarketParticipant.marketRole.type>A33</receiver_MarketParticipant.marketRole.type>
<createdDateTime>2023-04-18T17:41:13Z</createdDateTime>
<period.timeInterval>
<start>2023-04-18T22:00Z</start>
<end>2023-04-19T22:00Z</end>
</period.timeInterval>
<TimeSeries>
<mRID>1</mRID>
<businessType>A62</businessType>
<in_Domain.mRID codingScheme="A01">10YNL----------L</in_Domain.mRID>
<out_Domain.mRID codingScheme="A01">10YNL----------L</out_Domain.mRID>
<currency_Unit.name>EUR</currency_Unit.name>
<price_Measure_Unit.name>MWH</price_Measure_Unit.name>
<curveType>A01</curveType>
<Period>
<timeInterval>
<start>2023-04-18T22:00Z</start>
<end>2023-04-19T22:00Z</end>
</timeInterval>
<resolution>PT60M</resolution>
<Point>
<position>1</position>
<price.amount>102.73</price.amount>
</Point>
<Point>
<position>2</position>
<price.amount>98.10</price.amount>
</Point>
<Point>
<position>3</position>
<price.amount>100.00</price.amount>
</Point>
<Point>
<position>4</position>
<price.amount>99.49</price.amount>
</Point>
<Point>
<position>5</position>
<price.amount>100.46</price.amount>
</Point>
<Point>
<position>6</position>
<price.amount>105.31</price.amount>
</Point>
<Point>
<position>7</position>
<price.amount>130.10</price.amount>
</Point>
<Point>
<position>8</position>
<price.amount>139.10</price.amount>
</Point>
<Point>
<position>9</position>
<price.amount>135.41</price.amount>
</Point>
<Point>
<position>10</position>
<price.amount>104.10</price.amount>
</Point>
<Point>
<position>11</position>
<price.amount>70.00</price.amount>
</Point>
<Point>
<position>12</position>
<price.amount>-3.40</price.amount>
</Point>
<Point>
<position>13</position>
<price.amount>-80.00</price.amount>
</Point>
<Point>
<position>14</position>
<price.amount>-200.00</price.amount>
</Point>
<Point>
<position>15</position>
<price.amount>-200.00</price.amount>
</Point>
<Point>
<position>16</position>
<price.amount>-150.00</price.amount>
</Point>
<Point>
<position>17</position>
<price.amount>-30.00</price.amount>
</Point>
<Point>
<position>18</position>
<price.amount>66.37</price.amount>
</Point>
<Point>
<position>19</position>
<price.amount>90.28</price.amount>
</Point>
<Point>
<position>20</position>
<price.amount>119.90</price.amount>
</Point>
<Point>
<position>21</position>
<price.amount>128.36</price.amount>
</Point>
<Point>
<position>22</position>
<price.amount>122.98</price.amount>
</Point>
<Point>
<position>23</position>
<price.amount>109.90</price.amount>
</Point>
<Point>
<position>24</position>
<price.amount>101.66</price.amount>
</Point>
</Period>
</TimeSeries>
</Publication_MarketDocument>
Who is online
Users browsing this forum: No registered users and 1 guest