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”?
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.
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.
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)
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
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.
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.