I recently started exploring and testing the SmartThings API,
and I’ve made some great progress in fetching platform capabilities, rooms, devices, and controlling their status. However, I’ve encountered a challenge when it comes to querying each device capability and its syntax.
Currently, I’ve been manually matching capabilities using the capabilities reference documentation provided by SmartThings
(Production Capabilities | SmartThings Developers).
I extract the capability information from the response, like:
“capabilities”:[{“id”:“contactSensor”,“version”:1},{“id”:“temperatureMeasurement”,“version”:1},{“id”:“threeAxis”,“version”:1},{“id”:“accelerationSensor”,“version”:1},{“id”:“battery”,“version”:1},{“id”:“firmwareUpdate”,“version”:1},{“id”:“refresh”,“version”:1}]
Although this approach works, I believe there must be a more efficient way to accomplish this task. Is there a built-in method or API endpoint that can provide the syntax and details for each capability?
Additionally, I noticed the “presentation” call, which appears to break down every control and field required for feedback and control. However, I’ve noticed that not every device has a valid presentationID. Am I overlooking something obvious here?
Anybody interested in the development of a Microsoft Store C# app feel free to join the very informal Discord.