evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Add Vehicle Tibber Autorisierung fehlgeschlagen invalid state

Open jwedenig opened this issue 5 months ago β€’ 14 comments

Describe the bug

when adding a tibber vehicle, i tried to reach the URL http://192.168.1.31:7070/providerauth/callback in the browser. But i get error: Autorisierung fehlgeschlagen invalid state

Steps to reproduce

1.Tibber Fahrzeug hinzufΓΌgen 2.Creating client on tibber 3.failed to creat client 4. on browser testing the url http://192.168.1.31:7070/providerauth/callback 5. Autorisierung fehlgeschlagen invalid state ...

Configuration details

admin@evcc:~$ evcc config
[main  ] INFO 2026/06/09 08:53:27 config file not found, database-only mode
[main  ] FATAL 2026/06/09 08:53:27 
Found systemd service database at "/var/lib/evcc/evcc.db", evcc has been invoked with no explicit database path.
Running the same config with multiple databases can lead to expiring vehicle tokens.

If you want to use the existing service database run the following command:

sudo evcc --database /var/lib/evcc/evcc.db

If you want to create a new user-space database run the following command:

evcc --database ~/.evcc/evcc.db

If you know what you're doing, you can skip the database check with the --ignore-db flag.

Log details

[main  ] INFO 2026/06/09 08:41:59 evcc 0.308.1
[main  ] INFO 2026/06/09 08:41:59 config file not found, database-only mode
[main  ] INFO 2026/06/09 08:41:59 using sqlite database: /var/lib/evcc/evcc.db?_pragma=foreign_keys(1)&_pragma=auto_vacuum(INCREMENTAL)
[eebus ] INFO 2026/06/09 08:42:00 Local SKI: 787d9cc72a8c8f26da2e8d8a317acd807fd1087d
[main  ] INFO 2026/06/09 08:42:00 OCPP local url:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/06/09 08:42:00 UI local url:      http://127.0.0.1:7070
[lp-1  ] DEBUG 2026/06/09 08:42:00 set title: Carport
[lp-1  ] DEBUG 2026/06/09 08:42:00 set priority: 0
[lp-1  ] DEBUG 2026/06/09 08:42:00 set smart cost limit: <nil>
[lp-1  ] DEBUG 2026/06/09 08:42:00 set smart feed-in limit: <nil>
[lp-1  ] DEBUG 2026/06/09 08:42:00 set thresholds: {Enable:{Delay:1m0s Threshold:0} Disable:{Delay:3m0s Threshold:0}}
[lp-1  ] DEBUG 2026/06/09 08:42:00 set plan energy: 0kWh @ 0001-01-01 00:53:28 +0053 LMT
[lp-1  ] DEBUG 2026/06/09 08:42:00 set plan strategy: continuous=false, precondition=0s
[lp-1  ] DEBUG 2026/06/09 08:42:00 set battery boost limit: 100
[lp-1  ] DEBUG 2026/06/09 08:42:00 set session energy limit: 0
[lp-1  ] DEBUG 2026/06/09 08:42:00 set session soc limit: 0
[lp-1  ] DEBUG 2026/06/09 08:42:00 set soc config: {Poll:{Mode:charging Interval:1h0m0s} Estimate:0x5e706212b0dc}
[lp-1  ] DEBUG 2026/06/09 08:42:00 set default mode: 
[lp-1  ] DEBUG 2026/06/09 08:42:00 set phases: 0
[tariff] ERROR 2026/06/09 08:42:01 unexpected status: 422 (Unprocessable Entity) GET https://api.forecast.solar/estimate/48.0155/16.3024/25/-90/10.6?time=utc&full=1&resolution=60
[main  ] ERROR 2026/06/09 08:42:01 creating tariff db:3 failed: cannot create tariff type 'template:forecast-solar': cannot create tariff type 'custom': unexpected status: 422 (Unprocessable Entity) GET https://api.forecast.solar/estimate/48.0155/16.3024/25/-90/10.6?time=utc&full=1&resolution=60
[lp-1  ] DEBUG 2026/06/09 08:42:01 charge total import: 13571.214kWh
[site  ] INFO 2026/06/09 08:42:02 site config:
[site  ] INFO 2026/06/09 08:42:02   meters:      grid βœ“ pv βœ“ battery βœ“
[site  ] INFO 2026/06/09 08:42:02     grid:      power βœ“ energy βœ“ currents βœ“
[site  ] INFO 2026/06/09 08:42:02     pv 1:      power βœ“ energy βœ“ currents βœ—
[site  ] INFO 2026/06/09 08:42:02     battery 1: power βœ“ energy βœ“ currents βœ— soc βœ“ capacity βœ—
[site  ] INFO 2026/06/09 08:42:02   tariffs:
[site  ] INFO 2026/06/09 08:42:02     grid:      pricestatic
[site  ] INFO 2026/06/09 08:42:02     feed-in:   pricestatic
[site  ] INFO 2026/06/09 08:42:02     co2:       βœ—
[site  ] INFO 2026/06/09 08:42:02     solar:     βœ“
[lp-1  ] INFO 2026/06/09 08:42:02 loadpoint 1:
[lp-1  ] INFO 2026/06/09 08:42:02   mode:        off
[lp-1  ] INFO 2026/06/09 08:42:02   charger:     power βœ“ energy βœ“ currents βœ“ phases βœ“ wakeup βœ—
[lp-1  ] INFO 2026/06/09 08:42:02   meters:      charge βœ“
[lp-1  ] INFO 2026/06/09 08:42:02     charge:    power βœ“ energy βœ“ currents βœ“
[site  ] DEBUG 2026/06/09 08:42:02 set buffer soc: 80
[site  ] DEBUG 2026/06/09 08:42:02 set buffer start soc: 80
[site  ] DEBUG 2026/06/09 08:42:02 set priority soc: 40
[site  ] DEBUG 2026/06/09 08:42:02 set battery discharge control: true
[lp-1  ] DEBUG 2026/06/09 08:42:02 phase timer inactive
[lp-1  ] DEBUG 2026/06/09 08:42:02 pv timer inactive
[site  ] DEBUG 2026/06/09 08:42:02 ----
[lp-1  ] DEBUG 2026/06/09 08:42:02 charge power: 0W
[lp-1  ] DEBUG 2026/06/09 08:42:02 charge currents: [0 0 0]A
[site  ] DEBUG 2026/06/09 08:42:03 grid power: -1171W
[site  ] DEBUG 2026/06/09 08:42:03 battery 1 power: -1466W
[site  ] DEBUG 2026/06/09 08:42:03 pv 1 power: 4425W
[site  ] DEBUG 2026/06/09 08:42:03 grid currents: [-2.03 -1.67 -1.67]A
[site  ] DEBUG 2026/06/09 08:42:03 battery 1 soc: 37%
[site  ] DEBUG 2026/06/09 08:42:03 battery has priority at soc 37% (< 40%)
[site  ] DEBUG 2026/06/09 08:42:03 site power: -1071W
[lp-1  ] DEBUG 2026/06/09 08:42:03 charge voltages: [237 236 238]V
[lp-1  ] DEBUG 2026/06/09 08:42:03 charge total import: 13571.214kWh
[lp-1  ] DEBUG 2026/06/09 08:42:03 charger status: B
[lp-1  ] DEBUG 2026/06/09 08:42:03 charge start energy: 13571.214kWh
[lp-1  ] INFO 2026/06/09 08:42:03 car connected
[lp-1  ] DEBUG 2026/06/09 08:42:03 pv timer elapse
[lp-1  ] DEBUG 2026/06/09 08:42:03 pv timer inactive
[lp-1  ] DEBUG 2026/06/09 08:42:03 charge total import: 13571.214kWh
[lp-1  ] DEBUG 2026/06/09 08:42:03 !! plan: plan time zero
[site  ] DEBUG 2026/06/09 08:42:33 ----
[lp-1  ] DEBUG 2026/06/09 08:42:33 charge power: 0W
[lp-1  ] DEBUG 2026/06/09 08:42:33 charge currents: [0 0 0]A
[site  ] DEBUG 2026/06/09 08:42:33 grid power: 270W
[site  ] DEBUG 2026/06/09 08:42:33 battery 1 power: -3798W
[site  ] DEBUG 2026/06/09 08:42:33 pv 1 power: 4522W
[site  ] DEBUG 2026/06/09 08:42:33 grid currents: [-3.04 -2.68 6.88]A
[site  ] DEBUG 2026/06/09 08:42:33 battery 1 soc: 37%
[site  ] DEBUG 2026/06/09 08:42:33 battery has priority at soc 37% (< 40%)
[site  ] DEBUG 2026/06/09 08:42:33 site power: 370W
[lp-1  ] DEBUG 2026/06/09 08:42:33 charge voltages: [238 236 237]V
[lp-1  ] DEBUG 2026/06/09 08:42:33 charge total import: 13571.214kWh
[lp-1  ] DEBUG 2026/06/09 08:42:33 charger status: B
[lp-1  ] DEBUG 2026/06/09 08:42:33 !! plan: plan time zero
[site  ] DEBUG 2026/06/09 08:43:03 ----
[lp-1  ] DEBUG 2026/06/09 08:43:03 charge power: 0W
[lp-1  ] DEBUG 2026/06/09 08:43:03 charge currents: [0 0 0]A
[site  ] DEBUG 2026/06/09 08:43:03 grid power: -14W
[site  ] DEBUG 2026/06/09 08:43:03 battery 1 power: -3575W
[site  ] DEBUG 2026/06/09 08:43:03 pv 1 power: 4449W
[site  ] DEBUG 2026/06/09 08:43:03 grid currents: [-0.74 0.91 -0.52]A
[site  ] DEBUG 2026/06/09 08:43:03 battery 1 soc: 37%
[site  ] DEBUG 2026/06/09 08:43:03 battery has priority at soc 37% (< 40%)
[site  ] DEBUG 2026/06/09 08:43:03 site power: 86W
[lp-1  ] DEBUG 2026/06/09 08:43:03 charge voltages: [237 235 237]V
[lp-1  ] DEBUG 2026/06/09 08:43:03 charge total import: 13571.214kWh
[lp-1  ] DEBUG 2026/06/09 08:43:03 charger status: B
[lp-1  ] DEBUG 2026/06/09 08:43:03 !! plan: plan time zero
[site  ] DEBUG 2026/06/09 08:43:33 ----
[lp-1  ] DEBUG 2026/06/09 08:43:33 charge power: 0W
[lp-1  ] DEBUG 2026/06/09 08:43:33 charge currents: [0 0 0]A
[site  ] DEBUG 2026/06/09 08:43:33 grid power: -629W
[site  ] DEBUG 2026/06/09 08:43:33 pv 1 power: 4291W
[site  ] DEBUG 2026/06/09 08:43:33 battery 1 power: -1396W
[site  ] DEBUG 2026/06/09 08:43:33 grid currents: [-1.3 -1.06 -1.18]A
[site  ] DEBUG 2026/06/09 08:43:33 battery 1 soc: 37%
[site  ] DEBUG 2026/06/09 08:43:33 battery has priority at soc 37% (< 40%)
[site  ] DEBUG 2026/06/09 08:43:33 site power: -529W
[lp-1  ] DEBUG 2026/06/09 08:43:33 charge voltages: [238 235 237]V
[lp-1  ] DEBUG 2026/06/09 08:43:33 charge total import: 13571.214kWh
[lp-1  ] DEBUG 2026/06/09 08:43:33 charger status: B
[lp-1  ] DEBUG 2026/06/09 08:43:33 !! plan: plan time zero
[site  ] DEBUG 2026/06/09 08:44:03 ----
[lp-1  ] DEBUG 2026/06/09 08:44:03 charge power: 0W
[lp-1  ] DEBUG 2026/06/09 08:44:03 charge currents: [0 0 0]A
[site  ] DEBUG 2026/06/09 08:44:03 grid power: -4W
[site  ] DEBUG 2026/06/09 08:44:03 battery 1 power: -3694W
[site  ] DEBUG 2026/06/09 08:44:03 pv 1 power: 4375W
[site  ] DEBUG 2026/06/09 08:44:03 grid currents: [-0.74 0.96 -0.63]A
[site  ] DEBUG 2026/06/09 08:44:03 battery 1 soc: 38%
[site  ] DEBUG 2026/06/09 08:44:03 battery has priority at soc 38% (< 40%)
[site  ] DEBUG 2026/06/09 08:44:03 site power: 96W
[lp-1  ] DEBUG 2026/06/09 08:44:03 charge voltages: [237 235 237]V
[lp-1  ] DEBUG 2026/06/09 08:44:03 charge total import: 13571.214kWh
[lp-1  ] DEBUG 2026/06/09 08:44:03 charger status: B
[lp-1  ] DEBUG 2026/06/09 08:44:03 !! plan: plan time zero

What type of operating system or environment does evcc run on?

Linux

External automation

  • [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • [x] I have verified that the issue is reproducible with the latest nightly build

Version

evcc version 0.308.1

jwedenig avatar Jun 09 '26 06:06 jwedenig

Needs a trace log

andig avatar Jun 09 '26 07:06 andig

log contains zero providerauth/login/callback/Tibber-OAuth events

andig avatar Jun 09 '26 08:06 andig

What do I have to do that you can see the Problem?

jwedenig avatar Jun 09 '26 08:06 jwedenig

Start evcc and try to authorize, full trace log. Must show providerauth.

andig avatar Jun 09 '26 08:06 andig

now i can see "providerauth" in the log

evcc-20260609-110544-trace.log

jwedenig avatar Jun 09 '26 09:06 jwedenig

Its (still) unclear to me what you're doing

3.failed to creat client

This is on Tibber side, nothing to do with evcc.

on browser testing the url

is absolutely irrelevant

andig avatar Jun 09 '26 11:06 andig

Do you try to register a App with http and a IP on tibber side? The O Auth flow requires a https domain. You could look into https://docs.evcc.io/en/features/remote-access/

StefanSchoof avatar Jun 09 '26 11:06 StefanSchoof

Do you try to register a App with http and a IP on tibber side? The O Auth flow requires a https domain.

no, no it doesn't. works for me with http://10.7.30.174:7070/providerauth/callback on tibber side

RenatusRo avatar Jun 09 '26 11:06 RenatusRo

Oh, interesting the standard does only say should and not must. I never saw a client registration that allows http uris.

When using this flow, the Redirection URI SHOULD use the https scheme;

https://openid.net/specs/openid-connect-core-1_0-18.html?utm_source=chatgpt.com#AuthRequest

StefanSchoof avatar Jun 09 '26 11:06 StefanSchoof

i tried "http://192.168.1.31:7070/providerauth/callback" but i cannot creat a client

Image

jwedenig avatar Jun 09 '26 12:06 jwedenig

i tried "http://192.168.1.31:7070/providerauth/callback" but i cannot creat a client

Wenn Tibber Fahrzeug hinzufΓΌgen, dann auch data-api-vehicles-read ankreuzen. Und tibber muss das Fahrzeug auch kennen - vorher.

RenatusRo avatar Jun 09 '26 12:06 RenatusRo

alles angehackt - geht trotzdem leider nicht!

jwedenig avatar Jun 09 '26 13:06 jwedenig

ob das die beste idee ist, weiss ich nicht: fahrzeug muss, home kann vielleicht noch. der rest haengt ja davon ab, was du konkret an geraeten bei tibber hast. fahrzeug registriert und zeigt was an?

RenatusRo avatar Jun 09 '26 13:06 RenatusRo