The above, basically, describes what I wanted to do. Add Mater devices to Apple Home and to Home Assistant.
I mean Matter over WiFi and/or Thread.
It also shows my environment, especially as far as Home Assistant is concerned.
I have an Intel Mac mini running VMware Fusion, which is free. Inside which I run a virtual machine which runs Home Assistant on HAOS (Home Assistant Operating System).
As part of this configuration, I'm also running Matter Hub which enables me to bridge non-matter or non Apple Home devices devices to Apple Home via Matter over WiFi
Getting this all to work has not been easy and has required some significant effort, especially with Home Assistant.
I felt compelled to write this as I found no single document that helped me through the process, and it took me weeks of working out on how to do it.
Matter over WiFi with Apple Home.
WiFi is suitable for high data throughput devices, such as cameras. However, we've seen it used a great deal for low throughput devices purely because not everyone has a Thread Border Router (See below).
Now, this is easy. all you need is some kind of Apple Home hub. This can be:
- tv 4K,
- HomePod or
- HomePod mini.
You add devices in the normal way you add an Apple Home hub. However, what you do need to be careful of is does Apple Home support the Matter device. You see there are Matter devices that Apple does not currently support and there are Matter devices that Apple does support at different versions of Matter.
e.g.
- Apple Home supports Robot Vacuums at Matter 1.4 spec. This means you can do things like select rooms. You can see my previous post on this.
- Apple Home supports smart plugs at Matter 1.2 spec, so you can't see power usage but you can turn it on/off.
As far as I can find out, there is not a list of what Matter devices are supported by Apple Home.
Still, if it is supported, it is nice and easy.
Matter over Thread with Apple Home.
Thread is suitable for low data throughput devices, such as switches, sensors, lights, etc. Whilst Thread was invented by Nest, Apple have embraced it and is even in latest iPhones and iPads.
There are various issues with Thread that are being resolved and it certainly seems that Thread 1.4, not to be confused with Matter 1.4, resolves some of those issues.
One of the biggest issues can be "Islands of Thread", where you have one Thread network for Apple and another, say, for SmartThings. Unfortunately, it requires the vendors to support version 1.4 of Thread to start to resolve this. Apple, at time of writing, is still using Thread 1.3 even though they briefly tested 1.4 in the Beta of 26.0.
What you need is something called a Thread Border Router (TBR). This device essentially translates between the world of Thread and WiFi/Ethernet. Therefore the list of Apple Home Hubs is smaller.
- tv 4K 3rd Gen with Ethernet
- tv 4K 2nd Gen
- HomePod 2nd Gen
- HomePod mini
Theoretically you can also use other vendors devices that include a TBR, such as Nanoleaf Blocks, Shapes, Elements or Lines or an Aqara Hub M3. I haven't tried it, so can't comment.
Still, once you have a TBR, everything should be golden.... except distance. Thread is a mesh and the more mains powered Thread devices you add, the more extensive your network. If your device is not close to a Thread Router, then it may not work and, remember, walls do make a difference... as they do with WiFi.
Adding a device is similar,a gain, to a native Apple Home device. The biggest issues often come with sharing the device to another controller, such as Home Assistant, especially if you have Islands of Thread. You'll usually know that is the case when the device will work in either environment, but not both.
Unfortunately, tools are fairly rubbish for troubleshooting Thread.
Matter over WiFi with Home Assistant.
This is where things started to get interesting. For interesting, read hard.
Matter, before 1.5, requires bluetooth to configure the device. This requirement has been removed with Matter 1.5 as a way to reduce the price of devices.
As I said, I am running Home Assistant in a Virtual Machine running on an Intel Mac mini (macOS Sequoia 15.7.4). I made the assumption that the VM could use the Mac's Bluetooth. I was wrong. So, I bought an ASUS BT540 which I then plugged into one of the USB ports on the Mac mini and hard assigned it to the Virtual Machine.
When you do that, you should see the following in your Bluetooth integration for Home Assistant.
If you have any Bluetooth devices not currently configured in Home Assistant, such as SwitchBot devices, they will now show up in new devices.
Now you need to install the Matter Integration and you should now be able to add Matter over WiFi devices.
See the section on adding a device after Matter over Thread with Home Assistant.
Matter over Thread with Home Assistant.
You really need to do this section with the iOS companion App.
First of all, you need to install the Thread integration into Home Assistant.
You then set it up, and it will find all of your Thread Border Routers.
It will ask you about a Preferred Network. This is when you have Islands of Thread. I don't, so I only have the one. Here you can see the list of TBR's.
You should select one of the TBR's to send credentials to Home Assistant by clicking on the 3 vertical dots and then you can send the credentials to Home Assistant.
You can see that my Living Room tv has a lock next to it. This is the one I defined as providing the Thread Credentials. It also happens to be my main Home Hub in Apple Home.
Once that's done, you would think that everything is fine and dandy... well, not necessarily.
Making sure you are running IPv6.
Matter over WiFi uses either IPv4 or IPv6. Thread only uses IPv6, and this is where I came a cropper.
The first thing you should do is test your IPv6 connection on your host machine. You can do this using a web site http://test-ipv6.com
If that doesn't work, Thread will not work and you must resolve it.
Next, most configurations seem to suggest you use Ethernet as your network connection on your Host (the Mac mini). Apparently there can be issues with running IPv6 in a guest OS (Home Assistant) over WiFi. I did not have that choice.
If you can't use Ethernet (I can't), then make sure you make the other kinds of Physical network Inactive.
Then when you go into details of the network setup. Here we are looking at my WiFi set up, you need to look at TCP/IP. and you should see something like this:
You need to make sure that Configure IPv6 is set to Automatically and you should see 4 IPv6 addresses.
Now your host is set up. We need to make sure the guest works.
An easy way to do that is to go to the command line on your host and type ping6 home assistant.local
You should see something like this:
$> ping6 homeassistant.local
PING6(56=40+8+8 bytes) fe80::143c:15ec:55e2:9043%en0 --> fe80::9368:da9:a33e:59ae%en0
16 bytes from fe80::9368:da9:a33e:59ae%en0, icmp_seq=0 hlim=64 time=10.720 ms
16 bytes from fe80::9368:da9:a33e:59ae%en0, icmp_seq=1 hlim=64 time=49.688 ms
16 bytes from fe80::9368:da9:a33e:59ae%en0, icmp_seq=2 hlim=64 time=95.558 ms
16 bytes from fe80::9368:da9:a33e:59ae%en0, icmp_seq=3 hlim=64 time=20.968 ms
^C
--- homeassistant.local ping6 statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 10.720/44.233/95.558/32.895 ms
If that does not work, then your Guest OS is not running IPv6.
Inside HA go Settings/System/Network and when you see "Configure network interfaces", click the down arrow for IPv6.
if it is disabled, set it to Automatic. You should see something like this:
You will probably have to reboot the HA server, not just HA itself.
For me, it was this and locking down the interfaces on the host OS that fixed the issue.
Adding a device to Matter in Home Assistant.
If the device is already in Apple Home, you need to put it in Pairing Mode.
You do this, by opening up the devices settings, scrolling to the bottom, and click on "Pairing Mode". It will then provide you with a code that you will use to add it to Home Assistant, or any other Matter Controller.
For this next section, you MUST use the iOS Home Assistant Companion app, as it has the necessary ability to talk to Bluetooth. Then in HA you Add a new Device, select Matter. It will ask you if it is new or already in use. This question doesn't really matter except to tell you to put the device in pairing mode and then put in the code.
It will then add the device. Here you can see an Ikea bulb which, actually, is Matter over Thread. The actual adding of a device process is the same no matter what underlying technology you use.... I just didn't have any Matter of WiFi devices to add to take screen shots.
And you'll now see the device in Home Assistant.
Comments
Post a Comment