feat: add Home Assistant integration and improve CLI/UI

Home Assistant Integration:
- New homeassistant.py module with webhook support
- Webhooks for scan results, new devices, and device departures
- Absence detection with configurable timeout
- Documentation in docs/HOME_ASSISTANT.md

CLI Improvements:
- Replace 'web' command with start/stop/restart/status
- Background daemon mode with PID file management
- Foreground mode for debugging (--foreground)

Web UI Enhancements:
- Improved device list styling and layout
- Better floor assignment UI
- Enhanced map visualization

Documentation:
- Add CHANGELOG.md
- Add docs/API.md with full endpoint reference
- Add docs/CHEATSHEET.md for quick reference
- Update project documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
User
2026-02-01 03:31:02 +01:00
parent 0ffd220022
commit 7cc7c47805
16 changed files with 2704 additions and 108 deletions

View File

@@ -35,12 +35,14 @@
| [x] | Floor-based positioning | Devices assigned to floors |
| [x] | Floor selector UI | Dropdown to filter by floor |
| [x] | Custom distance override | Set manual distance via popup |
| [x] | Manual position override | Drag-and-drop for floor-assigned devices |
| [x] | Live BT tracking mode | 4-second scan interval |
| [x] | Moving device detection | Purple markers for RSSI changes |
| [x] | Filter-aware scanning | Skip WiFi/BT based on toggle |
| [x] | Improve BT discovery reliability | Using bleak library for BLE scanning |
| [ ] | Document API endpoints | docs/API.md |
| [ ] | Create CHEATSHEET.md | Quick reference guide |
| [x] | Document API endpoints | docs/API.md |
| [x] | Create CHEATSHEET.md | Quick reference guide |
| [x] | Home Assistant webhook integration | Scan results, new device, departure alerts |
---
@@ -49,7 +51,7 @@
| Status | Task | Notes |
|--------|------|-------|
| [x] | Position smoothing | Statistical averaging (5 samples + stddev) |
| [ ] | Device trails | Show movement history on map |
| [x] | Device trails | Show movement history on map (for moving devices) |
| [ ] | Signal strength graph | Per-device RSSI over time |
| [ ] | Scan history browser | View past scans in UI |
| [ ] | Export functionality | Download scan data as CSV |
@@ -62,7 +64,7 @@
|--------|------|-------|
| [x] | SQLite persistence | Historical device tracking enabled |
| [x] | Device labeling | Custom names via API |
| [ ] | Home Assistant integration | MQTT/webhook |
| [x] | Home Assistant integration | Webhook-based (scan, new device, departure) |
| [ ] | Docker container | Containerized deployment |
| [ ] | Unit tests | pytest coverage |
@@ -84,6 +86,12 @@
| Statistical movement detection | 2026-02-01 |
| Floor persistence in database | 2026-02-01 |
| Popup persistence during updates | 2026-02-01 |
| API documentation (docs/API.md) | 2026-02-01 |
| CHEATSHEET.md quick reference | 2026-02-01 |
| CHANGELOG.md version history | 2026-02-01 |
| Device trails for moving devices | 2026-02-01 |
| Manual position override (drag-drop) | 2026-02-01 |
| Home Assistant webhook integration | 2026-02-01 |
---
@@ -109,3 +117,4 @@
- Movement detection uses statistical analysis (5-sample avg + 2σ threshold)
- Floor assignments persist in database across page reloads
- Popups stay open during live tracking updates
- Manual position override: drag floor-assigned device markers to set custom position