springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
129 stars 44 forks source link

Predbat stuck looping around config check: 'Refresh config entities as config_refresh state is unknown' #1350

Open SJB1235 opened 3 months ago

SJB1235 commented 3 months ago

Describe the bug Predbat stopped calculating the plan until it was restarted, predbat.log had repeating lines 'Refresh config entities as config_refresh state is unknown'

Expected behavior Not to get stuck. Perhaps to restart process or step back to .

Predbat version v8.3.1

Environment details

Screenshots N/a Log file

2024-08-06 12:00:31.095775: Completed run status Read-Only 2024-08-06 12:00:31.174141: Info: record_status Read-Only 2024-08-06 12:00:31.249794: Saved current settings to /config/predbat_config.json 2024-08-06 12:04:32.500628: Warn: Web Socket closed, will try to reconnect in 5 seconds 2024-08-06 12:04:37.506809: Info: Start socket for url http://supervisor/core/api/websocket 2024-08-06 12:04:56.873387: Error: Web Socket exception in startup: 400, message='Invalid response status', url=URL('http://supervisor/core/api/websocket') 2024-08-06 12:04:56.875092: Error: Traceback (most recent call last): File "/config/ha.py", line 67, in socketLoop async with session.wsconnect(url) as websocket: File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 1167, in __aenter_\ self._resp = await self._coro File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 821, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 400, message='Invalid response status', url=URL('http://supervisor/core/api/websocket')

2024-08-06 12:04:56.876677: Warn: Web Socket closed, will try to reconnect in 5 seconds 2024-08-06 12:05:00.936088: Error: string indices must be integers 2024-08-06 12:05:01.881802: Info: Start socket for url http://supervisor/core/api/websocket 2024-08-06 12:05:02.337027: Info: Web Socket active 2024-08-06 12:05:06.947714: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:05:21.975781: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:05:37.004007: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:05:52.032360: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:06:07.057271: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:06:22.086076: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:06:37.113249: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:06:52.140778: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:07:07.166782: Info: Refresh config entities as config_refresh state is unknown 2024-08-06 12:07:22.195151: Info: Refresh config entities as config_refresh state is unknown .

springfall2008 commented 3 months ago

Did restarting the add-on fix it? It looks like its crashed somehow as after that refresh it should perform an update.

SJB1235 commented 3 months ago

Yes restarting the add-on fixed it.