Phase 1 Complete: Preparation & Cleanup
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
This commit is contained in:
42
ROADMAP.md
42
ROADMAP.md
@@ -102,37 +102,23 @@ Using relative paths for portability across systems:
|
||||
|
||||
## Migration Phases
|
||||
|
||||
### Phase 1: Preparation & Cleanup ✓ TODO
|
||||
### Phase 1: Preparation & Cleanup ✅ DONE (2025-12-27)
|
||||
**Goal**: Reorganize repository without breaking existing functionality
|
||||
|
||||
**Notes**:
|
||||
- Created modern Python package structure with src/ layout
|
||||
- Converted INI sensor config to JSON format (sensors.json.example)
|
||||
- Environment-based configuration instead of hardcoded values
|
||||
- DHT11 sensor functionality removed as planned
|
||||
- Legacy scripts preserved in legacy/ folder
|
||||
|
||||
#### Tasks:
|
||||
1. Create new directory structure
|
||||
```bash
|
||||
mkdir -p src/sensorpajen
|
||||
mkdir -p config
|
||||
mkdir -p legacy
|
||||
mkdir -p systemd
|
||||
mkdir -p debian
|
||||
```
|
||||
|
||||
2. Create pyproject.toml with dependencies:
|
||||
- bluepy
|
||||
- paho-mqtt
|
||||
|
||||
3. Remove DHT11 functionality:
|
||||
- Delete temperatur_koksfonstret.py
|
||||
- Remove DHT11 cron job from documentation
|
||||
- Update README.md
|
||||
|
||||
4. Move legacy scripts to legacy/ folder:
|
||||
- LYWSD03MMC.py
|
||||
- sendToMQTT.sh
|
||||
- startup.sh
|
||||
- sensorer.sh
|
||||
- sensorer.ini
|
||||
- bluetooth_utils.py
|
||||
|
||||
5. Verify existing system still works with legacy scripts
|
||||
- ✅ Create new directory structure
|
||||
- ✅ Create pyproject.toml with dependencies
|
||||
- ✅ Remove DHT11 functionality
|
||||
- ✅ Move legacy scripts to legacy/ folder
|
||||
- ✅ Create config file templates (sensors.json.example, sensorpajen.env.example)
|
||||
- ✅ Preserve requirements.txt for backward compatibility
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user