SmartThings Community

NotAcceptableError when trying to view device info via SmartThings CLI


(Jeff Rosenberg) #1

Hi everyone,

I’m trying to explore the SmartThings CLI, but I ran into an error pretty quickly. I’ve authenticated my account, and I’m able to successfully get information about my location:

$ st list location

NAME             LOCATIONID                          
My Location Name a37749ff-b815-4eb7-b8b7-96d8f3a2129e

$ st describe location --id "a37749ff-b815-4eb7-b8b7-96d8f3a2129e" 

{
  "locationId": "a37749ff-b815-4eb7-b8b7-96d8f3a2129e",
  "name": "My Location Name",
  "latitude": 45.######,
  "longitude": -93.#####,
  "regionRadius": 154,_emphasized text_
  "temperatureScale": "F",
  "timeZoneId": "America/Chicago"
}

Trying to get information on a particular device, though, leads to an error:

$ st list device

NAME                               DEVICEID                            
Motion Sensor                      23ccbb12-ae99-4bb7-936c-0b2467ef7d47
[...]                              [A list of about 100 other device IDs]

$ st describe device --id "23ccbb12-ae99-4bb7-936c-0b2467ef7d47"

Error: 406 - {"requestId":"81DAA5FE-3F26-42B5-9F75-13DBB730BF41","error":{"code":"NotAcceptableError","message":"Not acceptable according to the Accept headers.","details":[]}}

Nothing in the documentation indicates that I need to configure any sort of Accept headers to issue a command like st describe device, nor how I would do so via the SmartThings CLI. Does anybody know what I’m missing here?