But I get the following error: StatusCodeError: 405 - {“requestId”:“CE6C3EBD-8708-4A1F-B07C-AD9CA2FF00F4”,“error”:{“code”:“BadRequestError”,“target”:null,“message”:“The request is malformed.”,“details”:[]}}
Not sure why it’s taking my request is malformed? Looks like valid and very basic JSON just to update the label of a device?
Nevermind - I’m an idiot. I was using POST instead of PUT.
1 Like
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
3
To the best of my knowledge, there is no functional API to update Thing labels (or most other properties, other than Attributes, which must be updated using a web-services SmartApp in turn issuing a sendEvent()).
SmartTiles does not allow “configuration” by 3rd party applications…?
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
4
So it worked?
I thought the V1API was deprecated. Documentation?
This is the error I’m getting now: StatusCodeError: 500 - {“requestId”:“5D83E19C-1BA5-4EA5-B04D-962EF23039BC”,“error”:{“code”:“UnexpectedError”,“target”:null,“message”:“A non-recoverable error condition occurred.”,“details”:[]}}
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
8
Not many of us have experience with the new API yet (myself included, obviously). You may just be encountering temporary instability.
Tagging @jody.albritton ; (though Samsung may have a new developer forum too???).
Thanks - I seem to be making progress and have gotten quite a few parts of the API to work now.
The point of all this is that I’m writing a Node-RED script that will query my Unifi AP for a particular client (say, my cell phone) and then it will update a virtual presence sensor in SmartThings to be present if I’m at home and connected to the WiFi.
So the place where I’m blocked right now is that I’ve created a virtual presence device and I’m trying to send an event using the events API (I think this is how I’m supposed to do this?) Here’s my code:
are you using the oAuth and refresh token or the personal access token? The PAT will allow you basic access to the API but then you need to get an oAuth/refresh token for handling interactions with devices/apps