All you need to make OH bridge Items to Matter

I have no Matter devices that can work with openHAB (that I know of) but I am attracted to the idea of getting support for local control instead of needing to go through the Google Cloud. I do have Google devices that can work with Matter (hubs and the like).

However, reading through the docs and the various threads left me a little confused on how to just set up OH as a Matter Bridge and then make it so Google Home (for example) can see the exposed Items. I’m posting this here in case anyone else has the same problem.

This tutorial does not address any of the IPv6 and accept_ra type stuff. See the docs and other tutorials for that.

1. Install the Matter binding

This is easy enough. Install the Matter binding in the usual ways. I went to the Add-on store in MainUI and clicked on “add” for the binding.

2. Tag your Items

Navigate to the Items you want to expose to the Matter fabric. Click on add metadata → Matter and choose the right device type and other options. See the Matter add-on docs for details on what everything does and what device types do what. It’s pretty straight forward.

After adding a matter Item metadata to at least one Item you should see a “Matter Bridge State: Starting” followed by a “Matter Bridge State: Running” entry in your logs.

3. Add openHAB to Google Home

Here is the part where I got lost. Where’s the QR code for the openHAB Matter Bridge?

It’s in the binding settings, not on a Thing!

Navigate to MainUI → Settings → Matter Settings and there it is.

Now in Google Home, add a device, choose Matter Device and scan the QR code from above. It will warn about adding a non-certified device but go ahead and accept the risk (or not if you choose). After a few moments, all the Items tagged with matter metadata will appear as new devices.

I hope this helps someone.

Note: I’m aware this information is in the docs. But a user in a hurry can miss it. I know, because I was one. :wink:

Pairing codes and other options can be found in the MainUI under “Settings → Add-on Settings → Matter Binding”

But even so, for a Matter noob like me, the import of this sentence was not clear until after the fact.

9 Likes

Thanks for the tips!

So before doing this, should we remove the ga metadata to prevent the items from appearing twice in google home?

By going through matter, will the commands be routed locally instead of through the openhab cloud like it did with ga?

Yes, that’s why Matter is interesting.

But…

As an example, your openHAB server as a Matter controller can control all your Matter devices without the need of a cloud access. But with a myopenhab cloud instance, you can also control them from outside your house.

To clarify,

With google assistant:

“Hey google, turn off X” → Nest Speaker → Google cloud → openhab cloud → openhab

With matter, will it be like this?

“Hey google, turn off X” → Nest speaker → openhab (without going out to openhab cloud

1 Like

If you use a voice assistant, the Nest speaker certainly uses Internet to analyse your talk request. But then the speaker is capable to communicate with your OH server without the need of a cloud connection.

I didn’t.

First I added the matter metadata. Then connected to Google by adding OH as a matter device. I verified everything was there and worked through Matter. Only after that I selected one of the OH cloud linked devices and unlinked OH. That removed all of the cloud linked devices.

It was easy for me to tell the difference between matter and cloud because I didn’t use any fixed labels to try and put the matter devices in the rooms in Google Home. So they all showed up at the bottom instead of next to their cloud counterparts. But if you are confused you can tell the difference by clicking on the cog icon for the device in Google Home. Matter devices will say “remove device” at the bottom and cloud will say “unlink openhab”.

You only need to unlink openHAN once and it will remove all the devices connected through the cloud service.

Yep. Interestingly I just got a new TP-Link Deco BE10000 (finally moving up from WiFi5 which has Matter support but no TBR unfortunately). My thought was I could connect OH to that in addition to Google Home, which is theoretically doable. But you need to get the pairing code for the openHAB device in Google Home, not the one from openHAB itself. Unfortunately this didn’t work for me with the Decco app complaining about an unreliable network.

But before I pursued it further I realized when the Internet is down, I’ll just connect to OH directly with the local connection. Throwing matter in the middle of that is an unnecessary complication.

I did a little bit of experimentation on adding a new Item and was happy to see it show up in Google Home almost immediately.

On the other hand, I don’t think matter supports as many types of devices in as many configurations as GA does so you may not find matter sufficient for all your needs. All I have are switches and contacts so it works great for me.

So basically OH + Matter binding make all our (tagged) Items “Matter Enabled”?

Yes, with some limitations. For example, GA has way more types and better modeling for certain types of devices. There’s no “fireplace”, “coffee machine”, “scene”, “speaker” etc in Matter (yet?). The only compound device Matter has support for is thermostat.

So it’s possible that you have something exposed as one device using GA that cannot be represented that way using Matter, or it gets exposed awkwardly as a switchor contact instead of something more meaningful.

But conceptually, OH + Matter binding is acting as a Matter Bridge. It’s exposing all it’s devices to the Matter Fabric.

Hi.

Quite keen to get this same thing running but when I try and link OH as a Matter device in Google Home I get an error saying I need a Matter enabled hub? Any ideas on what config or setup I might be missing.

For context I’m trying to use Matter as a bridge between my google mini speaker and zwave devices via my OH setup. I had used homebridge in the past for this.

Thanks

Ruben

Yes, you need a google service that can act as a matter hub. Most if the smart speakers, Nest thermostats (I think) and others have matter hubs in them. But you must have at least one device on the same IPv6 network as OH is running on. I think it also needs to be pay off the same “home” in Google Home.

I think the nest minis have matter though. So I would look to your network configuration and any other prerequisites discussed in the Matter add-on docs. This tutorial is not a replacement for everything you will find there.

Hi Rich thanks for this…I did exactly as you did. I managed to pair openhab in Google home with a couple of items which id tagged as matter in the items text file. However no data seems to come through and in Google home they appear as offline. The binding is showing as running. Any idea where I’m going wrong? I have debug for the log but there is nothing showing. I’m guessing the issue is at the Google end.

I am definitely not an expert on Matter so any detailed analysis of logs and the like probably needs to be taken to the Matter thread or starting a new thread.

I can say I’ve only really tagged switches and contacts and those are working for me without error. Beyond that, how Matter does what it does and what can go wrong are a mystery to me.

Yes its very mysterious! Did you create a Matter controller thing in Openhab? Not sure it that is needed or not….

Everything I did I documented in the OP. I created no Things. My understanding is the controller Thing is only required if you have a Matter thread border router dongle or something like that.

1 Like

A Matter controller Thing is only if you want to be able to pair matter devices from some other system into OH and control them from OH. (e.g., my Nest thermostats which only connect to Google home, require me to configure an OH Matter controller Thing so that Google can allow those matter devices to connect to OH and those thermostats are now each their own node Thing).

No Thing is required if you are just sharing OH items over matter to some other system, then you only need the Matter metadata on those items. (e.g., my office light Switch Item has OnOffLight configured as its Matter metadata and can be paired into google home to be controlled by Google home as well as OH).

If you actually got the Items paired then the connection is working, so, if no correct communication is happening then my guess would be you do not have the Matter metadata fully correctly configured.

2 Likes

I added an Aqara Hub M3 which has a Thread doorsensor connected. Both need an OH Matter controller, and that works fine, except that the OH item for the sensor reports OPEN as CLOSED and vice versa.
I also have a Shelly Matter plug over IP which also needs the Controller in OH.

So the controller seems to be needed in both scenarios

I tried setting up a switch using the example items and still it shows offline - I noticed in the documentation your router needs to support multicast messages and it seems mine does not so that could be the issue. Way outside my knowledge area! I think I will leave this as a future project for now….thanks for the help