Looking for some Matter guidance

I'd like to write a Matter driver for the SwitchBot Hub Mini 2. It functions as a bridge device and exposes an endpoint for itself, and one endpoint for each device that it can control over Matter.

How would I go about writing a driver for this? Specifically:

  • How would the Hubitat hub identify the devices exposed by the SwitchBot hub? The SwitchBot hub shows these fingerprints:

fingerprint endpointId:"01", inClusters:"001D", outClusters:"", model:"SwitchBot Hub Mini", manufacturer:"SwitchBot", controllerType:"MAT" - this is for the hub itself

fingerprint endpointId:"04", inClusters:"001D,0039,0003,0101", outClusters:"", model:"SwitchBot Hub Mini", manufacturer:"SwitchBot", controllerType:"MAT" - this is for the one device I have connected to it (a door lock; notice cluster 0x0101)

The SwitchBot hub itself doesn't support any useful matter commands, so I'm more interested in the other devices connected to it. I'd imagine that I'd need to have a way to enumerate the endpoints and match each one's fingerprint with a driver... but I don't know how to do that.

@bcopeland or anyone else who can give me some pointers to get started?

1 Like

You can look at the Matter Advanced Bridge code.

SwithBot2 inbuilt temperature and humidity sensors should be working OK, but I did not succeed to make the locks working.