Version bump:
- Update VERSION to 2.0.0 (from 2.0.0-dev)
- Update pyproject.toml to 2.0.0
- Change development status to Production/Stable
Documentation updates:
- Add Debian package installation instructions (system-wide)
- Add sensor discovery and approval workflow documentation
- Update configuration section with approval workflow
- Update service management for system installation
- Update troubleshooting for system installation
- Update MQTT settings documentation
- Add links to download Debian packages from releases
The application is now production-ready with:
- Systemd integration for automatic service management
- Automatic startup and restart on failure
- Configuration via /etc/sensorpajen/
- Runtime state in /var/lib/sensorpajen/
- Interactive sensor approval workflow
- Automatic configuration reload
- Comprehensive logging via journalctl
The code imports 'bluetooth._bluetooth' which requires the PyBluez package
(not bluepy). PyBluez provides Classic Bluetooth support needed by utils.py
and sensor_reader.py.
- Add pybluez>=0.31 to both requirements.txt and pyproject.toml
- Keep bluepy and paho-mqtt as they are also needed
- bluez system package also needed (already in debian/control)
Fixes: ModuleNotFoundError: No module named 'bluetooth'
Directory structure:
- Created src/sensorpajen/ for new Python package
- Created config/ for configuration templates
- Created legacy/ for old scripts
- Created systemd/ and debian/ for future phases
Package setup:
- Added pyproject.toml with modern Python packaging
- Created package __init__.py
- Defined dependencies: bluepy, paho-mqtt
Configuration:
- Created config/sensors.json.example (converted from INI)
- Created config/sensorpajen.env.example for environment variables
- All 8 Xiaomi sensors migrated to JSON format
Cleanup:
- Removed temperatur_koksfonstret.py (DHT11 functionality)
- Moved all legacy scripts to legacy/ folder:
- LYWSD03MMC.py
- bluetooth_utils.py
- sendToMQTT.sh
- sensorer.sh
- startup.sh
- sensorer.ini
Updated ROADMAP.md to mark Phase 1 as complete.
Next: Phase 2 - Python Package Structure