- Pydantic v1.10.14 is the installed version which doesn't have model_dump()
- Changed device.model_dump(mode='json') to device.dict()
- All 36 tests now passing successfully
Implements DeviceRegistry class for managing paired Eye Remote devices:
- CRUD operations (add, get, remove, list)
- Thread-safe access via Lock
- JSON file persistence at /var/lib/secubox/eye-remote/devices.json
- Token validation and last_seen timestamp updates
- Singleton pattern for global access
Includes test suite with 8 passing tests covering all operations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Generate secure device tokens using secrets.token_hex
- Hash tokens with SHA256 (never store plain tokens)
- Verify tokens with constant-time comparison
- Generate 6-char pairing codes
- Create QR code URLs for pairing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create the SecuBox-side secubox-eye-remote module structure:
- api/main.py: FastAPI application with health check
- models/device.py: Pydantic models for device management
- Directory structure for routers, core, tests, debian, nginx, www
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>