Using 2 x mqtt brokers - Question

Hi everyone,
Been doing some research, but just wanted to check I had it correct.

I currently use the mosquitto broker in HA for Solar Assistant.
I know want to add Frigate which also requires mqtt.

If I set up mosquitto bridge, would this get around that?

Frigate can use same internal HA broker

If I got you right, answer is no.
There is only one mqtt broker and you just connect to it whatever you want / can connect to it.
Just supply mqtt username, password, port and host. often you don’t have to provide topics but it might depend, but usually you dont.

Thank for the reples.
So as i’m currently using the mosquitto broker in HA for my Solar Assistant - there’s no way round adding Frigate using mqtt?
Thought i’d double check regarding the bridge option.

Not sure how I can do that, as mosquitto only allows one instance.

If you want to add frigate to mqtt you can use this in config.yml

  enabled: True
  host: ha_ip_or_comp_ip_running_mqtt
  user: mqtt_username
  password: mqtt_password
  port: 1883
  topic_prefix: frigate
1 Like

When you setup frigate you just add ip:port and user/pass for existing broker

Look at frigate config example

Reading more on mqtt function may help your understanding. Frigate does not bundle mqtt and only uses broker you provide. It will create a topic specific to frigate to seperate its messages

1 Like

Thank you both, will give that a try.

A single MQTT broker can host multiple connections from multiple different apps very happily. There should typically be no need to ever have multiple brokers.

However… the applications that use an MQTT broker are coded to update data in specific named topics on the broker. Using two identical applications on the same broker is very likely not to work as the data from each application will get merged into the same topics, overwriting each other. The MQTT broker will not object but the end result won’t be what you want.

One other aspect… the clients that connect to an MQTT broker provide three identifying bits of information. A username, password and client/iD. Typically an MQTT broker will allow multiple clients to connect using the same username and password or anonymously although this can be restricted in the MQTT configuration. The clientID, which is typically not user visible or configurable must be unique. An MQTT broker will not permit multiple clients to connect using the same clientID and will force disconnect any that try.

1 Like