Act as a Matter bridge

Great project!

Is there a plan to allow Home Assistant to act as a Matter bridge?

This will allow other UIs to be used while still enjoying the amazing variety of integration and add ons

Have you looked at the feature set of 2023.1? 
the preliminaries are in there. So you don’t really need a feature request


Yea I did but the release only talk about being able to connect matter devices to Home Assistant, what I’m asking is different:

Let non matter devices be “exported” as matter through Home Assistant so other UIs can be used (such as Apple Home app (I know I can use the HomeKit integration but it never worked for me well))

Maybe I’m not using the terms correctly and instead of “hub” I should have said “bridge” or “gateway”?

3 Likes

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?

2 Likes

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.

3 Likes

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

7 Likes

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!

7 Likes

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
7 Likes

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.

4 Likes

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

3 Likes

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. :smile:

2 Likes

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