Matterbridge is a Matter plugin manager.
It allows you to have all your Matter devices up and running in a couple of minutes without having to deal with the pairing process for each individual device.
Developers can focus solely on device development by extending the provided classes.
Simply pair Matterbridge once, and it will load all your registered plugins.
This project aims to enable porting Homebridge plugins to Matterbridge plugins without having to recode everything (Development).
The easiest way to start create a new plugin is to clone the Matterbridge Plugin Template which has Dev Container support for instant development environment and all tools and extensions (like Node.js, npm, TypeScript, ESLint, Prettier, Jest and Vitest) already loaded and configured.
Matterbridge creates a device that can be paired with any ecosystem, such as Apple Home, Google Home, Amazon Alexa, Home Assistant, or any other platform supporting Matter.
You don't need a hub or a dedicated new machine.
No complex setup: just copy paste the installation scripts.
Matterbridge is lightweight and also runs on slow Linux machines with as little as 512MB of memory.
It also runs perfectly on macOS and Windows.
If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge and sponsoring it.
The project is build on top of https://github.com/project-chip/matter.js.
A special thanks to Apollon77 for his incredible work.
Join us in the Matterbridge Discord group https://discord.gg/QX58CDe6hd created by Tamer (https://github.com/tammeryousef1006).
https://www.youtube.com/watch?v=goNB9Cgh_Fk
https://www.matteralpha.com/how-to/how-to-configure-an-open-source-matter-bridge-at-home
https://matter-smarthome.de/en/interview/an-alternative-to-the-official-matter-sdk/
To run Matterbridge, you need either a Node.js environment or Docker installed on your system.
If you don't have Node.js already install, please use this method to install it on a debian device: https://github.com/nodesource/distributions. The supported versions of node are 18, 20 and 22. Please install Node.js 22 LTS. Node.js 23, like all odd-numbered versions, is not supported. Nvm is not a good choice and should not be used for production.
If you don't have Docker already install, please use this method to install it on a debian device: https://docs.docker.com/desktop/setup/install/linux/debian/. After follow the guidelines for the Docker configurations.
I suggest using Docker for its simplicity.
Since as stated in the Matter specifications "Matter aims to build a universal IPv6-based communication protocol for smart home devices", ipv6 should be enabled in the network.
Avoid using VLAN and firewall blocking the communications between the controllers and Matterbridge.
Follow these steps to install Matterbridge:
npm install -g matterbridge --omit=dev
on Linux or macOS you may need the necessary permissions:
sudo npm install -g matterbridge --omit=dev
Test the installation with:
matterbridge
Now it is possible to open the frontend at the link provided in the log (e.g. https://MATTERBIDGE-IPV4-ADDRESS:8283).
You can then change the bridge mode and other parameters from the frontend.
matterbridge -bridge
This force Matterbridge to load in bridge mode.
Matterbridge only exposes itself, and you have to pair it scanning the QR code shown in the frontend or in the console.
matterbridge -childbridge
This force Matterbridge to load in childbridge mode.
Matterbridge exposes each registered plugins, and you have to pair each one by scanning the QR code shown in the frontend or in the console.
matterbridge -help
Matterbridge has a frontend available on https://MATTERBIDGE-IPV4-ADDRESS:8283 and https://[MATTERBIDGE-IPV6-ADDRESS]:8283
You can change the default port by adding the frontend parameter when you run it.
Here's how to specify a different port number:
matterbridge -frontend [port number]
To use the frontend with ssl see below.
From the frontend you can do all operations in an easy way.
Devices page: See the screenshot here
Logs page: See the screenshot here
Config editor: See the screenshot here
Run matterbridge as a service on macOS with mb-service (by Michael Ahern)
Matterbridge Service Command for macOS
Home assistant add-on configurations
The other Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.
Matterbridge shelly plugin allows you to expose all Shelly Gen 1, Gen 2, Gen 3 and Gen 4 and BLU devices to Matter.
Features:
- Shellies are automatically discovered using mDNS.
- Shelly wifi battery-powered devices are supported.
- Shelly wifi battery-powered devices with sleep_mode are supported.
- Shelly BLU devices are supported through local devices configured as ble gateway.
- Discovered shellies are stored in local storage for quick loading on startup.
- The components exposed are Light (with brightness and RGB color), Switch, Relay, Roller, Cover, PowerMeter, Temperature, Humidity, Illuminance, Thermostat, Button and Input.
- PowerMeters expose the electrical measurements with the electricalSensor device type (suppoerted by Home Assistant and partially by SmartThings), waiting for the controllers to upgrade to the Matter 1.3 specs.
- Shellies are controlled locally, eliminating the need for cloud or MQTT (which can both be disabled).
- Shelly Gen 1 devices are controlled using the CoIoT protocol.
- Shelly Gen 2 and Gen 3 devices are controlled using WebSocket.
- The Matter device takes the name configured in the Shelly device's web page.
- Each device can be blacklisted or whitelisted using its name, id or mac address.
- Device components can be blacklisted globally or on a per-device basis.
- If the device has a firmware update available, a message is displayed.
- If the device's CoIoT protocol is not correctly configured, a message is displayed.
- If the device cover/roller component is not calibrated, a message is displayed.
- If a device changes its ip address on the network, a message is displayed and the new address is stored.
- A 10-minute timer checks if the device has reported within that time frame, and fetch un update.
Matterbridge zigbee2mqtt is a matterbridge production-level plugin that expose all zigbee2mqtt devices and groups to Matter.
No hub or dedicated hardware needed.
Matterbridge Somfy Tahoma is a matterbridge production-level plugin that expose the Somfy Tahoma screen devices to Matter.
Matterbridge Home Assistant plugin allows you to expose the Home Assistant devices and entities to Matter.
It is the ideal companion of the official Matterbridge Home Assistant Add-on.
Matterbridge Webhooks plugin allows you to expose any webhooks to Matter.
Matterbridge BTHome allows you to expose any BTHome device to Matter using the native bluetooth of the host machine.
Features:
- The bluetooth works correctly on all platforms and is based on the @stoprocent fork of noble.
- The discovered BTHome devices are stored with all attributes to easily restart the plugin.
- The plugin has also a command line to test and verify the bluetooth adapter and the ble network.
This is an example of an accessory platform plugin.
It exposes a virtual cover device that continuously moves position and shows how to use the command handlers (you can control the device).
An Accessory platform plugin only exposes one device.
This is an example of a dynamic platform plugin.
It exposes 38 devices:
- a switch with onOff cluster
- a light with onOff
- a light with onOff and levelControl (dimmer)
- a light with onOff, levelControl and colorControl (with XY, HS and CT) clusters
- a light with onOff, levelControl and colorControl (with HS and CT) clusters
- a light with onOff, levelControl and colorControl (with XY and CT) clusters
- a light with onOff, levelControl and colorControl (with CT only) clusters
- an outlet (plug) with onOff cluster
- a cover with windowCovering cluster
- a lock with doorLock cluster
- a thermo autoMode (i.e. with Auto Heat and Cool features) with thermostat cluster and 3 sub endpoints with flowMeasurement cluster, temperatureMeasurement cluster and relativeHumidityMeasurement cluster (to show how to create a composed device with sub endpoints)
- a thermo heat only with two external temperature sensors (tagged like Indoor and Outdoor)
- a thermo cool only
- a fan with FanControl cluster
- a rainSensor device
- a waterFreezeDetector device
- a waterLeakDetector device
- a smokeCoAlarm (with smoke and co features) sensor (supported by Apple Home)
- a smokeCoAlarm (with smoke only feature) sensor (supported by Apple Home)
- a smokeCoAlarm (with co only feature) sensor (supported by Apple Home)
- an airConditioner device
- an airPurifier device with temperature and humidity sensor (supported by Apple Home)
- a pumpDevice device
- a waterValve device
- an airQuality device with all concentration measurements clusters (supported by Apple Home only without the concentration measurements)
- a momentary switch
- a latching switch
- a Robot Vacuum Cleaner device (supported by SmartThings, Alexa, Home Assistant and partially by Apple Home). Read also #264.
- a onOff Mounted Switch device (supported by SmartThings, Alexa, Home Assistant)
- a dimmer Mounted Switch device (supported by SmartThings, Alexa, Home Assistant)
- a laundry Washer device (supported by SmartThings, Alexa and Home Assistant)
- a laundry Dryer device (supported by SmartThings, Alexa and Home Assistant)
- a dishwasher device (supported by SmartThings, Alexa and Home Assistant)
- a refrigerator device (supported by SmartThings, Alexa and Home Assistant)
- an oven device (supported by SmartThings, Alexa and Home Assistant)
- a microwave Oven device (supported by SmartThings, Alexa and Home Assistant)
- an extractor Hood device (supported by SmartThings, Alexa and Home Assistant)
- a cooktop device (supported by SmartThings, Alexa and Home Assistant)
- a water heater device (supported by SmartThings and Home Assistant)
- a car charger device (supported by Home Assistant)
All these virtual devices continuously change state and position. The plugin also shows how to use all the command handlers (you can control all the devices).
A Dynamic platform plugin exposes as many devices as you need (the limit for the Home app is 150 accessories for bridge).
The history works in both bridge and childbridge mode.
The Eve app only shows the history when the plugins run like an AccessoryPlatform in childbridge mode (this means the plugin is paired directly).
A matterbridge plugin that allows connecting Loxone devices to Matter.
A Matterbridge plugin that connects Dyson robot vacuums and air treatment devices. to the Matter smart home ecosystem via their local MQTT APIs.
AEG RX 9 / Electrolux Pure i9 robot vacuum plugin for Matterbridge.
A Matterbridge plugin for Airthings air quality monitors via the Airthings Consumer API.
The plugin uses local connection to Daikin Wifi modules. The plugin does not work with Daikin cloud (Onecta) connected devices.
Matterbridge Roborock Platform Plugin is a dynamic platform plugin for Matterbridge that integrates Roborock vacuums into the Matter ecosystem, enabling control via Apple Home and other Matter-compatible apps.
Just open the frontend on the link provided in the log, select a plugin and click install.
To install i.e. https://github.com/Luligu/matterbridge-zigbee2mqtt
On windows:
cd $HOME\Matterbridge
npm install -g matterbridge-zigbee2mqtt
matterbridge -add matterbridge-zigbee2mqtt
On linux or macOS:
cd ~/Matterbridge
sudo npm install -g matterbridge-zigbee2mqtt
matterbridge -add matterbridge-zigbee2mqtt
matterbridge -add [plugin path or plugin name]
matterbridge -remove [plugin path or plugin name]
matterbridge -disable [plugin path or plugin name]
matterbridge -enable [plugin path or plugin name]
How to remove the commissioning information for Matterbridge so you can pair it again (bridge mode). Shutdown Matterbridge before!
matterbridge -reset
How to remove the commissioning information for a registered plugin so you can pair it again (childbridge mode). Shutdown Matterbridge before!
matterbridge -reset [plugin path or plugin name]
matterbridge -factoryreset
This will reset the internal storages. All commissioning informations will be lost. All plugins will be unregistered.
Place your own certificates in the .matterbridge/cert
directory:
cert.pem
key.pem
ca.pem
(optional)
Matterbridge looks first for .p12 certificate and if it is not found it looks for cert.pem and key.pem.
Place your own p12 certificate (binary file) and the passphrase (text file) in the .matterbridge/cert
directory:
cert.p12
cert.pass
Matterbridge looks first for .p12 certificate and if it is not found it looks for cert.pem and key.pem.
Add the -ssl parameter to the command line.
If desired, you can also change the frontend port with -frontend 443.
matterbridge -ssl -frontend 443
Add the -mtls parameter to the command line if you want Matterbridge to request the client (your browser) to authenticate itself (this is the most secure connection possible).
The browser must provide the client certificate: on Windows you need to import it in Current User → Personal → Certificates with certmgr.msc.
matterbridge -ssl -mtls -frontend 443
If the certificate are correctly configured, you will be able to connect with https to the frontend.
In the frontend, go to settings and enable debug mode as shown below:
Wait a few minutes to allow the logs to to accumulate.
Then, from the dots menu in the frontend, download the matterbridge.log
and matter.log
files.
Don't forget to unselect the debug mode when is no more needed. The network traffic and cpu usage is very high in debug mode.
This message may appear after Matterbridge restarts, indicating that the controller is still using a session from the previous connection that has since been closed. After some time, the controller will reconnect. In this context, the message is not indicative of a problem.
The HomePods, being a WiFi devices, sometimes pruduce message trasmission errors. The Apple TV with network cable is more reliable (but also more expensive).
All issues have been solved from the version 17.5 of the HomePod/AppleTV. Now they are stable.
If you have more then one Apple TV or Home Pod, you can herve better results setting to disabled "Automatic Selection" in "Home Setting", "Home Hubs & Bridges". When "Automatic selection" is disabled, select your Apple Tv if you have one or any of your Home Pod. In this way you should not have anymore more then one session for fabric.
The Home app forgets about them when you restart the node.
As of version 18.4.x, all Appliances device types are not supported by the Home app. They don't even appear like unsupported accessories.
As of version 18.4.x, the Robot is supported by the Home app only as a single, non-bridged device or if it is the only device in the bridge.
If a Robot is present alongside other devices in the bridge, the entire bridge becomes unstable in the Home app.
A workaround has been released in Matterbridge 3.1.1. Ask the plugin authors to update the code.
So far is the only controller supporting all Matter 1.2, 1.3 and 1.4 device type.
- If HA doesn't show all devices, reload the Matter Server Integration or reboot HA
- Home Assistant doesn't seem to always react when a device is removed from the bridge: they remain in HA unavailable forever...
- Use Apple Home when you have to choose the controller type even if you pair Matterbridge directly with HA.
If you face a problem pairing to Google Home from Ios app the solution is there #61.
If you face a problem changing the brightness check this for the explanation: Luligu/matterbridge-zigbee2mqtt#80
No other issues reported so far.
Tested by Tamer Salah
Alexa needs the standard port 5540 to pair (from matter.js readme).
There is no support for these Matter device types:
- pressure sensor
- flow sensor
In the zigbee2mqtt and shelly plugins select the option to expose the switch devices like light or outlet cause they don't show up like switch (Matterbridge uses a switch device type without client cluster).
Tested by Tamer Salah
No issues reported so far.
Tested by Tamer Salah
eWeLink needs the standard port 5540 for commissioning.
Check the matter.js readme.
We believe in a welcoming and respectful community for all. Please make sure to follow our Code of Conduct in all your interactions with the project.
If you find this project helpful and you wish to support the ongoing development, you can do so by buying me a coffee. On my side I sponsor the packages that I use in this project. It would be nice to have sponsors too. Click on the badge below to get started:
Thank you for your support!