Skip to content

Setup via QR Code #72

@naltatis

Description

@naltatis

Add support for a setup process via scanning a prepared QR code via app. This can be useful if you ship instances with preconfigured remote access (e.g. cloudflare tunnel with basic auth reverse proxy). For now it's just a typing free way to enter server, user, password. In the future we could also use this mechanism for more advanced features like shared encryption key or sponsor token entry.

### Process

- in addition to "Suche starten" and "Adresse manuell eingeben" we offer a their button called "QR-Code scannen"
- It opens camera in QR code scan mode
~- if it detects a code with correct payload it takes the login data, validates and stores it ~
- the camera closes and user is inside the evcc web ui
- internally we can store this the same ways we store manual entry data

### QR-Code format

Looking at potential upcoming features it's the most flexible way to store the data json encoded. URL with embedded credentials would also be possible but less flexible (shared secret, sponsor token, ...).

Possible JSON Format

{
  "url": "http://evcc.local:7080",
  "username": "admin",
  "password": "secret"
}

see also evcc-io/evcc#22128

Process

The app registers a custom schema like this:

evcc://server?url=https%3A%2F%2Fevcc.local&username=admin&password=secret
Image

generated with https://goqr.me/#t=url

Code is scanned via phones builtin QR-code scanner/camera. The link opens the app and prompts user to save (or replace) the server configuration.

\cc @Maschga @Jok3r89

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions