Best practices for remote frigate instance integration into Home Assistant #14071
Unanswered
igiannakas
asked this question in
Ask A Question
Replies: 1 comment 3 replies
-
We could add support for a config that would set the qos that should be used, in general though you could likely just connect them directly I would think, if a disconnect happens it will just loop trying to reconnect |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently have a remote (off premise) frigate instance that publishes events to my on premise Home assistant instance.
I am running an MQTT Broker setup as a bridge (mosquito) on the remote server where frigate is running that subscribes and forwards the frigate message topics to my on premise Frigate instance. Site to site connectivity is handled by a Tailscale tunnel. This works exceedingly well when network is available.
However when I have network outage on the remote site, it appears that MQTT messages from frigate are lost and this leaves my local HA instance out of sync with the remote events.
I believe this happens because frigate publishes to the MQTT bridge its messages as QOS 0, which means message delivery is at most once, instead of QOS 2 which is exactly once. This means that while the bridge is available during the outage, as it cannot re-write the QOS of the messages, these are attempted to be sent and then dumped, if the destination MQTT server is unreachable.
I have tried to work around this QOS limitation by disabling clean sessions (which retains the session information between bridge and master) and requested my bridge to queue QOS0 messages for retransmission.
The MQTT bridge config is below:
However that has gotten me thinking:
What I am trying to avoid is "fantom" events where for example presence will still show in HA in an area if there was a person present before the outage but left during the network outage. This happens because HA doesnt get the "left" event hence its status is not updated and the only way out is to either wait for another detection or restart frigate.
Also on some instances I have noticed that frigate presence would not update in HA even though there is a person and the bridge is alive and communicating with the master location. The way out there is to reload the HA frigate integration and restart frigate.
Appreciate your thoughts!
Beta Was this translation helpful? Give feedback.
All reactions