diff --git a/src/components/OpenwbPageNavbar.vue b/src/components/OpenwbPageNavbar.vue index 175d0b22d..df541b738 100644 --- a/src/components/OpenwbPageNavbar.vue +++ b/src/components/OpenwbPageNavbar.vue @@ -175,6 +175,14 @@ > Lastmanagement + + PV-Prognose + +export default { + props: { + forecast: { type: Object, required: true }, + }, + emits: ["update:configuration"], + methods: { + updateConfiguration(event, path = undefined) { + this.$emit("update:configuration", { value: event, object: path }); + }, + }, +}; + diff --git a/src/components/forecast/OpenwbForecastConfigFallback.vue b/src/components/forecast/OpenwbForecastConfigFallback.vue new file mode 100644 index 000000000..280092a26 --- /dev/null +++ b/src/components/forecast/OpenwbForecastConfigFallback.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/components/forecast/OpenwbForecastProxy.vue b/src/components/forecast/OpenwbForecastProxy.vue new file mode 100644 index 000000000..ca920eae3 --- /dev/null +++ b/src/components/forecast/OpenwbForecastProxy.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/components/forecast/forecastsolar/forecast.vue b/src/components/forecast/forecastsolar/forecast.vue new file mode 100644 index 000000000..6f14b4e1b --- /dev/null +++ b/src/components/forecast/forecastsolar/forecast.vue @@ -0,0 +1,172 @@ + + + diff --git a/src/components/forecast/openmeteo/forecast.vue b/src/components/forecast/openmeteo/forecast.vue new file mode 100644 index 000000000..106ba79f9 --- /dev/null +++ b/src/components/forecast/openmeteo/forecast.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/components/forecast/pvnode/forecast.vue b/src/components/forecast/pvnode/forecast.vue new file mode 100644 index 000000000..6f7875e45 --- /dev/null +++ b/src/components/forecast/pvnode/forecast.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/router/index.js b/src/router/index.js index 89f33ac7e..9248abd45 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -105,6 +105,15 @@ const routes = [ }, component: () => import("../views/LoadManagementConfiguration.vue"), }, + { + path: "/ForecastConfiguration", + name: "ForecastConfiguration", + meta: { + heading: "Konfiguration - PV-Prognose", + checkPermissions: true, + }, + component: () => import("../views/ForecastConfiguration.vue"), + }, { path: "/ChargePointInstallation", name: "ChargePointInstallation", diff --git a/src/store/index.js b/src/store/index.js index f712c6f3b..0875fdb1f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -126,7 +126,7 @@ export default createStore({ const setPath = (object, path, value) => path.split(".").reduce((o, p, i) => (o[p] = path.split(".").length === i + 1 ? value : o[p] || {}), object); - if (message.topic in state.mqtt || !(message.topic in state.examples)) { + if (message.topic in state.mqtt || !state.examples || !(message.topic in state.examples)) { if (message.objectPath != undefined) { setPath(state.mqtt[message.topic], message.objectPath, message.payload); } else { diff --git a/src/views/DebugConfiguration.vue b/src/views/DebugConfiguration.vue index 67e7f971f..2a5b3d7e5 100644 --- a/src/views/DebugConfiguration.vue +++ b/src/views/DebugConfiguration.vue @@ -75,6 +75,10 @@ export default { title: "MQTT-Log", fileName: "/openWB/ramdisk/mqtt.log", }, + { + title: "Forecast-Log", + fileName: "/openWB/ramdisk/forecast.log", + }, { title: "SoC-Log", fileName: "/openWB/ramdisk/soc.log", diff --git a/src/views/ForecastConfiguration.vue b/src/views/ForecastConfiguration.vue new file mode 100644 index 000000000..9eaef990d --- /dev/null +++ b/src/views/ForecastConfiguration.vue @@ -0,0 +1,600 @@ + + + + +