flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
385 stars 196 forks source link

Stopped displaying trips and charging history #565

Closed jwolansk closed 5 months ago

jwolansk commented 1 year ago

Describe the bug Hello, thanks for the useful software!

I have PSA controller running in docker as a Home Assistant Addon.

Some 2 month after installation it stopped displaying the trips data on the dashboard with the message "No data to show, there is probably no trips recorded yet". I noticed that just after the recent HA update to latest version, maybe it's related?

The database is growing after the car is driven or charged, data is fetched from PSA as I can see it live in dashboard and in HA.

How to debug it further?

thanks

Environment (please complete the following information):

Additional context Add any other context about the problem here.

config.ini.txt psa.log

jwolansk commented 1 year ago

Hey, apparently the container restart through Portainer made it to display the history again 馃 The Addon restart through HA didn't work, as it is not a restart but the container is recreated from scratch. How do I interpret that?

Ilpo55 commented 1 year ago

I have the same issue. Restart through Portainer did not help.

Ilpo55 commented 11 months ago

I had to uninstall / reinstall the PSACC Add-On to make it work. History was of course gone.

FEmser commented 9 months ago

I have the same issue. I pinned it down a little. I manually edited the info.db file and after i clear the "position" data, psacc will show the dashboard "fine". Meaning charges will be shown and the calculation fields will be shown emtpy. If I write anything into the position data, the webUI will show "No data to show, there is probably no trips recorded yet" again on every tab exept control.

FEmser commented 9 months ago

I played around a little more and found the actual issue (at lease for me)! The position data was fine and instead there was a row in the battery data which had no stopping time. After deleting that row, everything worked normally again. I think this was caused by crash of the raspberry or a reboot or somthing...

Maybe that can help you too :) And maybe some kind of data validation can be added to remove invalid lines instead of everything not working anymore. Thanks for the great work flobz <3

2023-09-26 16_36_43-Stopped displaying trips and charging history 路 Issue #565 路 flobz_psa_car_contr

jwolansk commented 9 months ago

Hey, thanks! I'll have a look at my database 馃檪

gerar19 commented 9 months ago

隆Jugu茅 un poco m谩s y encontr茅 el problema real (al menos para m铆)! Los datos de posici贸n estaban bien y en su lugar hab铆a una fila en los datos de la bater铆a que no ten铆a tiempo de parada. Despu茅s de eliminar esa fila, todo volvi贸 a funcionar con normalidad. Creo que esto fue causado por una falla de Raspberry o un reinicio o algo as铆...

Quiz谩s eso tambi茅n pueda ayudarte :) Y tal vez se pueda agregar alg煤n tipo de validaci贸n de datos para eliminar l铆neas no v谩lidas en lugar de que todo ya no funcione. Gracias por el gran trabajo flobz <3

2023-09-26 16_36_43-Dej贸 de mostrar viajes e historial de carga 路 Problema #565 路 flobz_psa_car_contr

How i Can acces to this table? thanks

FEmser commented 9 months ago

I used the tool "DB Browser for SQLite" https://sqlitebrowser.org/ or https://github.com/sqlitebrowser/sqlitebrowser You just need a SQLite tool to open the "info.db" file.

Omaaar90 commented 8 months ago

I had the same issue. I looked into the database and everything seemed fine. I restarted the container using docker stop and then docker start . Refreshed the page and everything works again.

henkiejan1 commented 8 months ago

I played around a little more and found the actual issue (at lease for me)! The position data was fine and instead there was a row in the battery data which had no stopping time. After deleting that row, everything worked normally again. I think this was caused by crash of the raspberry or a reboot or somthing...

Maybe that can help you too :) And maybe some kind of data validation can be added to remove invalid lines instead of everything not working anymore. Thanks for the great work flobz <3

2023-09-26 16_36_43-Stopped displaying trips and charging history 路 Issue #565 路 flobz_psa_car_contr

But how did you delete that row?? I used sql lite browser but when i select and pres del om my keyboard the row is right there... ???

flobz commented 5 months ago

Not able to reproduce the issue.