Matterbridge – enable Matter for all your smart home devices

Screenshot of the Matterbridge main interface

I’ve only recently come across Matterbridge, which allows you to add a wide range of smart home devices as if they supported the Matter smart home standard, even if they don’t. Once installed, it runs as a server that acts as a bridge between whatever devices you have, and your choice of smart home ecosystem using Matter.

Whilst I have a handful of Matter devices – some Wi-Fi and Thread smart plugs, and a smart light bulb, many of my devices don’t support Matter. They’re either older Wi-Fi devices, or use Zigbee. To make those devices available to Google Home, I’m currently using Home Assistant and Homeway, but Matterbridge offers an alternative.

If the Matterbridge interface looks familiar, it’s because it’s derived from Homebridge. Whilst Homebridge is designed just to work with Apple Home, Matterbridge will work with Google, Alexa, Samsung Smartthings and Apple Home, amongst others.

Installing Matterbridge

I’m using Matterbridge alongside Home Assistant, and so I’ve installed it as a Home Assistant App (formerly known as an add-on). If you run Home Assistant Container, then you can also install Matterbridge as a Docker image, or you can install it using Node Package Manager (NPM).

It’ll take some time to install and run the first time, but once done, you’ll be able to open the interface inside Home Assistant and will get a screen similar to that in the screenshot. However, it won’t do very much until you install some plugins

Install the Home Assistant plugin

If you want Matterbridge to see the devices added to Home Assistant, then you’ll need to install the Home Assistant plugin. This is true even if you install Matterbridge as a Home Assistant app.

Most of the default settings should be fine, but you’ll need to provide a ‘long lived access token’ for your Home Assistant user account. In Home Assistant, click your user profile at the bottom of the left hand menu, select the ‘Security’ tab, scroll to the bottom, and click ‘Create token’. Give it a name, like ‘Matterbridge’, and then copy the token text and paste it into the Home Assistant Matterbridge plugin settings. Then, restart Matterbridge using the restart button at the top right of the Matterbridge interface. You don’t need to restart the whole app for this.

Once Matterbridge has restarted, it’ll bring all of your Home Assistant devices in. On the right hand side, next to each device, is a tickbox, so you can untick them to hide those devices that you don’t available via Matter. If you have lots of devices, but only want to share a few, then the plugin settings includes a ‘Whitelist’ feature that may be quicker than unticking hundreds of devices.

One other thing I had to do for some devices was hide some entities. Otherwise, the device showed up as two (or more) separate devices in Google Home; Apple Home was a little better and grouped these per device. Again, this is done in the Home Assistant plugin settings.

Optionally install the Zigbee2MQTT plugin

Another of Matterbridge’s plugins supports Zigbee2MQTT. This is the app that I use to add my Zigbee devices to Home Assistant, however, Matterbridge can connect to it directly using MQTT. There’s a couple of good reasons to do this:

  1. It means Home Assistant isn’t an additional intermediary. Say I want to use Google to turn on a Zigbee light: this request would go from Google, to Matterbridge, to Home Assistant, to Mosquitto (my MQTT broker), to Zigbee2MQTT and finally to the device. By connecting directly, you skip that third step.
  2. The Zigbee2MQTT plugin is more mature, and pulls in data such as how the device is powered.

Pair Matterbridge to your other ecosystems

Once you have your devices set up, it’s time to scan that big QR code on Matterbridge’s home screen, using the smart home app of your choice. How this will work will depend on the app:

  • In Google Home, it’ll add all the devices in an ‘In Your Home’ section at the bottom, for you to then allocate to rooms
  • In Apple Home, you’ll be asked to configure each device in turn, including setting a custom name allocating them to rooms.

After this initial setup, any new devices added to Matterbridge will automatically appear in the other apps.

Advantages over other options

Using Matterbridge as a way of bridging your Home Assistant devices to other smart home ecosystems has a number of advantages. Previously, I was using Homeway, but by using Matterbridge:

  • It’s free – I don’t need to pay a third party for this.
  • It retains local control, so if I decided that I didn’t want Homeway any more, my devices would still work.
  • It’s a lot easier than setting up Google Assistant manually in Home Assistant.
  • Once configured, devices work in both Google Home and Apple Home – you don’t need to configure them separately.
  • Whilst Homeway used to be really reliable, in recent weeks it has randomly disconnected from Google Home without warning. So far, I’ve been using Matterbridge for about a month, and have not had any significant issues with it.

To this end, I’ve disabled Home Assistant’s built-in HomeKit integration, and I’m just using Matterbridge now. So far, so good, although I don’t tend to use Apple Home very much.

In terms of disadvantages:

  • Not all types of device are supported. Some may appear as switches rather than their actual device type, such as a washing machine or dishwasher.
  • It will only work with Amazon Alexa if you have an Echo device with Alexa on it. Although I have the Alexa app on my phone, and use it on Fitbit Versa, Alexa requires a physical Echo device to manage Matter devices. It won’t use another vendor’s Matter server. However, Homeway’s Alexa support seems more stable than its Google Assistant support, so this doesn’t really affect me.

Other plugins

There are a number of other plugins available for Matterbridge. These include plugins for Shelly and Somfy devices, that allow Matterbridge to connect to these directly. In time, more of Homebridge’s plugins could be ported to Matterbridge, which would enable devices from the likes of Tuya/Smart Life or Philips Hue. But, for now, you can use these devices via the Home Assistant plugin.

Home Assistant and Google Home broadcasts

Screenshot of Home Assistant showing a script to broadcast a message via Google Home when my washing machine finishes

We have six Google Home Mini devices around our home, and now I can get Home Assistant to automatically deliver broadcast messages. Here’s how I did it.

Broadcast messages

When you have more than one Google Home device, you can say ‘Okay Google, broadcast [message]’, and it will relay that message to all of the other Google Home devices in your home. It’s useful for announcing that dinner’s ready, for example. Our house is long, rather than square, and I’m hard of hearing, so we use this quite a lot.

What I wanted to achieve was automation of these broadcasts, so that a broadcast was triggered by an event. This is possible thanks to the Google Assistant SDK integration. It’s a bit of a faff to set up – I recommend following this guide or watching the video embedded below:

Call the service

Once it’s set up, you can test it by opening Home Assistant’s Developer Tools. Click the ‘Service’ tab, and choose the ‘Google Assistant SDK: Send text command’ service. In the command, type something like ‘broadcast "This is a test"‘ and click ‘Call Service’. If you’ve set everything up correctly, your Google Home devices should all say something like “Incoming broadcast; it says: This is a test”.

Create a script

As I write this, the latest version of Home Assistant (2024.4.x) doesn’t allow automations to call services directly. So, to be able to trigger the broadcast, we’ll first need to create a Script in Home Assistant. In my example, I have a script called ‘Washing machine finished broadcast’. The ‘mode’ is left at the default setting of ‘Single’, and then I’ve created an Action which is to Call a Service. As above, I have selected ‘Google Assistant SDK: Send text command’ as the service to call, and then entered ‘broadcast "The washing machine has finished"‘ as the command, which I have ticked. I’ve left the rest blank.

Whilst here, I’ve also added a time condition. As this will be triggered when the washing machine finishes, I don’t want it to run when we might be asleep. We have Google Home devices in each of the bedrooms, and we sometimes run the washing machine overnight.

Home Assistant runs script actions in order. So, if you also want to add a time condition, you’ll need to add this before the Google Assistant SDK service call, or re-order the actions. In this example, I have created a Test action, where the current time is between 8am and 8pm. Outside of those times, the script will fail and not process the next command, so the broadcast action won’t be executed.

Link it to an automation

Now that we have a script, we can integrate this with an automation. I’m using my existing automation that sends a phone notification when my washing machine finishes. In my case, this is triggered using Meross energy monitoring smart plugs (sponsored link).

So now, as well as sending a notification, it also triggers a broadcast (within the time constraints).

Other things you can do with Google Home

Once you have the Google Asssistant SDK integration installed in Home Assistant, you can use scripts to run any other command that you would say to Google Home. You could, for example, create a button on your Home Assistant dashboard, which triggers the text command ‘play Never Going To Give You Up by Rick Astley on Spotify‘ if you want to automatically rickroll the other occupants of your house. It can also control smart home devices which work with Google Assistant, but do not yet have a Home Assistant integration.