NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
More bug fixes (#14593)
Nicolas Moweneca504cb07a9
diff --git a/frigate/comms/mqtt.py b/frigate/comms/mqtt.pyindex ca9d03da72..198ec2176c 100644--- a/frigate/comms/mqtt.py+++ b/frigate/comms/mqtt.py@@ -18,7 +18,6 @@ class MqttClient(Communicator): # type: ignore[misc]self.config = configself.mqtt_config = config.mqttself.connected = False- self.started = Falsedef subscribe(self, receiver: Callable) -> None:"""Wrapper for allowing dispatcher to subscribe."""@@ -28,8 +27,7 @@ class MqttClient(Communicator): # type: ignore[misc]def publish(self, topic: str, payload: Any, retain: bool = False) -> None:"""Wrapper for publishing when client is in valid state."""if not self.connected:- if self.started:- logger.error(f"Unable to publish to {topic}: client is not connected")+ logger.debug(f"Unable to publish to {topic}: client is not connected")returnself.client.publish(@@ -175,6 +173,7 @@ class MqttClient(Communicator): # type: ignore[misc]client_id=self.mqtt_config.client_id,)self.client.on_connect = self._on_connect+ self.client.on_disconnect = self._on_disconnectself.client.will_set(self.mqtt_config.topic_prefix + "/available",payload="offline",@@ -247,7 +246,6 @@ class MqttClient(Communicator): # type: ignore[misc]# with connect_async, retries are handled automaticallyself.client.connect_async(self.mqtt_config.host, self.mqtt_config.port, 60)self.client.loop_start()- self.started = Trueexcept Exception as e:logger.error(f"Unable to connect to MQTT server: {e}")returndiff --git a/frigate/stats/util.py b/frigate/stats/util.pyindex 2a0f251fc2..c2d6586adb 100644--- a/frigate/stats/util.py+++ b/frigate/stats/util.py@@ -197,8 +197,8 @@ async def set_gpu_stats(# intel QSV GPUintel_usage = get_intel_gpu_stats()- if intel_usage:- stats["intel-qsv"] = intel_usage+ if intel_usage is not None:+ stats["intel-qsv"] = intel_usage or {"gpu": "", "mem": ""}else:stats["intel-qsv"] = {"gpu": "", "mem": ""}hwaccel_errors.append(args)@@ -222,8 +222,8 @@ async def set_gpu_stats(# intel VAAPI GPUintel_usage = get_intel_gpu_stats()- if intel_usage:- stats["intel-vaapi"] = intel_usage+ if intel_usage is not None:+ stats["intel-vaapi"] = intel_usage or {"gpu": "", "mem": ""}else:stats["intel-vaapi"] = {"gpu": "", "mem": ""}hwaccel_errors.append(args)