How to read the value from request

When I try to use “read” function from " st.matter.clusters.BasicInformation.VendorID", it will constructs an st.matter.interaction_model.InteractionRequest to read this vendorID attribute. But how can I receive the value from the driver side.

Read functions create the read request that will be sent to the device with the send command, just like any other request. The device will eventually send a response and you’ll need a handler for that cluster and attribute.

However, since you want to know the vendor ID there’s no need to ask the device and wait for a response since SmartThings already stores that information in the device object. They use it in the matter sensor driver for instance and it’s:

device.manufacturer_info.vendor_id

3 Likes

I used read function to read the parent device(Matter bridge)'s vendor ID, which can select the parameter endpoint ID as 0.

If I want to know a devices(bridged device)’ parent device(Matter bridge) vendor ID, If I have a better way to realize it?