Add camera selector dropdown to doorbell page
Replaces the hardcoded CAMERA_NAME with a CAMERAS list. The page renders a dropdown when more than one camera is configured and remembers the choice in localStorage; switching tears down and reopens the WebRTC connection. https://claude.ai/code/session_013XZ1vmgk78k2PEQ5DmJhF3
This commit is contained in:
+10
-4
@@ -52,13 +52,19 @@ sudo journalctl -u doorbell -f # live logs
|
||||
Add to home screen (Chrome menu -> Add to home screen) for an app-like
|
||||
experience.
|
||||
|
||||
## Changing the camera
|
||||
## Choosing the camera
|
||||
|
||||
`server.py` near the top:
|
||||
```js
|
||||
const CAMERA_NAME = "front_door";
|
||||
`server.py` near the top has the list of cameras the page offers:
|
||||
```python
|
||||
CAMERAS = ["front_door"]
|
||||
```
|
||||
|
||||
Each name must match a `go2rtc.streams` entry in
|
||||
`frigate_config/config.yml` and the camera must be `enabled: true` in
|
||||
Frigate. With more than one entry the page shows a dropdown above the
|
||||
talk button; the choice is remembered per-browser in `localStorage`. The
|
||||
first entry is the default for new visitors.
|
||||
|
||||
After editing:
|
||||
```bash
|
||||
sudo systemctl restart doorbell
|
||||
|
||||
Reference in New Issue
Block a user