Connect zigbee2mqtt to matterbridge

Hello everyone,

I’m new to Gladys. I’ve added my peripherals to zigbee2mqtt and I need to retrieve them in matterbridge.

So I installed the matterbridge zigbee2mqtt plugin on matterbridge. However, it fails to start.

I have two messages: the first one tells me that I need to configure the Mdns parameter in matterbridge (I confess I don’t know what that is), and the second one informs me that the matterbridge zigbee2mqtt plugin is in error because it cannot connect to the MQTT broker.

Here are the error messages from the log:

    1. The plugin did not receive zigbee2mqtt bridge state. Check if zigbee2mqtt is running and connected to the MQTT broker.
    2. error[10:41:33.220][Matterbridge zigbee2mqtt plugin]The plugin did not receive zigbee2mqtt bridge info. Check if zigbee2mqtt is running and connected to the MQTT broker.
    3. error[10:41:33.221][Matterbridge zigbee2mqtt plugin]The plugin did not receive zigbee2mqtt bridge devices/groups. Check if zigbee2mqtt is running and connected to the MQTT broker.
    4. error[10:41:33.225][PluginManager]Failed to start plugin matterbridge-zigbee2mqtt: The plugin did not receive zigbee2mqtt bridge state or info or devices/groups. Check if zigbee2mqtt is running and connected to the MQTT broker. Stack: Error: The plugin did not receive zigbee2mqtt bridge state or info or devices/groups. Check if zigbee2mqtt is running and connected to the MQTT broker. at ZigbeePlatform.onStart (file:///usr/local/lib/node_modules/matterbridge-zigbee2mqtt/dist/module.js:316:19) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) at async PluginManager.start (file:///usr/local/l … inManager.js:916:13) at async PluginManager.load (file:///usr/local/l … inManager.js:877:21)

Can someone enlighten me?

Hi @deckard24 and welcome to the Gladys community :grin:

For mdns, you need to retrieve the name of your interface (visible on the matterbridge dashboard) and put it in the network Settings:
image

For the zigbee2mqtt plugin part, you must have activated the zigbee2mqtt integration in Gladys, chosen a USB key and its port.


If this is not your setup, you will need to provide screenshots of your configuration.

You will also need the username and password for the zigbee2mqtt integration, as well as the IP and port to zigbee2mqtt (sorry, I don’t have a screenshot).

I assume that the IP address of your Gladys is 192.168.10.10, you will change it with your values.

Moreover, the integration has created an mqtt server that you do not see but is indeed present (on port 1884) and this is what we are going to configure in matterbridge.

Here is the configuration to put in matterbridge:




The port 12000 in my screenshot will need to be modified according to what you have in Gladys.

Keep us updated on your progress.

Hello.

Thank you so much for this warm welcome.

Thank you very much for the reply. The Mdns is indeed fixed by setting the interface name.
For zigbee2mqtt, I have indeed successfully enabled the integration via the USB port and a Sonoff key.

For the settings, I just need the password and I don’t know where to find it.
Can you enlighten me?

Oops, I thought it was in the zigbee2mqtt integration config page :roll_eyes:
So it’s probably in a configuration file, but I don’t know which one (I have an external zigbee2mqtt and an external MQTT server, so different config).

@pierre-gilles could you guide @deckard24 to retrieve the password? Thanks!

Small question, why do you need to do that? :slight_smile:

If you launch Zigbee2mqtt automatically via Gladys, and you had a standard Gladys installation with the official docker run/compose available on the site, then it is available with this command:

cat /var/lib/gladysassistant/zigbee2mqtt/z2m/configuration.yaml

You will see a « mqtt » section at the top of the file with the information :slight_smile:

I didn’t dare ask the question, but it was on my mind :wink:
I thought it was to have all devices in Matter and use them with Apple Home (for example), something you can’t do directly with Zigbee.

Yes, but if you use Gladys, we already do this in the HomeKit integration! So no need for Matterbridge.

Hello

Actually, I had invested in a Switchbot remote to control heating and lighting throughout the house

The problem is that the Switchbot remote only recognizes Matter devices

I had done the same kind of tinkering on Home Assistant at the time, but Home Assistant is a bit complicated given my humble level.

After that, there might be a simpler method, I must confess a low level of home automation and a simple reasoning « if Gladys helps me make my devices Matter, I could easily add them to the remote »

In any case, a huge thank you because Gladys is really simpler than Home Assistant (especially for a beginner like me)

Got it, I understand better! And how does SwitchBot work exactly?

Because otherwise, why not just connect your SwitchBot to Gladys via the Matter integration, and then create scenes directly in Gladys between your SwitchBot and your Zigbee devices?

That’s the power of Gladys, you can automate between multiple devices from different technologies!

Thanks for the feedback!! That’s 100% the goal of Gladys so if we’ve succeeded, that’s great :smiley:

The remote works by adding each device to the unit. Then you enter the routines directly into the remote. In comparison, it reminds me of a ++ version of Logitech’s Harmony remotes.

I admit I hadn’t thought of doing the opposite (which now that you mention it seems super logical).

I’ll add this to my next home automation tinkering session!

Thanks a million!

Don’t hesitate if you have any questions along the way!