Skip to content

How to customize UI #1 (range)

Kwang-Hui edited this page Jan 19, 2021 · 3 revisions

Default UI Display configuration has created when Default Profile is created by Developer Workspace. This document describe how to customize UI - especially range of values.

  1. Prerequisite.
    Create Project → Create Device Profile (including Color Temperature, Switch Level capabilities for example) → Create Device Onboarding → Deploy to Test → Add Test Devices

  2. Downloading device_configuration.json
    Go to Project → Device Profile → UI Display tab
    Download device_configuration.json
    download device configuration

  3. Editing device_configuation.json file

    • find colorTemperature section at "detailedView", "automation / conditions", "automation / actions"
    {
      "component": "main",
      "capability": "colorTemperature",
      "version": 1,
      "values": []
    },
    • add range value - 3000~6800 on this example - for both command (setColorTemperature) and attribute (colorTemperature) at values array
    {
      "component": "main",
      "capability": "colorTemperature",
      "version": 1,
      "values": [
        {
          "key": "setColorTemperature",
          "range": [
            3000,
            6800
          ]
        },
        {
          "key": "colorTemperature.value",
          "range": [
            3000,
            6800
          ]
        }
      ]
    },
    • find switchLevel section at "detailedView", "automation / conditions", "automation / actions"
    {
      "component": "main",
      "capability": "switchLevel",
      "version": 1,
      "values": []
    },
    • add range value - 10~95 on this example - for both command (setLevel) and attribute (level) at values array
    {
      "component": "main",
      "capability": "switchLevel",
      "version": 1,
      "values": [
        {
          "key": "setLevel",
          "range": [
            10, 95
          ]
        },
        {
          "key": "level.value",
          "range": [
            10, 95
          ]
        }
      ]
    },
  4. Uploading device_configuration.json
    Check Use customized Device Configuration
    check use customized device configuration
    Upload edited device_configuration.json file
    upload device configuration

  5. Loading updated UI at mobile client
    Updated UI configuration will be downloaded to device automatically after some time (12~24 hours depends on system) You can force download UI configuration by refreshing AppData

    [Android/Galaxy client] Go to System settings → Apps → find "SmartThings" → Storage → Clear data → Launch SmartThings Applincation & Select Device Card

  6. You can find more information from below links