Add configurable QR code page
This commit is contained in:
parent
c4afd3c253
commit
e3f3101719
7 changed files with 610 additions and 20 deletions
43
README.md
43
README.md
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue