[In progress] Implement all mandatory devices / clusters #45
Replies: 13 comments 29 replies
-
I would plan to do "MA-aggregator" and "MA-bridgeddevice" to basically add bridge support and the needed clusters for that ... then maybe more ... lets see soon |
Beta Was this translation helpful? Give feedback.
-
@mfucci In order to continue here I would need something on the "Cluster" instance. As defined by Core spec 7.13 cluster should/must have some global Elements. I think it makes sense to dd this as additional struct because it is the same for all clusters. Again some fileds mandatory, some optional. I would also propose to build the AttributeList automatically from the provided attributes, same pot for AcceptedCommandList ... or not ;-) In fact this would not start the discussion about how we implement Cluster logic. I propose to do this on example of the OnOff Cluster ... |
Beta Was this translation helpful? Give feedback.
-
If I understand well 7.13, those are attributes present on every cluster. I suggest to hard code them similar to what I did with the DescriptorCluster in InteractionServer#addEndPoint since the DescriptorCluster is present on every endpoint. In Cluster.ts, the global element definitions can be added and automatically added to any Cluster definitions in the Cluster function. On the controller-side: no need to do anything special since they will appear as normal attributes On the server-side: their values (which is static value as far as I understand) can be initialized in ClusterServer. Some trick should be done on attributesInitialValues type so an initial values for those attributes don't need to be set (just using Omit<> should work). |
Beta Was this translation helpful? Give feedback.
-
For OnOffCluster i need something more. When implementing the OnOffClusterServer i need a constructor style code because I need to register atterListeners on two attributes to implement logic as soon as such a value changes. How I should do that? Right now I can only add implememtation for the defined commands, but nothing more on the "instance" |
Beta Was this translation helpful? Give feedback.
-
Additionally, as already started to be discussed we need to think about how to access other clusters of the same endpoint.
Just two things I stumbled over already. The last idea to also give a refernce to such clusters ia a "config" of the Cluster would end in circular references and partially an issue what to initialize first. I know you wanted to separate things but my feeling goes into the direction that a cluster should know his "parent endpoint" and allows to access other cluster instances via (pseudcode) "this.parentEndpoint.getClusterInstancesOfType(SceneCluster) == [...]" or auch |
Beta Was this translation helpful? Give feedback.
-
Next thing (sorry that it is that much currently, but I hope we have all cases soon so that I can implement stuff on my own) :-) I started looking into the "Identify" Cluster. Here the question comes up how we want to have it. In fact when "identify command" is triggered a "timer" is started for X seconds to execute the "identify method". When timer is 0 then the identify method should stop.
I think option B makes sense, but requires additional "internal command listeners" that are not 1:1 to the cluster definitoon but "what makes sense". But way more convenient for the developer because all timing handling we do for him. What you think? |
Beta Was this translation helpful? Give feedback.
-
The GroupsCluster logic separates between "command was received as a unicast" and "command was received as a groupcast", so we need to transport this info (part of "request" params for the handlers or with an own "communication" struct?) to the handler calls. |
Beta Was this translation helpful? Give feedback.
-
Ok, I checked the relevant Devicetypes (Root, Bridged Node and Aggregator) and here is the result (optionals in brackets): Base Cluster Requirements for Matter
Root Node Cluster Requirements
Aggregator Node Cluster Requirements
Bridged Node Cluster Requirements
@mfucci I will now work to provide PRs for all relevant needed Cluster Specs from this list as discussed in our talk |
Beta Was this translation helpful? Give feedback.
-
Bridged Devices progress With my local development version I was able to pair a "two sockets bridge" with Google Home. The version is based on #192 and a followup change to InteractionServer. When doing this you will get a "Bridge"/"Aggregator" device and then the two devices For other systems maybe more is needed ...
|
Beta Was this translation helpful? Give feedback.
-
Nice work! Look forward to seeing it work. At the moment, using the main branch, I am unable to commission the node-matter device in either Google Home or in Alexa. I can only commission in SmartThings which is only minimally functional due to always sending the "on" command. |
Beta Was this translation helpful? Give feedback.
-
hopefully the right discussion group... Is there support for 'subscription' and 'subscriber interaction' in node matter Thanks. |
Beta Was this translation helpful? Give feedback.
-
Got a new weather station at home and thought it would be fun to display the current temperature with a node-matter "device" so I implemented the TemperatureMeasurement cluster. It's a very simple cluster - maybe too simple? Google Home and Alexa both start to pair but then both give a generic error at the end. Maybe they don't have support for a stand-alone Temperature device? SmartThings "succeeds" in pairing, but acts much like the on/off device - adds it, but crashes near the end and not functional - i.e. The temperature never shows (screenshot attached). Of course it's likely I haven't implemented the cluster correctly Thoughts? https://github.com/JimBuzbee/node-matter/tree/TemperatureMeasurementCluster |
Beta Was this translation helpful? Give feedback.
-
OK - Will create three new PRs, one each for Temperature, Illuminance and Humidity clusters, and then I'll see if I can figure out how to do a pull request git, Typescript, Matter, all new to me :-) |
Beta Was this translation helpful? Give feedback.
-
The goal is to provide a minimal implementation for all the mandatory devices / clusters as listed here.
Cluster status / contributors:
MA-rootdevice [In progress]: @mfucci, @Apollon77
MA-onofflight [In progress]: @mfucci, @Apollon77
MA-aggregator [In progress]: @Apollon77
MA-bridgeddevice [In progress]: @Apollon77
Beta Was this translation helpful? Give feedback.
All reactions