Skip to content

Peugeot: cannot create vehicle type 'template': missing required accessToken #29864

@naymore

Description

@naymore

Describe the bug

I cannot create the required tokens for Peugeot anymore.
evcc token does not work anymore.

Steps to reproduce

evcc token car1

Configuration details

log: trace

site:
  title: Nur zur token Generierung

vehicles:
 - name: car1
   type: template
   template: peugeot
   title: my2008
   capacity: 50.8 # Akkukapazität (kWh), optional
   user: my@mail.com
   accessToken: # Access token
   refreshToken: # Refresh token


NOTE: This is a minimal evcc.yaml only to create the peugeot tokens - every other week :(

Log details

Older version of EVCC (0.210.2; worked just for token generation until recently).


C:\temp\evcc\local-for-peugeot>evcc token car1
[main  ] INFO 2026/05/13 21:49:22 using config file: C:\temp\evcc\local-for-peugeot\evcc.yaml
[main  ] INFO 2026/05/13 21:49:22 using sqlite database: C:\Users\donderladdich\.evcc\evcc.db
[db    ] TRACE 2026/05/13 21:49:22 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="sessions" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "sessions" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `sessions` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `sessions` 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="meters" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "meters" AND sql IS NOT NULL order by type = "table" desc 2 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `meters` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 PRAGMA foreign_keys 1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND name = "meters" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 CREATE TABLE `meters__temp`  (`meter` integer,`ts` datetime,"import" real,`export` real,CONSTRAINT `fk_meters_entity` FOREIGN KEY (`meter`) REFERENCES `entities`(`id`)) 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 INSERT INTO `meters__temp`(`meter`,`ts`,`import`,`export`) SELECT `meter`,`ts`,`import`,`export` FROM `meters` 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 DROP TABLE `meters` 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 ALTER TABLE `meters__temp` RENAME TO `meters` 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 ALTER TABLE `meters` ADD `val` real 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "meters" AND name = "meter_ts" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 CREATE UNIQUE INDEX `meter_ts` ON `meters`(`meter`,`ts`) 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="settings" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "settings" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `settings` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `settings` 0 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="caches" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "caches" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `caches` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="configs" -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "configs" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `configs` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:49:22 SELECT * FROM `configs` WHERE `configs`.`class` = 3 0 <nil>
[main  ] ERROR 2026/05/13 21:49:22 creating vehicle car1 failed: cannot create vehicle type 'template': cannot create vehicle type 'peugeot': missing token credentials
? Please enter your country code: de
Please visit:  https://idpcvs.peugeot.com/am/oauth2/authorize?client_id=1eebc2d5-5df3-459b-a624-20abfcf82530&code_challenge=va6dpR6a50OysXiSEHZlAnSgSOP1pp0LD-DQl3JXTV4&code_challenge_method=S256&redirect_uri=mymap%3A%2F%2Foauth2redirect%2Fde&response_type=code&scope=openid+profile
And grab the authorization code like described here: https://github.com/flobz/psa_car_controller/discussions/779
? Please enter your authorization code:
[...]


Latest version of evcc (0.306.3):

C:\temp\evcc\local-for-peugeot>evcc token car1
[main  ] INFO 2026/05/13 21:50:50 using config file: C:\temp\evcc\local-for-peugeot\evcc.yaml
[main  ] INFO 2026/05/13 21:50:50 using sqlite database: C:\Users\donderladdich\.evcc\evcc.db?_pragma=busy_timeout(5000)&_pragma=synchronous(NORMAL)&_time_format=sqlite
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="sessions" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "sessions" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `sessions` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `sessions` 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="caches" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "caches" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `caches` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="settings" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "settings" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `settings` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `settings` 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="configs" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "configs" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `configs` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="grid_sessions" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "grid_sessions" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `grid_sessions` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="entities" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "entities" AND sql IS NOT NULL order by type = "table" desc 2 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `entities` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "entities" AND name = "entities_group_name" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `entities` WHERE `entities`.`group` = "home" AND `entities`.`name` = "home" ORDER BY `entities`.`id` LIMIT 1 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 pragma foreign_keys(1) 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "entities" AND name = "name_idx" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "entities" AND name = "group_name" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "meters" AND name = "meter_ts" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 DROP INDEX `meter_ts` 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND (sql LIKE "%""val"" %" OR sql LIKE "%val %" OR sql LIKE "%`val`%" OR sql LIKE "%[val]%" OR sql LIKE "%   val     %") -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND (sql LIKE "%""import"" %" OR sql LIKE "%import %" OR sql LIKE "%`import`%" OR sql LIKE "%[import]%" OR sql LIKE "%       import  %") -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND (sql LIKE "%""pos"" %" OR sql LIKE "%pos %" OR sql LIKE "%`pos`%" OR sql LIKE "%[pos]%" OR sql LIKE "%   pos     %") -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND (sql LIKE "%""neg"" %" OR sql LIKE "%neg %" OR sql LIKE "%`neg`%" OR sql LIKE "%[neg]%" OR sql LIKE "%   neg     %") -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="meters" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "meters" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `meters` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="entities" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "entities" AND sql IS NOT NULL order by type = "table" desc 2 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `entities` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "entities" AND name = "entities_group_name" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="meters" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "meters" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `meters` LIMIT 1 -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 PRAGMA foreign_keys 1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 PRAGMA foreign_keys = OFF 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND name = "meters" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 CREATE TABLE `meters__temp`  (`meter` integer,`ts` integer,"import" real,`export` real,`val` real,CONSTRAINT `fk_meters_entity` FOREIGN KEY (`meter`) REFERENCES `entities`(`id`)) 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 INSERT INTO `meters__temp`(`meter`,`ts`,`import`,`export`,`val`) SELECT `meter`,`ts`,`import`,`export`,`val` FROM `meters` 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 DROP TABLE `meters` 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 ALTER TABLE `meters__temp` RENAME TO `meters` 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 PRAGMA foreign_keys = ON 0 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "meters" AND (sql LIKE "%CONSTRAINT ""fk_meters_entity"" %" OR sql LIKE "%CONSTRAINT fk_meters_entity %" OR sql LIKE "%CONSTRAINT `fk_meters_entity`%" OR sql LIKE "%CONSTRAINT [fk_meters_entity]%" OR sql LIKE "%CONSTRAINT         fk_meters_entity%") -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 SELECT count(*) FROM sqlite_master WHERE type = "index" AND tbl_name = "meters" AND name = "meters_meter_ts" -1 <nil>
[db    ] TRACE 2026/05/13 21:50:50 CREATE UNIQUE INDEX `meters_meter_ts` ON `meters`(`meter`,`ts`) 0 <nil>
[eebus ] INFO 2026/05/13 21:50:50 Local SKI: 697be7cae179afb258e5c6b59c4a156db379a548
[db    ] TRACE 2026/05/13 21:50:50 SELECT * FROM `configs` WHERE `configs`.`class` = 3 0 <nil>
[main  ] FATAL 2026/05/13 21:50:50 cannot create vehicle 'car1': cannot create vehicle type 'template': missing required `accessToken`

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

Windows

External automation

  • 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

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

Version

windows nightly? where?

Metadata

Metadata

Assignees

No one assigned

    Labels

    vehiclesSpecific vehicle support

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions