-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traceback error when running naive-mpc-optim #483
Comments
Do you have EMHASS configured to replace NaN with 0s? Here's a snippet from my config json, in which it is enabled.
|
Below is the corresponding snippet from my config:
If you think I need to try a different setting, please let me know and I will happily try it. |
To me these 2 config options seem mutually exclusive: you either replace NaN with 0, or you interpolate NaN values. Cannot do both. |
I have an automation which attempts to run naive-mpc-optim every half hour and I have been monitoring my issue for the last few days and have noticed that every day it gives this traceback error between 19:00 until 06:30 (inclusive). Every day, from 07:00 until 18:30 there are no errors. I haven't been able to find any NaN's in my data as of yet. |
Not completely true, but not intuitive I'll give you that. @Excentyl Add the two sensors (solar and load) to both options (interp and replace) just as posted by @RudolfRendier |
Thanks a lot @davidusb-geek, that seems to have worked and I am no longer getting the traceback errors. What I find strange is that I am providing the PV forecast using the runtime variable pv_power_forecast (which seems to be the problem from the logs, assuming that is the P_PV[i] variable), so I do not understand how setting the solar and load sensors to interp and replace fixes the issue. I only ask because I wonder if there is an underlying issue here? I could be wrong, but I thought it would be worth asking the question first before closing the issue? |
When using MPC, even if you provide your own forecast at runtime, the system needs to fetch some data from Home Assistant to implement the current/now values, see here: https://emhass.readthedocs.io/en/latest/forecasts.html#now-current-values-in-forecasts |
Describe the bug
On version 0.12.8, naive-mpc-optim sometimes fails. Over the last few days, I have found it tends to fail if ran in the early morning, but works at other times.
To Reproduce
Use a rest command to call naive-mpc-optim:
The following is printed in the logs:
Expected behavior
Able to run naive-mpc-optim without failure
Screenshots

Response when attempting to call the rest command in Home Assistant:
Home Assistant installation type
Home Assistant OS
Your hardware
EMHASS installation type
The text was updated successfully, but these errors were encountered: