openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.56k forks source link

[Feature request] Support to Matter standard #10761

Open mhalano opened 3 years ago

mhalano commented 3 years ago

It was released a few weeks ago the Matter standard (previously known as CHiP standard). This standard is made to integrate smart home components and it's backed by big companies, like Amazon and Google. I think it would be nice to have integration with this standard so OpenHAB could be a better smart hub, providing support for newer technology. Useful links:

kaikreuzer commented 3 years ago

Is there enough public information available to build anything for it? Would you be willing/interested to look into implementing such a binding, @mhalano?

mhalano commented 3 years ago

@kaikreuzer I don't know the standard well enough to say if a binding is enough for this standard specifically. Actually I just think this standard will become the standard de facto for interoperability between smart devices and I guess would quite cool if people could have support for it with OpenHAB. But maybe we need some time to check how other smart hub providers (commercial and open ones) address the support to this technology.

kaikreuzer commented 3 years ago

Yes. I think as soon as there are matter-compatible devices on the market and client apps that support it, it will be natural that someone will start looking into support in openHAB in both directions (i.e. as a binding to control matter-devices and as an IO-bundle to expose items from openHAB to matter clients).

Skinah commented 2 years ago

I am watching the standard as it seems that all the Zigbee Allience members are moving in this direction, so it is sure to take off. Currently I have not seen any devices get released, once some cheaper devices get released to the market, I'm sure someone will pick this up.

wassfila commented 2 years ago

@Skinah Why wait for devices to be released, nRF-Connect sdk from Nordik alredy has app samples, so you can run them on dev kit, if you need a more realistic scenario, here's the world first fully open hw and sw Thread sensorTag, you can just order the hw yourself from a pcb manufacturer. I only worked on thread level and used text based udp, did not add the matter app layer yet though, but for matter over wifi, there are even some esp32 samples. https://www.homesmartmesh.com/docs/microcontrollers/nrf52/thread_sensortag/

Skinah commented 2 years ago

@wassfila Because I value family time and don't stand to gain anything by working for free. If I did stand to gain something of value then that would change and I would be all for getting support out ASAP, but for now we need to wait until I see a device that I want to purchase and trust to give access to my network.

scholzi100 commented 2 years ago

There seams to be some python/java controller api build into the reference implementation of Matter. Have a look at https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/python_chip_controller_building.md and https://github.com/project-chip/connectedhomeip/tree/master/src/controller/python/chip and https://github.com/project-chip/connectedhomeip/tree/master/src/controller/java

For someone who already developed a addon this should be relatively simple to integrate.

A official specification (obtained from some source) definitely would be required.

kaikreuzer commented 2 years ago

@scholzi100 I don't think it is so easy. Most code is C++ and the Java code you mention above is merely some wrapper for Android - so I wouldn't count on it to also work smoothly in an non-Android context. Besides this it means we would have to build the C++ code for different plattforms and include it in the binding. I hence see the major efforts in building a suitable Java library in the first place - I'd hope that the Matter/CHIP project would some day provide (= maintain, build and publish) this on their end.

MajorTwip commented 2 years ago

Bump. See https://www.home-assistant.io/blog/2022/05/29/matter-in-home-assistant-workshop-announcement/

kaikreuzer commented 1 year ago

The Home Assistant colleagues are building a Matter server (https://github.com/home-assistant-libs/python-matter-server), which is meant to run independently from Home Assistant, so that it can (and should) be used by others as well. It encapsulates all the Matter specific code and exposes its own features through a Websocket connection.

I could imagine that we write a binding, which connects through Websocket to this server. It would not be as simple as other bindings to install (as it would rely on the external server running as well), but it could imho be the best compromise, since packaging the Matter C++ code into the binding isn't that straight-forward either (as mentioned above). A positive aspect of using the Matter server would also be that it is a good opportunity for collaboration between our two communities.

kaikreuzer commented 1 year ago

and as an IO-bundle to expose items from openHAB to matter clients

A comment on this: From all I have learnt about Matter, such a feature won't be easily possible, at least when we are talking about integrating as a device into Matter fabrics from Google, Apple or Amazon. In such a fabric, devices need to come with a digital certificate that proves that they are certified Matter devices from a CSA alliance member company - this is something that openHAB cannot bring. The only option to operate as an "io bundle" would therefore be "alternative" Matter fabrics, like the one the Matter server would be establishing. So within our own fabric, we could make devices talk directly to each other, if that's a desired use case - but I think this would anyhow only be implemented as a second step. The binding would be more important for sure.

RalphSester commented 1 year ago

Hello, everyone,

meanwhile, Matter has been officially presented. The big players (Apple, Google, Ikea, Amazon) are currently rolling out their updates. From my point of view, the topic will now become all the more important for OpenHAB.

Are there any concrete plans how a Matter connection can be implemented in OpenHAB?

Otherwise, I see big problems in the next year or two if OpenHAB wants to keep its current supervisor function within the smart home world....?!

Otherwise, sooner or later all important devices will break away....

kaikreuzer commented 1 year ago

Are there any concrete plans how a Matter connection can be implemented in OpenHAB?

As outlined above: "I could imagine that we write a binding, which connects through Websocket to this server."

Afaik, this server is still under heavy development, but if you have time, feel free to already get acquainted with it and start a binding for collaborating on it.

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/matter-is-here-where-can-i-jump-in/140128/9

mvalla commented 1 year ago

In this project they are already translating the refrence C++ implementation to Node.js, with no native dependencies: https://github.com/mfucci/node-matter For example as a test you can run the Matter Node.js server, wire it to some exec command in your RaPi and discover On/Off cluster function with an Android phone that has Matter support already included in the OS. So apparently the certificate issue in this case is solved with local certificates/CA?

MichaelFink commented 1 year ago

Drive by comment: I've skimmed through the core specs. IIUC, a valid certificate isn't strictly necessary. In this case the users would just get a warning during the device commissioning process telling them that the device they are trying to add is not properly certified. So this shouldn't be a show stopper.

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/incorporating-matter/127907/19

mvalla commented 1 year ago

meanwhile the Matter implementation in Node.js has been moved to the official Project-CHIP (CSA - Connectivity Standards Alliance): https://github.com/project-chip/matter.js

lsiepel commented 6 months ago

@digitaldan is doing some good stuff on a matter PoC See here: https://github.com/digitaldan/matter.js-java