Implement sensor auto-discovery feature
New Features: - Automatic discovery of unknown Bluetooth sensors - Discovery manager tracks pending/approved/ignored sensors - ntfy notifications when new sensors found (optional) - Interactive CLI tool: sensorpajen-approve-sensors - Automatic config reload every 15 minutes (no restart needed) Files Added: - src/sensorpajen/discovery_manager.py: Sensor discovery management - src/sensorpajen/approve_sensors.py: Interactive approval CLI - config/discovered_sensors.json.example: Example discovery file Files Modified: - src/sensorpajen/config.py: Added ntfy and discovery config - src/sensorpajen/main.py: Added discovery manager and config reload - src/sensorpajen/sensor_reader.py: Added discovery on unknown sensors - config/sensorpajen.env.example: Added ntfy and reload settings - pyproject.toml: Added approve-sensors CLI command Configuration: - NTFY_ENABLED, NTFY_URL, NTFY_TOPIC, NTFY_TOKEN - DISCOVERED_SENSORS_FILE, CONFIG_RELOAD_INTERVAL - Pre-filled comments with sensor metadata See TASKS.md for complete feature specification.
This commit is contained in:
2
TASKS.md
2
TASKS.md
@@ -86,7 +86,7 @@ Implement **automatic sensor discovery** with a **user approval workflow** that:
|
||||
* If `NTFY_ENABLED=false`, skip notifications
|
||||
* If ntfy is unreachable, log error and continue
|
||||
* Discovery and approval must work even if ntfy fails
|
||||
|
||||
* The user must only be notified once per discovered sensor
|
||||
---
|
||||
|
||||
### 4. User Approval Script
|
||||
|
||||
Reference in New Issue
Block a user