i wanted to try the new Weather Forecast using OpenMeteo and the Predictor Production Linear Model, which were released in the tag 2025.7.0. I have some questions regarding the usage:
Do I need an API key? On the webpage I read for non-commercial use, OpenMeteo can be used without one.
Do I need to do anything else than activating the OpenMeteo and Predictor.Production.Linearmodel components, when I already have the other components needed for the Timeofuse Controller?
I saw that the predictor accesses a file in the data directory (see error below, path should be correct and is also passed to the execution of OpenEMS edge). Do I need to create some files manually or should the component take care of everything?
I tried to use these controllers, but got the following error messages:
Error 1
[thread-1] ERROR [n.linearmodel.ModelFitRunnable] Cannot train linear model: io.openems.common.exceptions.OpenemsException: Cannot fetch historical weather data: java.lang.IllegalStateException: Not a JSON Object: null at io.openems.edge.predictor.production.linearmodel.ModelFitRunnable.fetchTrainingData(ModelFitRunnable.java:103) ~[?:?] at io.openems.edge.predictor.production.linearmodel.ModelFitRunnable.run(ModelFitRunnable.java:87) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.lang.Thread.run(Thread.java:1583) [?:?]
Error 2
[thread-1] ERROR [ictorProductionLinearModelImpl] [predictorPvWeather] Failed to load linear model: <path-to>/data/models/linearmodel.json (No such file or directory)
I hope you can help me with these issues, thank you in advance for any help.
For non-commercial use, you don’t actually need an API key, it should work fine without one.
To get the weather-based forecast up and running, you’ll need to do the following:
Enter the site coordinates in the meta app.
Install the components Weather Open-Meteo and Predictor Production Linear Model.
In the Predictor Production Linear Model component, set Production Active Power as the source channel.
Then, in the Core Predictor-Manager, make sure the predictor priorities are set so that the Predictor Production Linear Model (for example predictor1) is at the top of the list.
Once that’s done, everything should work as expected.
About the second error: my guess is that it can’t find the file yet because the model hasn’t been trained. As soon as there’s been a training run, the file should show up.
Thank you for the response! Unfortunately, it still does not seem to work for me. I see that the weather data is fetched, but the Linear Model Predictor still seems to have some issues.
When activating the predictor (after weather data already has been fetched) i get this error:
PredictorError
[thread-1] ERROR [n.linearmodel.ModelFitRunnable] Cannot train linear model: io.openems.common.exceptions.OpenemsException: Insufficient data points available for training at io.openems.edge.predictor.production.linearmodel.ModelFitRunnable.trainModel(ModelFitRunnable.java:164) ~[?:?] at io.openems.edge.predictor.production.linearmodel.ModelFitRunnable.run(ModelFitRunnable.java:88) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.lang.Thread.run(Thread.java:1583) [?:?]
And then at each cycle of the Optimizer:
Error at each cycle
[thread-1] ERROR [ictorProductionLinearModelImpl] [predictorWeather] Failed to load linear model: <path-to-data>/data/models/linearmodel.json (No such file or directory) [thread-1] INFO [i.prediction.AbstractPredictor] [predictorWeather] Prediction for [_sum/ProductionActivePower]: Prediction{EMPTY}