I can’t find the information about SmartApp development, such as some API’s usage.Help me!
you mean the developer docs?
knock yourself out - everything is up here: SmartThings Developers (samsung.com)
Thanks a lot!
Now I want to know how to query the history events on each device and sensor by a http request.
Thanks a lot!
Now I want to know how to query the history events on each device and sensor by a http request.I have created Personal Access Token,how to use it?
Please help me.
The events history is in a different endpoint, you just need the
locationId and use your PAT in authorization, here’s an example using Postman:
Thank you very much！It solved！
And there is another question that if I can get the location mode at certain time.
What do you mean by “at a certain time”? You can get the current location mode using the endpoint below and if you schedule this GET request, you can get the value at the specified time:
I mean that at a specific time, it may not be current.
ooh, so I don’t believe it’s possible, there’s no event history about modifications in the location mode…
Thanks a lot.
I have another problem, I don’t know how to get the source of an event. For example, the event that the light is turned on may be controlled by me through my mobile phone, or it may be triggered by SmartApp.So,I want to know the source of this event.
Where are you trying to find it?
AFAIK that is not possible, even using the SmartApp subscriptions, we don’t receive if the command came from the ST app or the API for example, when we use the command endpoint.
Those events are just categorized as
"sourceType": "DEVICE" because no matter where the event comes from, it is processed by the device the same way.