fix(P1b): DetectionTimer pgrep-Pattern erweitert + gateway_state als Primärsignal

This commit is contained in:
Bernd (Hermes)
2026-07-24 09:06:40 +02:00
parent f61b0ba508
commit f028a30d6c
3 changed files with 94 additions and 59 deletions
+9
View File
@@ -1092,6 +1092,9 @@ class RocketChatAdapter(BasePlatformAdapter):
Sets initial online status and binds DDP to PulseController
if PresenceEngine is active (EC-1: on_connected_cb race).
P1b: Starts DetectionTimer after DDP connection is established
to prevent race condition with gateway_state.json.
"""
if self.ddp:
self.ddp.set_status("online")
@@ -1102,6 +1105,12 @@ class RocketChatAdapter(BasePlatformAdapter):
logger.debug("[rocketchat] V8.6: PulseController DDP gebunden (on_connected_cb)")
except Exception as e:
logger.debug("[rocketchat] V8.6: PulseController bind_ddp failed: %s", e)
# P1b: DetectionTimer erst nach DDP-Connect starten
try:
self._presence_engine.start_detection()
logger.debug("[rocketchat] P1b: DetectionTimer gestartet (on_connected_cb)")
except Exception as e:
logger.debug("[rocketchat] P1b: DetectionTimer start failed: %s", e)
def _on_ddp_room_event(self, event: dict) -> None:
"""A1b: Callback für DDP rooms-changed Events.