open_workshop/open_workshop_mqtt
matthias.lotz 5fcaef0336 feat(M5): Implement MQTT reconnect, state recovery, and error handling
 M5 Complete - All 21 tests passing

**MQTT Auto-Reconnect:**
- Exponential backoff (1s → 60s) in mqtt_client.py
- Automatic reconnection on disconnect
- Reset delay on successful connect

**State Recovery:**
- load_sessions() and get_running_sessions() in event_storage.py
- restore_state() in session_detector.py
- _restore_running_sessions() in main.py before MQTT connect
- Running sessions continue with timeout detection after restart

**Error Handling:**
- All parsers wrapped in try-except (shelly_parser, session_detector)
- Errors logged with exc_info=True for debugging
- Bridge continues running on malformed messages

**Bug Fixes:**
- Fixed field name mismatch: duration_s → total_duration_s
- Fixed None handling in session end methods
- Fixed infinite recursion in _read_sessions()

Test Results: 21 passed in 175.46s (0:02:55)
2026-01-24 19:21:05 +01:00
..
python_prototype feat(M5): Implement MQTT reconnect, state recovery, and error handling 2026-01-24 19:21:05 +01:00
FEATURE_REQUEST_OPEN_WORKSHOP_MQTT_IoT.md feat(mqtt): Implement M0-M3 - MQTT IoT Bridge with Session Detection 2026-01-22 19:59:17 +01:00