You are asking about a Matter bridge.
This feature would make the difficult self-hosted Google Home and Alexa setup obsolete. While nabucasa would suffer from the decreased revenue, from an open-source point of view it would be one of the most important features possible. Any updates or open source developers who know how to implement it?
Hi, I’m developing a Node-RED plug-in that allows this, it’s not natively integrated with Home Assistant but you can use the Home Assistant nodes to write a functional integration.
The plug-in is @node-red-matter/node-red-matter on the palettes manager.
Would be so great if this is implemented in Home Assitant.
Btw. Homee already has this feature: https://hom.ee/homee-core-2-40-0/
Mediola also: mediola mit weltweit erster zertifizierter Matter Multi-Protokoll Bridge - mediola - connected living AG
This feature would also allow us to expose ESPHome devices as Matter endpoints without having to implement Matter in ESPHome itself. This means they can be used in Alexa / Google Assistant routines locally, without having to expose your HA instance to the internet.
Tasmota already has this feature: Matter - Tasmota
This is amazing. Would live to see this in HA.
Would this work in the same way as the Hue Bridge emulation? i.e switches only or does Matter support full functionality?
If the latter, I would love to see this in HA. In a way, I think this is only logical if HA is to be the centre of the smart home.
Im actually working on precisely this type of integration (HA exposed as a Matter bridge) since quite some time!
What is the state of your development? Anything functional? Do you have a Github repo?
I did some tests with @project-chip/matter.js this weekend and think it‘s quite easy to get that running with JavaScript (outside of home assistant). Unfortunately I could not find any good ready-to-use python implementation of the matter protocol.
What I‘ve got working so far:
- JavaScript application running in a docker container
- the application hosts a matter server providing an aggregation node (≈ Bridge)
- the application connects to home assistant using home-assistant-js-websocket and a long-living-access-token
- for each light-entity it adds a new light-node to the bridge (on-off and brightness are currently supported)
- on-change-events of home assistant are mirrored to the matter-nodes
- on-change-events coming from matter clients are mirrored to home assistant (using service-calls)
With that up and running, I have got rid of my custom alexa skill completely and directly connect my echos with home assistant using matter (I only use Alexa to control some lights).
Pro:
- no Lambda Cold Starts
- no communication via internet / port forwarding
- fully local communication
Con:
- not in python => not integrated into home assistant => custom docker image next to HASS
- could be an addon, but would be better as native integration
- currently only simple lights supported
Todo:
- I still need to cleanup some things
- color support for lights
- other entity types (first switch / socket)
- ideally rewrite in python as a native integration
- approval of nabu casa to publish
Can you expand on that a bit more? Like, you’re able to control your Echos via Matter (media, tts, etc) or the devices attached to them?
No, sorry for the confusion. I connect my home-assistant as a matter Bridge device to Alexa. I don’t need the Alexa skill anymore and controlling lights via Alexa does not need the internet loopback and port forwarding since the Amazon Echo can directly (locally) connect to home assistant.
It is great.
I really hope this feature would be supported natively in the future some day to get local control with my google home
Thanks a lot! To me this sounds like the most straightforward approach, although leveraging the JavaScript instead of Python libraries in this case. Even with Python I would think that the Matter Bridge would need to run as a separate add-on due to how the Matter protocol and server logic works.
I mean, even for the existing Matter integration in Home Assistant, a separate Matter Server add-on is needed. I guess it is due to the Python Matter/CHIP libraries having binary dependencies and running their own server loop which probably cannot coexist with the Home Assistant event loop.
I was toying with a similar idea to build a Matter Bridge add-on, but based upon the Python libraries. An example bridge leveraging the Python Matter/CHIP libraries can be found here: GitHub - canonical/matter-bridge-tapo
I’m now using a combo of the previously mentioned matterbridge zigbee2mqtt plugin and node-red-matter for non-zigbee devices. Matterbridge has been the easiest so far, then node-red-matter can even be used for fans as “dimmable outlets” but needs a little help keeping states in sync.
I didn’t realize how slow my lambda based responses had become and chalked it up to less focus/resources from Amazon’s side. Switching Alexa over to local control with matter is considerably faster. It also seems more in line with the general Home Assistant vision for less reliance on the cloud.
I agree these will probably remain add-ons, but glad to see matter becoming useful.
Can you provide some infos about how node-red (in general) and node-red-matter work?
I have never used any of them, but it seemed to me that I’d have to configure everything by hand? Or am I wrong?
Which entity types are supported? Do I need to include / exclude every entity by hand, or can i automatically add (and update / remove) every entity based on its domain? Could I use the visibility property to hide some entities? Etc.
If everything works automatically and is easy to use, maybe we could write a detailed summary / how-to-guide for everyone to be able to use it. There would be no need for my custom implementation…
It’s definitely not automatic and easy, more of a GUI programming/automation language. So yeah it’s a fair amount of custom setup. Here’s the addon for HA and an example of one of my “flows”. This covers changes coming from virtual Matter devices on the left, and sending HA initiated changes back to the same Matter devices on the right.
Documentation for node-red-matter is light but notes the current limitations:
The plugin only supports 4 device types: Dimmable and not dimmable lights, and dimmable and not dimmable switches. More device types will be added in the future.
You can make use of on/off switches for example to run scripts or control basic entities, but they won’t be exposed as the true entity type.
I prefer where Matterbridge is going, and is much more of the automatic setup you’re looking for. The plugins are ecosystem specific, currently he’s close to releasing a new one for Shelly devices. I’m hoping Z-Wave JS is included at some point, or down the line maybe a more generalized integration for all HA entities.
Okay, I see where this is going and I remember why I never started using node-red
I have seen the matterbridge project, which is btw also build on matter.js. That’s where I started, but I didn’t like the typings in typescript. On a first test it felt horrible - so i started to create my own.
But maybe I should give it another try since I am actually building exactly that home-assistant integration which is missing in matterbridge. It should not be too hard, to make that possible.
Maybe I’ll invest 1-2 hours to test that tomorrow.
okay wow - that was easier than expected
Even the matterbridge typings were working after setting up a new repo from scratch.
Disclaimer
Please be aware that I invested just 2 hours into this project (setup + first entity integration) and barely tested anything. I have my Amazon Echo setup and connected to matterbridge and everything seems to work for me.
Currently supported
- Light entities (
light.
) including on-off, brightness and hue & saturation control - Switch entities (
switch.
) including on-off control - Media Players (
media_player.
) are mapped to Switches and currently only support on-off control
Deployment
At the moment there is no “automated” way to deploy all this.
Local installation
As simple as installing matterbridge. See the README for details.
Docker
Luligu has created a docker-image and provides some details on how to run matterbridge in docker.
Use the existing matterbridge docker image and run the installation and configuration steps of my plugin in it.
I’ll create such a ready-to-use docker image in the next days.
Home Assistant Add-On
Of course there is no add-on existing, yet.
But I am planning to create the missing docker image and the corresponding add-on code in the next days or weeks.