Add configurable QR code page

This commit is contained in:
marijo 2026-06-23 13:19:06 +00:00
parent c4afd3c253
commit e3f3101719
7 changed files with 610 additions and 20 deletions

View file

@ -1,11 +1,52 @@
# qr
Static webpage intended to be hosted at:
QR-code webpage intended to be hosted at:
```text
192.168.0.226:/var/www/html/qr
```
Open QR codes with:
```text
http://192.168.0.226/qr?what=wifi
http://192.168.0.226/qr?what=haguest
```
If `what` is not defined in `what.json`, the page returns `404 Not Found`.
## QR data
Copy the example on the web server:
```bash
cp what.example.json what.json
```
Edit `what.json` on the server. It is ignored by git and excluded from deploys because it may contain secrets like Wi-Fi passwords.
Supported entries:
```json
{
"wifi": {
"type": "wifi",
"label": "Home Wi-Fi",
"ssid": "Your WiFi name",
"password": "Your WiFi password",
"security": "WPA",
"hidden": false
},
"haguest": {
"type": "url",
"label": "HA Guest",
"url": "http://192.168.0.226/haguest"
}
}
```
The key name, such as `wifi` or `haguest`, is shown in the centre of the QR code.
## Deploy
```bash