How can I change the display order on device details view?

Trying to work on an Edge driver.

I have some custom capabilities displayed in the details view and they are not in a great order by default. For example, it is a dimmer and the dimmer slider gets pushed way down into an imaginary group with some LED settings, I want it to be towards the top. Some of the FYI info is at the top, but I want it on the bottom since it is less useful.

I have gone over a lot of the docs. They seem to be partially old info and some updated info which makes this even more confusing.

I was able to use the CLI/API to download the existing and also a default device-config, make edits and publish a new one. I changed the device profile (yml file) to point to the new presentation ID (vid). The order by itself in the presentation seems to be ignored, they still just show up in a somewhat random but organized fashion. I have no idea how it is deciding what order to show things.

I tried using different component Ids in the device-config and pushed that up. This just made anything not designated to ‘main’ disappear. I then realized that the profile needs to have matching components ids.

So next, I tried breaking things out into separate component IDs in the profile, leaving the switch and switchLevel in ‘main’. I abandoned the custom presentation I had set allowing the system to generate one automatically.

Success finally, or so I thought. The items are grouped into the sections I set now, however only the things in the “main” id are actually functional. The items in the other groups are just grayed out with a - and I am getting the pop up at the bottom saying “This device hasn’t updated all of its status information yet”.

I made getting to this point sound much easier than it was, I left out all the gory details of multiple trial and errors over ~4hrs due to very vague and confusing documentation. It is especially frustrating when the app just tells me it cannot connect to the device at this time, with no real way to determine what its actual problem is!

What the heck am I doing wrong now? Why is this so complicated?

(This is not public open source code so I am hesitant to post examples, hoping someone else had the same struggles and can point me in the right direction. I could redact some info and post part of the profile if really needed).

1 Like

This happened when I forgot to run

smartthings capabilities:presentation:update <file>

… when I made changes. And sometimes I had to wait a minute until it was really updated in the cloud.

I’ve heard that the order in the detail view isn’t really customizable anymore, but I could be wrong.

Hi, @jtp10181. Welcome to the SmartThings Community!

This error appears when you’re not initializing the capabilities.
As you mentioned you broke them down into different components, you also need to change the command you use to initialize them to define the component they belong to. See the sample of “my_multi_component_device”:

https://developer.smartthings.com/docs/edge-device-drivers/capabilities.html#capability-events

About the order, this was previously reported, I’ll ping the team again there. But, could you provide the following info, please?

Note: You can send me a DM to avoid sharing that publicly

  1. Your presentation ID
  2. Screen captures of the order you see in the app
1 Like

I am not trying to update a capability presentation, I am trying to update a device presentation. There is no way to update these, only create new one as far as I can tell. I used CLI command presentation:device-config:create

Ok I thought it might be something like that but could not find it in the existing code without knowing what I was looking for (this is my first Edge driver modification attempt). I am trying to avoid making a bunch of source code changes. I am mainly updating profiles and settings, and I also want to change the layout/order in the details view. I will send you the other details via PM later today.

Is the order of the capabilities in the presentation definition supposed to be honored in the details view or does it re-organize them on its own? Or does the actual capability presentations have something to do with the order/grouping? Maybe I need to download and inspect the capability presentations, I have not looked at those yet, they were already created by someone else.

1 Like

Continuing the conversation based on the info provided:

We observed the capabilities are ordered based on their display type. For example, the ones @jtp10181 sees at the top are all of type “state” and so on.
But the engineering team hasn’t provided more information about that. I already asked them based on your post and the info provided as well.

In the previous report about this, we asked the team to let us know if this is an expected change and if so, to help us correct the current documentation but there’s no feedback so far.

Once I get more info, I’ll let you know. But, AFAIK, you’re doing everything you should to control the order.

I looked and looked, the only things I can find being initialized are switch and switchLevel. The custom commands/capabilities are not initialized anywhere. Maybe the states are in a round about way but the command drop down menus are not being set anywhere. I am guessing the commands with the drop downs have something in the capability presentation linking them to the ‘main’ component group.

I guess I give up on this quest to make it look right, its just going to do whatever the app feels like for now. Way too complicated for something that should be very simple. Not worth my time since I don’t even use this platform for myself.