Closed buliwyf42 closed 8 months ago
Could you share a fresh token with info@evcc.io?
Both Token? btw could the culprit be an (old) token in the settings table?
Identical to what youve used in the ui
You have mail.
Looks like Token works on first use. If it is not refreshed and evcc restarted while token expires, then code would not use the refresh token from config and instead fail. This is fixed by https://github.com/evcc-io/evcc/pull/12121. Nightly will be updated in 30min.
Thanks. I still have the issue if I hit the “Edit” button in the Device Configuration that it shows like in the picture above. All the Fields are empty. Not even the name is filled. It looks like the info is not pulled from the db correctly. Is this another Bug?
@buliwyf42 Yes, this looks like a UI or communication issue. Can you open a new bug with some more details? Browser version and screenshot from the network tab of the browser development tools would help to narrow in on this issue.
@andig I'm also having issues with Tesla token refresh, next expiry is in 7 hours and I set up collecting logs (running on nightly 0.124.1 (39bb31a1))
Just one question about the token refresh process: Shouldn't the refreshed token be stored somewhere even after the first startup of evcc? I don't know the tesla api, but usually token refresh needs to be done on the most recent token and not on the initial token.
I looked into the sqlite db and couldn't find it there:
sqlite3 "file:./evcc.db?mode=ro"
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
sqlite> select * from settings;
lp1.planEnergy|0
lp1.planTime|0001-01-01T00:00:00Z
bufferSoc|100
smartCostLimit|0.01
lp1.mode|pv
vehicle.a.planTime|0001-01-01T00:00:00Z
vehicle.a.planSoc|0
lp1.limitSoc|0
bufferStartSoc|0
prioritySoc|60
lp1.minCurrent|6
lp1.maxCurrent|32
lp1.phasesConfigured|3
batteryDischargeControl|false
vehicle.b.planTime|2024-02-12T06:00:00Z
vehicle.b.planSoc|70
vehicle.b.limitSoc|70
vehicle.b.minSoc|25
and config.yaml looks like this:
levels:
tesla-command: trace
vehicles:
- name: a
type: template
template: tesla-command
title: A
mincurrent: 6
maxcurrent: 16
accessToken: "ey...."
refreshToken: "EU_8...."
vin: L....
capacity: 60
It will only be refreshed if expired. If your yaml access token is still valid, we‘ll use that. You could try placing any expired token there for testing though.
Please open new issue, this seems more about ui refresh than token expiry now.
Describe the bug
I'm using the latest nightly after the issues with 0.124 but it seems my token expires after some time anyway. I configured it via the UI. I had this several time since yesterday. Writing to the db is possible.
Steps to reproduce
This is how it looks in the UI after entering the correct config saving and validating it an restarting evcc.
Configuration details
Log details
What type of operating system are you running?
Linux
Version
evcc version 0.124.1