odoo_mqtt/iot_bridge/tests/unit
matthias.lotz 910f2d1112 feat: online/offline detection via availability topic (direct_session)
Lasercutter (direct_session) sendet Plain-Text 'online'/'offline' auf
<device-id>/availability – bislang wurden diese Nachrichten still verworfen.

Änderungen:
- mqtt_client.py: non-JSON Payloads als {'_raw': text} durchleiten
  (statt bei JSONDecodeError komplett zu verwerfen)
- device_manager._add_device: direct_session-Geräte abonnieren zusätzlich
  <device_id>/availability; Eintrag landet in device_map
- device_manager._remove_device: entfernt ALLE Topics eines Geräts
  (vorher nur das erste gefundene – Bug bei mehreren Topics)
- device_manager.route_message: {'_raw': 'online'/'offline'} erzeugt
  device_online / device_offline Event in der Queue (case-insensitive)
- 15 neue Unit-Tests in test_availability_pipeline.py (102/102 grün)
2026-03-11 15:39:36 +01:00
..
__init__.py initial version 2026-02-10 20:00:27 +01:00
test_availability_pipeline.py feat: online/offline detection via availability topic (direct_session) 2026-03-11 15:39:36 +01:00
test_bootstrap.py Complete phase 2 rest points: env overrides and unit tests 2026-02-18 23:30:33 +01:00
test_config_schema.py Complete phase 2 rest points: env overrides and unit tests 2026-02-18 23:30:33 +01:00
test_config.py feat: parser_config als Wire-Format durchgehend (Phase 3 komplett) 2026-03-11 13:05:54 +01:00
test_dependencies.py Phase 3: Complete type safety & logging unification (3.1-3.2) 2026-02-18 23:54:27 +01:00
test_device_manager.py feat: parser_config als Wire-Format durchgehend (Phase 3 komplett) 2026-03-11 13:05:54 +01:00
test_direct_session_parser.py feat: add DirectSessionParser for devices delivering complete sessions 2026-03-11 14:29:22 +01:00
test_event_queue.py Phase 3: Complete type safety & logging unification (3.1-3.2) 2026-02-18 23:54:27 +01:00
test_exceptions.py Complete phase 2 rest points: env overrides and unit tests 2026-02-18 23:30:33 +01:00
test_odoo_client_error_handling.py Phase 3.3: Harden error handling and recovery patterns 2026-02-19 19:07:13 +01:00
test_parser_registry.py feat: parser_config als Wire-Format durchgehend (Phase 3 komplett) 2026-03-11 13:05:54 +01:00
test_service_manager.py feat: parser_config als Wire-Format durchgehend (Phase 3 komplett) 2026-03-11 13:05:54 +01:00
test_session_detector.py Phase 3: Complete type safety & logging unification (3.1-3.2) 2026-02-18 23:54:27 +01:00