Skip to content

Instantly share code, notes, and snippets.

@dirkjanfaber
Last active May 31, 2023 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirkjanfaber/4a99336d48dde52181514d6e4a06b9eb to your computer and use it in GitHub Desktop.
Save dirkjanfaber/4a99336d48dde52181514d6e4a06b9eb to your computer and use it in GitHub Desktop.
Entsoe Node-RED interface
[
{
"id": "e78d2a1efd2c46e1",
"type": "subflow",
"name": "Entsoe",
"info": "",
"category": "",
"in": [
{
"x": 220,
"y": 140,
"wires": [
{
"id": "a72a7ad5fcfd73c1"
}
]
}
],
"out": [
{
"x": 780,
"y": 140,
"wires": [
{
"id": "3bd1a7f847cac8d2",
"port": 0
}
]
}
],
"env": [
{
"name": "securitytoken",
"type": "cred",
"ui": {
"label": {
"en-US": "Security token"
}
}
},
{
"name": "domain",
"type": "str",
"value": "",
"ui": {
"label": {
"en-US": "Domain"
},
"type": "select",
"opts": {
"opts": [
{
"l": {
"en-US": "Albania (AL)"
},
"v": "10YAL-KESH-----5"
},
{
"l": {
"en-US": "Austria (AT)"
},
"v": "10YAT-APG------L"
},
{
"l": {
"en-US": "Belgium (BE)"
},
"v": "10YBE----------2"
},
{
"l": {
"en-US": "Bosnia and Herz. (BA)"
},
"v": "10YBA-JPCC-----D"
},
{
"l": {
"en-US": "Bulgaria (BG)"
},
"v": "10YCA-BULGARIA-R"
},
{
"l": {
"en-US": "Croatia (HR)"
},
"v": "10YHR-HEP------M"
},
{
"l": {
"en-US": "Cyprus (CY)"
},
"v": "10YCY-1001A0003J"
},
{
"l": {
"en-US": "Czech Republic (CZ)"
},
"v": "10YCZ-CEPS-----N"
},
{
"l": {
"en-US": "Denmark (DK)"
},
"v": "10Y1001A1001A65H"
},
{
"l": {
"en-US": "Estonia (EE)"
},
"v": "10Y1001A1001A39I"
},
{
"l": {
"en-US": "Finland (FI)"
},
"v": "10YFI-1--------U"
},
{
"l": {
"en-US": "France (FR)"
},
"v": "10YFR-RTE------C"
},
{
"l": {
"en-US": "Georgia (GE)"
},
"v": "10Y1001A1001B012"
},
{
"l": {
"en-US": "Germany (DE)"
},
"v": "10Y1001A1001A83F"
},
{
"l": {
"en-US": "Greece (GR)"
},
"v": "10YGR-HTSO-----Y"
},
{
"l": {
"en-US": "Hungary (HU)"
},
"v": "10YHU-MAVIR----U"
},
{
"l": {
"en-US": "Ireland (IE)"
},
"v": "10YIE-1001A00010"
},
{
"l": {
"en-US": "Italy (IT)"
},
"v": "10YIT-GRTN-----B"
},
{
"l": {
"en-US": "Kosovo (XK)"
},
"v": "10Y1001C--00100H"
},
{
"l": {
"en-US": "Latvia (LV)"
},
"v": "10YLV-1001A00074"
},
{
"l": {
"en-US": "Lithuania (LT)"
},
"v": "10YLT-1001A0008Q"
},
{
"l": {
"en-US": "Luxembourg (LU)"
},
"v": "10YLU-CEGEDEL-NQ"
},
{
"l": {
"en-US": "Malta (MT)"
},
"v": "10Y1001A1001A93C"
},
{
"l": {
"en-US": "Moldova (MD)"
},
"v": "10Y1001A1001A990"
},
{
"l": {
"en-US": "Montenegro (ME)"
},
"v": "10YCS-CG-TSO---S"
},
{
"l": {
"en-US": "Netherlands (NL)"
},
"v": "10YNL----------L"
},
{
"l": {
"en-US": "North Macedonia (MK)"
},
"v": "10YMK-MEPSO----8"
},
{
"l": {
"en-US": "Norway (NO)"
},
"v": "10YNO-0--------C"
},
{
"l": {
"en-US": "Poland (PL)"
},
"v": "10YPL-AREA-----S"
},
{
"l": {
"en-US": "Portugal (PT)"
},
"v": "10YPT-REN------W"
},
{
"l": {
"en-US": "Romania (RO)"
},
"v": "10YRO-TEL------P"
},
{
"l": {
"en-US": "Serbia (RS)"
},
"v": "10YCS-SERBIATSOV"
},
{
"l": {
"en-US": "Slovakia (SK)"
},
"v": "10YSK-SEPS-----K"
},
{
"l": {
"en-US": "Slovenia (SI)"
},
"v": "10YSI-ELES-----O"
},
{
"l": {
"en-US": "Spain (ES)"
},
"v": "10YES-REE------0"
},
{
"l": {
"en-US": "Sweden (SE)"
},
"v": "10YSE-1--------K"
},
{
"l": {
"en-US": "Switzerland (CH)"
},
"v": "10YCH-SWISSGRIDZ"
},
{
"l": {
"en-US": "Turkey (TR)"
},
"v": "10YTR-TEIAS----W"
},
{
"l": {
"en-US": "Ukraine (UA)"
},
"v": "10Y1001C--00003F"
},
{
"l": {
"en-US": "United Kingdom (UK)"
},
"v": "10Y1001A1001A92E"
}
]
}
}
}
],
"meta": {
"module": "Entsoe",
"version": "0.0.2",
"author": "Dirk-Jan Faber <dfaber@victronenergy.com>",
"desc": "Retrieve Entso.eu day ahead prices, using their API",
"keywords": "entsoe, day ahead prices",
"license": "MIT"
},
"credentials": {
"securitytoken": ""
},
"color": "#C1C1DD"
},
{
"id": "a72a7ad5fcfd73c1",
"type": "function",
"z": "e78d2a1efd2c46e1",
"name": "create entsoe url",
"func": "msg.url = 'https://web-api.tp.entsoe.eu/api';\nvar parameters = [];\n\nif (env.get('securitytoken')) {\n parameters.push('securityToken='+env.get('securitytoken'))\n}\n\nparameters.push('documentType=A44')\n\nif (env.get('domain')) {\n parameters.push('in_Domain='+env.get('domain'))\n parameters.push('out_Domain=' + env.get('domain'))\n}\n\nvar today = new Date();\nparameters.push('periodStart='+today.toISOString().split('T')[0].replace(/-/g, '')+'0000')\nparameters.push('periodEnd=' + today.toISOString().split('T')[0].replace(/-/g, '') + '2300')\n\nmsg.url += '?'+parameters.join('&')\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 140,
"wires": [
[
"23b4a4a85a31173e"
]
]
},
{
"id": "23b4a4a85a31173e",
"type": "http request",
"z": "e78d2a1efd2c46e1",
"name": "",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 530,
"y": 140,
"wires": [
[
"3bd1a7f847cac8d2"
]
]
},
{
"id": "3bd1a7f847cac8d2",
"type": "xml",
"z": "e78d2a1efd2c46e1",
"name": "",
"property": "payload",
"attr": "",
"chr": "",
"x": 670,
"y": 140,
"wires": [
[]
]
},
{
"id": "339224768d118f98",
"type": "subflow:e78d2a1efd2c46e1",
"z": "142a53ab13377908",
"name": "",
"env": [
{
"name": "securitytoken",
"type": "cred"
},
{
"name": "domain",
"value": "10Y1001A1001A65H",
"type": "str"
}
],
"x": 600,
"y": 240,
"wires": [
[
"29e69b0b7e940b40"
]
]
}
]
@dirkjanfaber
Copy link
Author

You need an ENTSO-e Restful API key if you want to collect the data from ENTSO-e. To request this API key, register on the Transparency Platform https://transparency.entsoe.eu/ and send an email to transparency at entsoe.eu with Restful API access in the subject line. Indicate the email address you entered during registration in the email body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment