I am working on an app (iOS, iPadOS & macOS (Mac Catalyst)) for a Home Automation device. I am using HomeKit APIs to access commissioned devices and provided APIs to get a MatterNodeID and then a MTRBaseDevice so I can query the device. Since the current APIs for accessing Matter devices this way do not support subscriptions I am using the readAttributes() method of the MTRBaseDevice to get information from the device. There can be significant lag time in these reads and I realize my network speed and congestion can contribute to this.
The time lag makes me wonder how readAttributes() obtains the data? Does the method query the Home hub which replies using cached data, or does the hub in turn query the device to insure it is providing the latest data? I am pretty sure all this communication goes through the hub because it works whether I am on the same network as the device or in a location far, far away.