Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Connect to multiple MQTT brokers/base topics #845

Open
GerSant opened this issue Mar 19, 2024 · 5 comments
Open

[Feature] Connect to multiple MQTT brokers/base topics #845

GerSant opened this issue Mar 19, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@GerSant
Copy link

GerSant commented Mar 19, 2024

Problem description

I have 2 zigbee2mqtt instances running, each use a different base topic

Suggested solution

Will be great the ability of declare more than one "mqtt" sentence in the platform

Alternative solutions

Have another Homebridge instance running the z2m plugin with the 2nd zigbee2mqtt base topic

Additional context / information

No response

@GerSant GerSant added the enhancement New feature or request label Mar 19, 2024
@itavero
Copy link
Owner

itavero commented Mar 19, 2024

Just out of curiosity, what's the reason for having multiple Zigbee2MQTT instances?

Would you be able to solve this with child bridges?

@GerSant
Copy link
Author

GerSant commented Mar 19, 2024

There is a big problem with the Tuya ZY-M100-S accessories, those device spams the Zigbee Network with 10 status updates messages (with any changes) per second. This behaviour causes poor performance, response times, in the zigbee network affecting other devices.
The current workaround is create a second Zigbee Networks (in other channel with other PAN ID) for this shitty devices.

You can found here
Koenkk/zigbee2mqtt#19045

The 2nd reason is, for some big networks (more than 150 devices) is recommended to split in 2 separate Zigbee Networks.

@itavero
Copy link
Owner

itavero commented Jun 13, 2024

So, did the Child Bridge approach work for you?
If so, let me know, then we can close this issue.

@itavero itavero changed the title [Feature] [Feature] Connect to multiple MQTT brokers/base topics Jun 13, 2024
@dmatik
Copy link

dmatik commented Nov 18, 2024

@itavero
It definitely worked for me.
I also have 3 separate instances of Z2M at my home (1 for each floor).
However it could be nice to be able to give those child bridges different names, since it is hard to tell who is who there on the child bridges list.

@FromTheCToTheG
Copy link

Same for me - I also have 3 instances of Z2M, also one for each separate floor.

Thank you for your good advice, I also managed to create a separate child bridge for every instance/mqtt topic. However, I didn't manage to do so via the WebUI (is there any way at all?), so I did it through editing the JSON config.
For naming the different instances, you can then use the configuration-dropdown of the child bridge and enter a name there, or enter a name directly in the JSON like:
{
"mqtt": {
"base_topic": "zigbee2mqtt-groundfloor",
"server": "mqtt://broker.ip:1883",
"user": "username",
"password": "userpassword",
"reject_unauthorized": false,
"keepalive": 60,
"version": 4,
"disable_qos": false
},
"defaults": {
"exclude": false
},
"exclude_grouped_devices": false,
"platform": "zigbee2mqtt",
"_bridge": {
"username": "FF:FF:FF:1A:FF:F3",
"port": 53420,
"name": "Z2M Ground Floor"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants