How to use the new Matter methods in 2.3.9 (getMatterEndpoint and cleansublsribe

Continuing the discussion from Beta Release 2.3.9 Available:

I have been looking for some details about the use of these two new methods provided in 2.3.9. Does anyone have sample code or knwo of a working example of both of them being used. I have done a few searches and have yet to come up with anything.

Mainly my qeustion is do they have any variables needed, or what is the proper way to use them. I have tried a few things and have yet to get a response from that gives me any data.

1 Like

@kkossev @bravenel @gopher.ny @bcopeland

Is there any documentation about how to properly submit these two commands. I found some examples in @kkossev code for the matter.cleanSubscribe() method, but I have yet to find anything for the matter.getMatterEndpoints() method.

I have tried a few things and many of them have created errors. Most recently I have this below to create a callable routine for it.

String getEndpoints() {
    if (logEnable) log.debug "getEndpoints()"
    String cmd = matter.getMatterEndpoints() 
    return cmd
}

Then in my initialize() method I have it calling that method like as a matter using the call below.

sendToDevice(getEndpoints())

That doesn't generate errors, but also isn't generating output/parse data.

I feel like it has to be something simple I am missing, but am just not seeing it.

It's synchronous replies back with a List<Map<String, String>>

Example:

    List<Map<String,String>> endpoints = matter.getMatterEndpoints()
2 Likes

Fabulous. Thank you..

Does that require a multi-endpoint device to provide any data. I tested it with a simple plug and got this.

Looks like the list is empty. No errors though

It is just added to a initialize method as shown below

def initialize() {
    if (logEnable) log.debug "initialize()"
    sendToDevice(cleanSubscribeCmd())
    pauseExecution(5000)
    sendToDevice(subscribeCmd())
    List<Map<String,String>> endpoints = matter.getMatterEndpoints()
    if (logEnable) log.debug "initialize() Endpoints are ${endpoints}"
}

I have sense also had this tested on a Multiendpoint device and got the same results.

That’s what it was meant for. This was built for the Matter Bridge driver

1 Like

Any Idea why we would get the same blank results on the device discussed in the below thread.

It has 3 or 4 endpoints depending on upgrades installed on it.

I was hoping to simply use the getMatterEndpoints() to help with managing the endpoints.

Switch the device to the “Device” default driver and click getInfo., You will see the fingerprints for the endpoints listed.. Paste it here and I can tell you why it isn’t working .

Here is the image that was provided in that linked thread with the fingerprints for the endpoints

There was another provided that left off endpoint '04' which is the temp sensor cluster of 0x0402 cluster as that is a optional item.