Closed overas closed 9 months ago
Using Emhass 0.6.6 addon I do not get this error
Here is the log after emhass addon restart and after running emhass forecast.
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun emhass (no readiness notification)
s6-rc: info: service legacy-services successfully started
2024-02-26 20:15:00,867 - web_server - INFO - Launching the emhass webserver at: http://0.0.0.0:5000
2024-02-26 20:15:00,867 - web_server - INFO - Home Assistant data fetch will be performed using url: http://supervisor/core/api
2024-02-26 20:15:00,867 - web_server - INFO - The data path is: /share
2024-02-26 20:15:00,868 - web_server - INFO - Using core emhass version: 0.7.7
waitress INFO Serving on http://0.0.0.0:5000
2024-02-26 20:15:05,885 - web_server - INFO - Setting up needed data
2024-02-26 20:15:05,922 - web_server - INFO - Retrieving weather forecast data using method = scrapper
2024-02-26 20:15:06,940 - web_server - INFO - Retrieving data from hass for load forecast using method = mlforecaster
2024-02-26 20:15:06,941 - web_server - INFO - Retrieve hass get data method initiated...
2024-02-26 20:15:10,182 - web_server - INFO - >> Performing dayahead optimization...
2024-02-26 20:15:10,182 - web_server - INFO - Performing day-ahead forecast optimization
2024-02-26 20:15:10,191 - web_server - INFO - Perform optimization for the day-ahead
2024-02-26 20:15:10,213 - web_server - INFO - Status: Optimal
2024-02-26 20:15:10,213 - web_server - INFO - Total value of the Cost function = -130.68
Mm, this may be because we need to set the data folder to /data
to be persistent. The restart may be in some way resetting the files inside the docker. 🤔
I'll see if I can test this today:
DATA_PATH=/app/data
To:
DATA_PATH=/data
We had some similar problems some time ago. The solution was to write temporary files to the share folder in HA, outside the add-on container.
@overas , this should be fixed in the next version. (0.8.1) 👍
Thanks for the fast fix. Closing case
Emhass 0.8.0 Hassos 2024.2.3
It seems the ML forecaster file is not stored after a restart of emhass addon. Reproduce the error: 1) Restart emhass addon. Everything is ok.
2) Run RESTful Command: trigger_forecast
Here is the log after emhass addon restart and after running emhass forecast.
3) Update mlforecast with service: rest_command.ml_forecast_fit and service: rest_command.ml_forecast_tune
4) Run RESTful Command: trigger_forecast again. Now it works
5) After a restart of emhass addon the error are ther again