Production capabilities modify presentation

I’m stumbling through creating a custom device for media handling, and I’m stuck at the deviceConfig.json. I have the following value for my "detailView" property, but the UI in the ST App doesn’t reflect all of the capabilities I have defined:

  "detailView": [{
      "component": "main",
      "capability": "switch",
      "version": 1,
      "values": []
    },
    {
      "component": "main",
      "capability": "audioMute",
      "version": 1,
      "values": []
    },
    {
      "component": "main",
      "capability": "audioVolume",
      "version": 1,
      "values": [{
        "key": "volume.value",
        "range": [
          0,
          100
        ],
        "step": 1
      }],
      "group": "Volume"
    },
    {
      "component": "main",
      "capability": "mediaInputSource",
      "version": 1,
      "values": [],
      "group": "Input Source"
    }
  ],

And here is how it is showing up in ST App

The audioMute capability isn’t even showing up, and the Volume/inputSource both have (!) in their presentation. The only capability that is working correctly is the switch.

I have verified that the capabilities are being initialized on the device logs (I (1671745585:266) [IoT]: iot_cap_call_init_cb(1105) > Call init_cb for audioVolume capability for example), why aren’t they showing up correctly in the app?

audioMute is rendered as part of audioVolume when they’re both present, so that’s not something to worry about. Are you sure you’ve emitted events to set a valid initial value for each capability? Usually those exclamation points show up when an attribute hasn’t been set.

That makes sense about the audioMute and audioVolume working together. Thanks for that heads up. I will double check that I’m sending appropriate values.

Also, how do I change the inputSource and Volume group names?

Hi, @joecoolish!
According to the documentation, the property “group” is only available in the Dashboard view not the Detail View.

If you want to group capabilities, use components instead. But, as @philh30 mentioned some are grouped by default, we have seen in the past that capabilities in “proposed” states like mediaInputSource might have weird behaviors.

1 Like

Thanks for the info. So the inputSource label is static and unchangeable, unless I wanted to create my own custom capability?

See this example: