How to Pick What Data Is Displayed In New App "Home View"

Hi Everyone,

I have read through a lot of documentation and I have not been able to find how you pick what is displayed in the “Main” view of the new app. I created a DHT to be able to read data from a Flair puck through the use of their API. I am able to get get all the information I like from the API and it displays correctly when in the details view. I am not picky of the order of how the capabilities tiles are displayed in the “details view” (once you click on the device), and I don’t need any custom attributes or custom capabilities, but I would like to be able to show a specific value while all devices are shown in the “Main” view. In this case, the temperature value. For some reason (randomly?) value displayed is the RH instead. I am thinking there is something very fundamental I am missing. I’ve read enough to understand I can’t use the “Tiles”, “main” and “detail” commands anymore (I think…). Can someone please point me in the right direction?

Here are some pics:

You can see that the main display is showing 47% instead of 74.9 dF

Thanks in advance,
Jose

What you’re looking for is the Custom Presentation and Device Profile. Specifically the Dashboard view.

It’s in beta and what you need is in this thread: Custom Capability and CLI Developer Preview

1 Like

Thank you for your reply. I read a little through the CLI reference, but I guess I thought it was more for custom capabilities and presentations as the names suggest. Is the plan to have to go through all those steps when you are using off the shelf capabilities? Maybe what I am talking about is considered a custom presentation ? Don’t get me wrong, I am not afraid of the CLI, but it seems like a lot to go through for having to tell the main view what value to display, no? Maybe there is a pre-existing VID someone can point me to that shows temperature in the main view?

Regards,
Jose

It probably does seem a bit of a faff, although once you are geared up to use the CLI it is a five minute job if there aren’t any custom attributes or commands around.

The above is a real example with a different use case.

The flow for ‘new’ integrations is to create a device profile, first defining a device type that leads to the icon used for the device, adding capabilities, then specifying which ones to use for the status and action on the dashboard tile. So that rather makes sense. This process is itself evolving, particularly in terminology, to better match the steps used with the CLI.

The Groovy device handlers are still based on the legacy architecture and so have to be retrofitted with support for the new UI. It isn’t pretty, but then I do wonder why the legacy UI was embedded in the device handler in the first place.

1 Like

Thank you for this reply . Can you point me to the steps I need to take to be able to get to the CLI? From what I can tell, I have to have Node.js working, then install the SDK, then install the CLI then I can run a few commands to get the dashboard view to look like what I want. Is this correct? I am willing to go through the steps, but I have not found documentation on how to get all that infrastructure working on my computer. How do I do all this?

Thanks,
Jose

The first post points you at the CLI. It is a tool worth having.

Thank you. As part of downloading the cli, I saw that it said it was dependent on the SDK which is dependent on node.js. Maybe I misunderstood. Is the CLI a stand alone thing?

Thanks,
Jose

Yes it is a good old-fashioned standalone command line executable.

1 Like

Thank you for your response. And thank you very much for being patient with me. Maybe I am missing something. For what I can tell, the CLI is not a stand alone thing, right? You have to install node and the sdk before you can use it, correct?

How do I install the CLI in windows?

Regards,
Jose

No, it is a single binary file. Nothing else is needed.

For Windows you download a zip file from GitHub and unzip it. You end up with a file called cli-win.exe or something like that which you are encouraged to rename to smartthings.exe.

That is what I was hoping for. Can you please point me to the binary? I fee stupid that I can’t find it.

Regards,
Jose

Don’t be. It is well hidden. You get directed to the ‘releases’ tab on GitHub. The actual downloads are hidden behind an ‘assets’ link for each release number, and the latest releases don’t have the executable builds.

Or …

https://github.com/SmartThingsCommunity/smartthings-cli/releases/download/v0.0.0-pre.8/smartthings-win.zip

1 Like

Thank you! I don’t think I would have ever found it without your help. I was looking at the latest pre-release. Very confusing.

Regards,
Jose

1 Like

I am getting closer now but no dice. When I run the cli command I get the following error: received “server_error” when trying to authenticate. I have tried a few times. Not sure what to do next…
Also, I found from the documentation ( https://github.com/SmartThingsCommunity/smartthings-cli/blob/master/packages/cli/doc/configuration.md) That there is a way to set up the cli to use a bearer token. How do I generate the token?

Thanks for all the help,
Jose

https://account.smartthings.com/tokens

Thank you for everyone’s help. I finally got it to work. The code works a little different from the examples, but it works nonetheless.

1 Like

I found release ‘pre 8’ identified as ‘pre 7’ and also spewed out a lot of json when creating a device presentation instead of the ‘pretty’ summary.

Yes, not having the pretty summary threw me off for a bit. Also, if you don’t change anything in the config file, the vid you end up with is the same vid you started with, at least for me. Also, I was not willing to wait 12 hours to see the change so I deleted the device and created a new one.

Regards,
Jose