diff --git a/controller/cuda_grid_controller/frigate_bridge.py b/controller/cuda_grid_controller/frigate_bridge.py index 0153dc4..451a5db 100644 --- a/controller/cuda_grid_controller/frigate_bridge.py +++ b/controller/cuda_grid_controller/frigate_bridge.py @@ -83,7 +83,9 @@ class FrigateBridge: if not self.cfg.enabled: return [] base = self.cfg.base_topic.rstrip("/") - return [f"{base}/+/motion", f"{base}/events"] + # Frigate publishes state на `frigate//motion/state` ("ON"/"OFF"), + # а `frigate//motion` — это SET-topic (control). Subscribe строго к /state. + return [f"{base}/+/motion/state", f"{base}/events"] def _cell_border_id(self, cell: int) -> str: return f"cell_{cell}_border" @@ -136,9 +138,9 @@ class FrigateBridge: base = self.cfg.base_topic.rstrip("/") - # frigate//motion - if topic.startswith(f"{base}/") and topic.endswith("/motion"): - cam = topic[len(base) + 1 : -len("/motion")] + # frigate//motion/state + if topic.startswith(f"{base}/") and topic.endswith("/motion/state"): + cam = topic[len(base) + 1 : -len("/motion/state")] await self._handle_motion(cam, payload.strip().upper()) return