Get a Device Presentation
Changed onGet a device presentation. If Manufacturer Name is omitted, the default SmartThingsCommunity will be assumed.
This endpoint currently supports automatic generation of UI-metadata only for those presentations created through the presentation APIs, and not custom UI-metadata created through the legacy workflow.
Note: This API functionality is in BETA
Request
- Base URLhttps://api.smartthings.com/v1
- AuthOAuth 2Implicithttps://auth-global.api.smartthings.comScopesr:deviceprofiles, mobile, service, r:devices, r:devices:*
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
System generated identifier that corresponds to a device presentation (formerly vid)
Secondary namespacing key for grouping presentations (formerly mnmn)
The ID of a device for which we want to load the device presentation. If the device ID is provided, no other fields are required.
view type
Headers
The ETag for the request.
Language header representing the client's preferred language. The format of the Accept-Language header follows what is defined in RFC 7231, section 5.3.5
Response
The device presentation
Example response
{
"mnmn": "SmartThingsCommunity",
"vid": "MySmartDevice",
"version": "0.0.1",
"iconUrl": "icon://example_icon_url",
"description": "The light device with power switch and dimmer",
"icons": [
{
"iconUrl": "icon://example_icon_url",
"runningConditions": [
{
"capability": "switch",
"component": "main",
"version": 1
}
],
"badge": [
{
"iconUrl": "icon://example_icon_url",
"visibleConditions": [
{
"capability": "switch",
"component": "main",
"version": 1
}
]
}
]
}
],
"dashboard": {
"states": [
{
"component": "main",
"visibleCondition": {
"component": "main",
"capability": "switch",
"version": 1,
"value": "switch.value",
"operator": "EQUALS",
"operand": "on"
},
"composite": false,
"transient": false,
"group": "main"
}
],
"actions": [
{
"component": "main",
"visibleCondition": {
"component": "main",
"capability": "switch",
"version": 1,
"value": "switch.value",
"operator": "EQUALS",
"operand": "on"
},
"group": "main"
}
],
"basicPlus": [
{
"displayType": "camera",
"camera": {
"image": {
"capability": "imageCapture",
"component": "main",
"version": 1,
"value": "image.value"
},
"overlayIcons": [
{
"iconUrl": "example_motion_icon",
"visibleCondition": {
"capability": "motionSensor",
"component": "main",
"version": 1,
"value": "motion.value",
"operator": "EQUALS",
"operand": "detected"
}
},
{
"iconUrl": "example_object_human_icon",
"visibleCondition": {
"capability": "objectDetection",
"component": "main",
"version": 1,
"value": "detected.value.value",
"operator": "EQUALS",
"operand": "human"
}
},
{
"iconUrl": "example_object_pet_icon",
"visibleCondition": {
"capability": "objectDetection",
"component": "main",
"version": 1,
"value": "detected.value.value",
"operator": "EQUALS",
"operand": "pet"
}
}
]
},
"tv": {
"volume": {
"capability": "audioVolume",
"component": "main",
"version": 1,
"label": "Volume",
"command": {
"name": "setVolume"
},
"step": 1,
"range": [
0,
100
],
"supportedValues": "supportedVolumes.value"
},
"buttons": [
{
"capability": "audioVolume",
"component": "main",
"version": 1,
"command": "mute",
"iconUrl": "icon://mute"
}
],
"channel": {
"capability": "tvChannel",
"component": "main",
"version": 1,
"label": "Channel",
"value": "tvChannel.value",
"command": {
"increase": "channelUp",
"decrease": "channelDown"
}
},
"directionalPad": {
"capability": "custom.remoteControl",
"component": "main",
"version": 1,
"command": {
"name": "send",
"up": "UP",
"down": "DOWN",
"left": "LEFT",
"right": "RIGHT",
"ok": "OK"
}
},
"visibleConditions": [
{
"capability": "switch",
"component": "main",
"version": 1
}
]
},
"light": {
"dimmer": {
"capability": "switchLevel",
"component": "main",
"version": 1,
"label": "Dimmer",
"command": "setLevel",
"value": "level.value",
"unit": "level.unit",
"range": [
0,
100
]
},
"colorTemperature": {
"capability": "switchLevel",
"component": "main",
"version": 1,
"label": "Dimmer",
"command": "setLevel",
"value": "level.value",
"unit": "level.unit",
"range": [
0,
100
]
},
"colorControl": {
"capability": "colorControl",
"component": "main",
"version": 1,
"command": "setColor",
"value": "color.value",
"color": {
"hue": "hue.value",
"saturation": "saturation.value"
}
}
},
"actions": [
{
"capability": "momentary",
"component": "main",
"version": 1
}
],
"stateBoard": [
{
"capability": "dustSensor",
"component": "main",
"version": 1,
"label": "PM10",
"value": "dustLevel.value",
"unit": "dustLevel.unit",
"colors": [
{
"color": "#47BCF5",
"operator": "AND",
"visibleConditions": [
{
"operator": "EQUALS",
"operand": "good"
}
]
}
]
}
],
"progressBars": [
{
"capability": "momentary",
"component": "main",
"version": 1
}
],
"panel": {
"items": [
{
"component": "main",
"capability": "audioVolume",
"version": 1,
"label": "Volume",
"displayType": "stepper",
"stepper": {
"size": "2x1",
"command": {
"name": "setVolume"
},
"state": {
"value": "volume.value",
"label": "{{volume.value}}"
},
"step": 1,
"range": [
0,
100
],
"supportedValues": "supportedVolumes.value"
}
}
],
"visibleConditions": [
{
"capability": "switch",
"component": "main",
"version": 1
}
]
}
}
],
"groupVisibleConditions": {
"capability": "switch",
"component": "main",
"version": 1
}
},
"detailView": [
{
"component": "main",
"capability": "thermostatCoolingSetpoint",
"version": 1,
"label": "Cooling temperature",
"displayType": "slider",
"slider": {
"range": [
0,
40
],
"value": "coolingSetpoint.value",
"unit": "coolingSetpoint.unit",
"command": "setCoolingSetpoint"
},
"visibleCondition": {
"component": "main",
"capability": "switch",
"version": 1,
"value": "switch.value",
"operator": "EQUALS",
"operand": "on",
"hideOnUnmatch": false
}
}
],
"automation": {
"conditions": [
{
"component": "main",
"visibleCondition": {
"component": "main",
"capability": "switch",
"version": 1,
"value": "switch.value",
"operator": "EQUALS",
"operand": "on"
}
}
],
"actions": [
{
"component": "main",
"visibleCondition": {
"component": "main",
"capability": "switch",
"version": 1,
"value": "switch.value",
"operator": "EQUALS",
"operand": "on"
}
}
],
"descriptions": {
"conditions": [
{
"label": "Sample description",
"visibleConditions": [
{
"capability": "switch",
"component": "main",
"version": 1
}
]
}
],
"actions": [
{
"label": "Sample description",
"visibleConditions": [
{
"capability": "switch",
"component": "main",
"version": 1
}
]
}
]
}
},
"dpInfo": [
{
"dpUri": "plugin://example_detail_page_uri",
"serverDpUri": "http://hosted_page_url",
"arguments": [
{
"key": "{{___PO_CODE_SMARTTHINGS_FLEX_OVEN}}",
"value": "FLEX_UPPER_OVEN"
}
]
}
],
"dpInfos": [
{
"stPluginApiVersion": "1.19.1",
"dpInfo": [
{
"dpUri": "plugin://example_detail_page_uri",
"serverDpUri": "http://hosted_page_url",
"arguments": [
{
"key": "{{___PO_CODE_SMARTTHINGS_FLEX_OVEN}}",
"value": "FLEX_UPPER_OVEN"
}
]
}
]
}
],
"presentationSettings": {
"temperatureConversions": [
{
"capability": "temperatureMeasurement",
"version": 1,
"value": "temperature.value",
"unit": "temperature.unit"
}
]
}
}Changes
- info
the security scope
r:deviceswas added to the endpoint's security schemeBearer - info
the security scope
r:devices:*was added to the endpoint's security schemeBearer
- info