Anbei ein starter Flow mit dem der Einstieg in das EOS etwas vereinfacht werden soll.
[
{
"id": "f6f2187d.f17ca8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "9293acdd55418ead",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 120,
"wires": [
[
"375c8b8d17cdec3c"
]
]
},
{
"id": "b3316c23f5f40b0f",
"type": "http request",
"z": "f6f2187d.f17ca8",
"name": "Write EOS Configuration",
"method": "PUT",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://eos:8503/v1/config",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "other",
"keyValue": "Accept",
"valueType": "other",
"valueValue": "application/json"
}
],
"x": 610,
"y": 120,
"wires": [
[
"2d99c7d4ac3efd88"
]
]
},
{
"id": "2d99c7d4ac3efd88",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "Print Configuration",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1210,
"y": 120,
"wires": []
},
{
"id": "375c8b8d17cdec3c",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "Build Configuration",
"func": "return {\n payload: {\n \"general\": {\n \"latitude\": 48.744192,\n \"longitude\": 9.331482\n },\n \"devices\": {\n \"batteries\": [\n {\n \"capacity_wh\": 10000,\n \"device_id\": \"battery1\",\n \"initial_soc_percentage\": 100,\n \"min_soc_percentage\": 15,\n \"max_charge_power_w\": 5100\n }\n ],\n \"inverters\": [\n {\n \"device_id\": \"inverter1\",\n \"hours\": null,\n \"max_power_wh\": 15000,\n \"battery_id\": \"battery1\"\n }\n ],\n \"home_appliances\": [\n {\n \"device_id\": \"dishwasher\",\n \"hours\": null,\n \"consumption_wh\": 2000,\n \"duration_h\": 3\n }\n ]\n },\n \"measurement\": {\n \"load0_name\": \"Household\",\n },\n \"elecprice\": {\n \"provider\": \"ElecPriceAkkudoktor\",\n \"charges_kwh\": 0.27,\n },\n \"load\": {\n \"provider\": \"LoadAkkudoktor\",\n \"provider_settings\": {\n \"loadakkudoktor_year_energy\": 2500\n }\n },\n \"pvforecast\": {\n \"provider\": \"PVForecastAkkudoktor\",\n \"planes\": [\n {\n \"surface_azimuth\": 260,\n \"surface_tilt\": 25,\n \"peakpower\": 6.750,\n \"mountingplace\": \"building\",\n \"trackingtype\": 0,\n \"optimal_surface_tilt\": false,\n \"optimalangles\": false,\n \"modules_per_string\": 8,\n \"strings_per_inverter\": 2,\n \"pvtechchoice\": \"crystSi\"\n },\n {\n \"surface_azimuth\": 85,\n \"surface_tilt\": 25,\n \"peakpower\": 4.050,\n \"mountingplace\": \"building\",\n \"trackingtype\": 0,\n \"optimal_surface_tilt\": false,\n \"optimalangles\": false,\n \"modules_per_string\": 9,\n \"strings_per_inverter\": 1,\n \"pvtechchoice\": \"crystSi\"\n }\n ],\n \"max_planes\": 2\n },\n \"weather\": {\n \"provider\": \"ClearOutside\"\n }\n }\n};",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 120,
"wires": [
[
"b3316c23f5f40b0f"
]
]
},
{
"id": "72c17c5910d99152",
"type": "comment",
"z": "f6f2187d.f17ca8",
"name": "Configuration",
"info": "",
"x": 110,
"y": 60,
"wires": []
},
{
"id": "d135b91a62235efc",
"type": "comment",
"z": "f6f2187d.f17ca8",
"name": "Predictions",
"info": "",
"x": 100,
"y": 200,
"wires": []
},
{
"id": "4fc3f828f902af00",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 260,
"wires": [
[
"f5efb2ecd6f3c75a"
]
]
},
{
"id": "f5efb2ecd6f3c75a",
"type": "http request",
"z": "f6f2187d.f17ca8",
"name": "Update EOS Predictions",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://eos:8503/v1/prediction/update",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "other",
"keyValue": "Accept",
"valueType": "other",
"valueValue": "application/json"
}
],
"x": 610,
"y": 260,
"wires": [
[
"d7eb5fa51b0dd69f"
]
]
},
{
"id": "d7eb5fa51b0dd69f",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "Print Results",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 280,
"wires": []
},
{
"id": "01c36ec6107d5e2a",
"type": "comment",
"z": "f6f2187d.f17ca8",
"name": "Optimization",
"info": "",
"x": 110,
"y": 400,
"wires": []
},
{
"id": "c1121a7fd599a682",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 320,
"wires": [
[
"4aee39f04345e798"
]
]
},
{
"id": "4aee39f04345e798",
"type": "http request",
"z": "f6f2187d.f17ca8",
"name": "Get EOS Predictions",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://eos:8503/v1/prediction/dataframe?keys=weather_temp_air&keys=pvforecast_ac_power&keys=elecprice_marketprice_wh&keys=load_mean",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "other",
"keyValue": "Accept",
"valueType": "other",
"valueValue": "application/json"
}
],
"x": 600,
"y": 320,
"wires": [
[
"d7eb5fa51b0dd69f"
]
]
},
{
"id": "5af9d5fa60775471",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 460,
"wires": [
[
"0c962e8cd704e7ae"
]
]
},
{
"id": "30c1314c973b7caf",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "Build Optimization Parameters",
"func": "\nconst data = Object.keys(msg.payload.data).map(\n (key) => [key, msg.payload.data[key]]);\n\nconst gesamtlast = data.map(\n (key) => key[1]['load_mean']);\n\nconst pv_prognose_wh = data.map(\n (key) => key[1]['pvforecast_ac_power']);\n\n//const strompreis_euro_pro_wh = data.map(\n// (key) => key[1]['elecprice_marketprice_wh']);\nconst strompreis_euro_pro_wh = [];\nfor (var i = 0; i < 48; i++) {\n strompreis_euro_pro_wh[i] = 0.00027;\n}\n\nconst temperature_forecast = data.map(\n (key) => key[1]['weather_temp_air']);\n\nreturn {\n requestTimeout: 999999999,\n payload: {\n \"ems\": {\n \"preis_euro_pro_wh_akku\": 0.0007,\n \"einspeiseverguetung_euro_pro_wh\": 0.0007,\n \"gesamtlast\": gesamtlast,\n \"pv_prognose_wh\": pv_prognose_wh,\n \"strompreis_euro_pro_wh\": strompreis_euro_pro_wh\n },\n \"pv_akku\": {\n \"device_id\": \"battery1\",\n \"capacity_wh\": 10000,\n \"charging_efficiency\": 0.92,\n \"discharging_efficiency\": 0.92,\n \"max_charge_power_w\": 5100,\n \"initial_soc_percentage\": 100,\n \"min_soc_percentage\": 25,\n \"max_soc_percentage\": 100\n },\n \"inverter\": {\n \"device_id\": \"inverter1\",\n \"max_power_wh\": 15000,\n \"battery_id\": \"battery1\"\n },\n \"eauto\": {\n \"device_id\": \"eauto\",\n \"capacity_wh\": 1\n },\n \"temperature_forecast\": temperature_forecast,\n \"start_solution\": null\n }\n};",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 630,
"y": 460,
"wires": [
[
"80f2f26d24d65688"
]
]
},
{
"id": "80f2f26d24d65688",
"type": "http request",
"z": "f6f2187d.f17ca8",
"name": "Perform EOS Optimization",
"method": "POST",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://eos:8503/optimize",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "other",
"keyValue": "Accept",
"valueType": "other",
"valueValue": "application/json"
}
],
"x": 940,
"y": 460,
"wires": [
[
"90404ab8330156e0"
]
]
},
{
"id": "90404ab8330156e0",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "Print Results",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 460,
"wires": []
},
{
"id": "0c962e8cd704e7ae",
"type": "http request",
"z": "f6f2187d.f17ca8",
"name": "Get EOS Predictions",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://eos:8503/v1/prediction/dataframe?keys=pvforecast_ac_power&keys=elecprice_marketprice_wh&keys=load_mean&keys=weather_temp_air",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "other",
"keyValue": "Accept",
"valueType": "other",
"valueValue": "application/json"
}
],
"x": 340,
"y": 460,
"wires": [
[
"30c1314c973b7caf"
]
]
},
{
"id": "12b15a9f97edb76e",
"type": "api-get-history",
"z": "f6f2187d.f17ca8",
"name": "Get Load Profile",
"server": "2c35c828f4aede7c",
"version": 1,
"startDate": "2025-05-12T18:00",
"endDate": "2025-05-12T19:00",
"entityId": "sensor.grid_power",
"entityIdType": "equals",
"useRelativeTime": false,
"relativeTime": "24 hours",
"flatten": true,
"outputType": "array",
"outputLocationType": "msg",
"outputLocation": "payload",
"x": 320,
"y": 620,
"wires": [
[
"a77ee184fca57dd0"
]
]
},
{
"id": "735d45a168f4da31",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "Start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 620,
"wires": [
[
"12b15a9f97edb76e"
]
]
},
{
"id": "9ec94a493f2771ce",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "Print Results",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 910,
"y": 620,
"wires": []
},
{
"id": "a77ee184fca57dd0",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "Aggregate per Hour",
"func": "\nconst next = {};\nmsg.payload.forEach(function(e) {\n\n // extract hour of day\n\n const hour = new Date(e.last_changed).getHours();\n\n // store measurement at this hour\n\n if (next[hour] == null) {\n next[hour] = {\n count: 1,\n value: parseFloat(e.state),\n };\n return;\n }\n\n next[hour].count++;\n next[hour].value = (next[hour].value + parseFloat(e.state));\n\n});\n\nconst res = [];\nObject.keys(next).forEach((v, i) => {\n res.push(next[v].value / next[v].count);\n});\n\nreturn {\n payload: res\n};",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 590,
"y": 620,
"wires": [
[
"9ec94a493f2771ce"
]
]
},
{
"id": "2c35c828f4aede7c",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30,
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": false
}
]