Incorporating Matter

I think that is a matter (lol) of product release cycles and little more. Check this out:

It’s hidden towards the bottom, but you’ll find a list of devices (lots of lights!) being updated to matter.
That’s mostly US based, but it will scale to us.

Does this mean we have to rush in any way? Of course not.
I fully expect to see someone buying a matter device, wants it exposed to openHAB, and the following week we will have a solution for it.
I see this community as a group of people who work their best when they have a problem in front of them to work on.

I also do not feel like matter is “here” yet, so yeah… we have time.

1 Like

Nearly. The issue is more likely you need to have the hardware at hand to properly develop a solution. It is possible to do this „remote“, without having the hardware, but this is really hard. I did this couple of times for Wemo devices not sold in the EU and the IntesisBox I am not using for my HVAC.
So we either have to find a developer who is willing to get those devices or find someone who is willing to provide them to a developer for implementation.

4 Likes

If there is a developer that is interested could they provide an idea of what hardware they would need to work on it? We could setup a bounty to cover the costs and those non-developers could put their money where their mouth is. :wink: I would certainly be willing to throw in a few euros towards it; although OpenHAB is open source I don’t think it’s unreasonable for developers to ask for loan of hardware or some help towards buying it.

  1. I’ve already been looking for smart stuff in Europe but I can’t find anything that interesting. The tapo plug I cannot find in amazon Spain, to basically ship it to someone willing to dedicate some of their time to this. the availability is scarce at best.

  2. no no, it’s part of the community effort. Be it bounties, providing hardware, offering moral support (or coffee. I’m always happy to buy coffee to any dev working on community projects. Or tea. Or beer.) heck, I’m not a programmer but I’ll do whatever I can to help.

Just to caution as this has burned us in the past. Donations to the openHAB Foundation cannot be used for this purpose. Some other fund raising platform would need to be used.

2 Likes

Good point.

FWIW I know that both Philips Hue API v2 bridges and HD Powerview Gen 3 gateways do support Matter. However as we already have OH integrations for those systems, the Matter integration is moot.

I took a peek at the Matter example for a Java controller. It’s NOT a Java example. It is a Kotlin JNI wrapper around the C++ Matter reference implementation for what I surmise is for Android.

Would wraping this in an OH OSGI binding be accepted? Reversing/Decompiling the Kotlin to Java and refactoring it to an OH OSGI JNI wrapper?

Wrapping the Matter C++ makes me :face_vomiting:
But the level of effort for a pure java implementation is daunting.

I think the Bluetooth binding does something like that. If I’m correct that means there is precedence. The challenge I think will be making it cross platform.

Hey guys, found something interesting over on AliExpress choice:

What I see is a 9 euro matter smart rgb bulb from zenismart with free shipping. Might be a good test case if anyone is willing to start looking at this matter thing.

Adding kotlin runtime library will increase weight of addon by significant amount. Yet it could be a smooth start for doing something. Making it an OSGi bundle may not be trivial, but definitely possible. We do have bunch of JNI libs such as rxtx/nrjavaserial and tinyb until it was maintained.

Was you able to confirm that library is functional?

Handling native libs in Java sucks, that’s something which looks much more compact in Python. :wink:

I have not tried

I have not tried. The only Matter device I have is an Apple TV 4k, which is only a border router.

Yale Assure SL locks, of which I have 2, is supposed to be getting a Matter module (~$50 usd) which is supposed to be able to replace my Zigbee module, the only item on sale is the full lock. I am constantly checking for the module to be available.

1 Like

Github slapped me with this one: GitHub - Samsung/ioter: Ioter released by Samsung is an open-source implementation of the Matter Thread Emulator. Looks like there is software emulator. Since Thread stack will result in a new net interface I suppose it might be possible to attach to it without a RF dongle. All examples in README.md point to phone making an action, which means that whole thing probably goes via wifi to emulator.

Sorry i have missed this thread for so long! I have been casually pursuing a matter strategy for a little while, its probably a good time to share what i’m thinking and how I plan to spend my free time.

this is very tl;dr , just warning ya…

So around Christmas I took a long weekend and was able to get a pure, non android build of the connectedhome (project chip) java client working, the basis of this can be found at https://github.com/project-chip/connectedhomeip/tree/master/examples/java-matter-controller, although i had to make a few tweaks.

While i did manage to get this working after a few long days, the road was not easy and it discovered many issues which ultimately led me to abandon using the main connectedhomeip (chip) project at all. Some of the issue i encountered:

  1. Thee project is painful to build, i mean really painful. I had to make several tweaks to the Make files to get this working, hand build several sub modules and dependent sub modules, and other build related changes, this is for the pure java version. Now, this could probably fixed with more time spent hardening the build and Make files, but thats no small feat. For anyone else who wants to try, I strongly recommend using their container (docker) based build system, trying to do it manually is difficult.

  2. Building anything in the project requires a full build of mostly everything…which is a lot! See point 3.

  3. The project is HUGE, the source alone is gigantic, by the time you download and build your working directory is over 20G+. This also means builds are SLOW…

  4. The project is not entirely cross platform, it really wants to run on unix/linux/android and not windows. Not a problem for my system, but thinking about this for our community it seems like an issue. Also not all architectures are supported for the sub projects or example applications. This of course can be fixed through changing the build system / Make files in most cases, but that actually proved difficult ( i had a x86 build, was trying to get arm working which was not supported in the java app out of the box)

  5. The actual Java example app was buggy and missing a lot of features. In fact i experienced many issues which seem to plague some of the other CLI and wrapper apps, so i was not convinced this was strictly an issue with the Java example app.

  6. Its not clear that the non core example apps and libraries will be maintained over time. Development is sporadic on them, the main focus of this project is really around hardware manufacturers and embedded devices.

So again, i left with a pretty bad taste in my mouth, the idea of trying to maintain an integration using a java wrapper around the main project was not something i was interested in doing, and i think would be a maintenance nightmare over time.

So, i started to look else where… and found another project written in pure Typescript.

This was interesting to me as we have a very high performance Javascript runtime engine in our core based on Graalvm. Looking more into this project reveled a lot of positives as a potential candidate…in fact i would say it almost seemed designed to be embedded and checked a lot of boxes for me. The main developer is actually a member of the ioBroker project, another home automation system.

  1. The code is clean, easy to read, easy to build, easy to run.

  2. The project is split into 2 modules, a pure Typescript core and then a NodeJS implementation which provides the native bits for running like network, storage and crypto. This is done in a clean and pluggable architecture.

  3. It implements both a server and client , so not only can we control matter devices, we can expose local devices to other matter servers (like Alexa, Google Home or Apple Home).

  4. Very, very active project

  5. I was able to contribute and have my first PR accepted quickly :wink:
    Implements ManualPairingCodeSchema.decodeInternal() by digitaldan · Pull Request #124 · project-chip/matter.js · GitHub , try that with the main chip project!

  6. The project has been adopted by the project-chip organization and lives in their github space, but is not run by the very big guys (apple, google, amazon, zensys) . This is actually a big deal, and really legitimizes the importance of this project, but still makes it easy to work with.

The lead dev and i have had a few conversations about this integration and he was very positive about supporting us and this use case, even suggesting we contribute a Java implementation to the project.

My plan is to get a proof of concept working, which requires loading the matter.js core along with a small sample typescript app and then providing it with Java implementations of the required network, storage and crypto , which so far seems very doable.

This is also still in the prototype / discovery phase, so of course lots could go wrong, and maybe it won’t work, but i’m optimistic about it.

The only thing holding me back right now is time. Life has become very busy for me and i have not been able to break away and work on openHAB related stuff which has been super disappointing.

24 Likes

You’re awesome, Dan. Per my earlier comments, this is exactly the scenario I’ve been hoping for: openHAB connecting to a Matter network over WiFi, while other border routers provide onboarding/access to Thread devices.

I will optimistically look forward to hearing more. :wink:

2 Likes

Have you gotten anywhere?
Do you have a repo started?
I would LOVE to collaborate!

1 Like

Well, i have a messy POC actually working and talking with Matter devices. I’m a little shocked its actually working, and working well !

25 Likes

Great news!
Any way to help? Maybe testing?
I was able to run matter-node.js and connect with devices from Alexa and Google Home ecosystems I have at home.
I also develop on OH (on Windows mainly)

That’s awesome, Dan.
I also have a few Nanoleaf devices that are supposed to work with matter and Development system where I could try out and provide feedback. Let me know if you need support.

Any progress on this?

Matter seems to have settled in, so it should be about time for openhab to incorporate it.

5 Likes