Presentations

Get a Device Presentation

Changed on

Get 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

get/presentation

Request

Query parameters

presentationIdstring required

System generated identifier that corresponds to a device presentation (formerly vid)

manufacturerNamestring

Secondary namespacing key for grouping presentations (formerly mnmn)

deviceIdstring

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'dashboard' | 'detailView' | 'automation'

view type

Headers

If-None-Matchstring ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

The ETag for the request.

Accept-Languagestring

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

manufacturerNamestring

Secondary namespacing key for grouping presentations (formerly mnmn)

presentationIdstring

System generated identifier that corresponds to a device presentation (formerly vid)

mnmnstring required

The name of the manufacturer

vidstring required

A unique identifier for the presentation of a device. This can be a model number on legacy device integrations, but also may be a system generated UUID based on a device's structure and display configuration.

versionstring

The version of the device presentation.

iconUrlstring

DEPRECATED: Please use iconUrl under icons property.

descriptionstring

To provide the explanation of the device configuration/presentation’s purpose or content.

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:devices was added to the endpoint's security scheme Bearer

    • info

      the security scope r:devices:* was added to the endpoint's security scheme Bearer