fixed webui
This commit is contained in:
@@ -8,10 +8,38 @@ Dies ist der Client-Teil des Home-Bro Projekts, der auf einem Raspberry Pi läuf
|
|||||||
- Bildaufnahme (Snapshot) via Webcam
|
- Bildaufnahme (Snapshot) via Webcam
|
||||||
- Upload zum Brain (FastAPI)
|
- Upload zum Brain (FastAPI)
|
||||||
- Audio-Wiedergabe der sarkastischen Kommentare
|
- Audio-Wiedergabe der sarkastischen Kommentare
|
||||||
|
- Web-UI zur Konfiguration (Brain URL, Wake-Word, Picovoice Key)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Repository klonen.
|
1. **Repository klonen**:
|
||||||
2. `pip install -r requirements.txt`
|
|
||||||
3. `.env` Datei basierend auf `.env.example` erstellen.
|
```bash
|
||||||
4. Starten: `python app/main.py`
|
git clone git@git.hnrx.net:homelab/home-bro-client.git
|
||||||
|
cd home-bro-client
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Virtuelle Umgebung erstellen & aktivieren**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Abhängigkeiten installieren**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Konfiguration**:
|
||||||
|
`.env` Datei basierend auf `.env.example` erstellen oder später über das Web-UI konfigurieren.
|
||||||
|
|
||||||
|
5. **Starten**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python app/main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
6. **Web-UI aufrufen**:
|
||||||
|
Öffne `http://<pi-ip>:8080` in deinem Browser.
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ class Config(BaseModel):
|
|||||||
async def read_index():
|
async def read_index():
|
||||||
return FileResponse("static/index.html")
|
return FileResponse("static/index.html")
|
||||||
|
|
||||||
|
@app.get("/favicon.ico", include_in_schema=False)
|
||||||
|
async def favicon():
|
||||||
|
return FileResponse("static/index.html") # Or just return 204
|
||||||
|
|
||||||
@app.get("/config")
|
@app.get("/config")
|
||||||
async def get_config():
|
async def get_config():
|
||||||
return {
|
return {
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Home-Bro Client | Satellite Config</title>
|
<title>Home-Bro Client | Satellite Config</title>
|
||||||
<link rel="stylesheet" href="style.css" />
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
<link
|
<link
|
||||||
@@ -83,6 +83,6 @@
|
|||||||
|
|
||||||
<div id="toast" class="toast">Gespeichert!</div>
|
<div id="toast" class="toast">Gespeichert!</div>
|
||||||
</main>
|
</main>
|
||||||
<script src="script.js"></script>
|
<script src="/static/script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user