[DTH] Issue editing device presentation

I have a question/problem related to this, which I think I would be able to figure out if the documentation was better. A lot of fragmented information and old/new solutions that just partly work atm.

The question/problem is:
I’m trying to modify a Develco/Frient/Cavius device handler for a smoke detector (SMSZB-120), and want to add the different capabilites it has. I’m trying to add temperature measurement and IAS WD but I’m not able to get any additional presentation in the device details. I only get the presentation that was initially present (alarm status and battery).
Is there some restriction on the amount of capabilities you can have for one device handler?
Is there some place the different presentations for the capabilities is explained in detail?

Welcome to the SmartThings Community, @stekre!

Are you referring to a DTH in the Legacy platform (Groovy)?

The capability temperatureMeasurement has a presentation so, it shouldn’t cause issues. You can query the capability presentations with this CLI command:

smartthings capabilities:presentation capabilityId -j
//For example:
smartthings capabilities:presentation temperatureMeasurement -j

The capability you’re referring to is “alarm” right? It also has a presentation, so, there shouldn’t be issues either.

No, but in the case of DTH, once you’ve installed a device using it, the device presentation is cached, and even though you’re updating the configuration, it will remain the same until you create a new one.
You can make a copy and change its name.

You can verify if a capability has a presentation and its content using the command above.
About the details of its properties, you can check the following docs:

  1. Capability presentations.
  2. The API reference - presentation endpoint (capabilities)

In this case, those are for reference only and understand presentations. We can’t modify the presentation of a stock capability.

Thanks for the quick reply. You do a good job filling in the gaps in the documentation :slight_smile:

I’m currently using DTH from the Legacy platform because I couldn’t figure out how to change the configure and parse functions on the new platform (Edge). Maybe it’s possible on the Developer Workspace, but there you need an organization for a hub connected device handler.

I guess the alarm capability can be used. The device has support for Zigbee IAS WD – Cluster id 0x0502 to “manually” activate the alarm in the smoke detector. I would like to add a button in the presentation to test the alarm.

I tried copying the DTH and then I got changes in the presentation view. So every time I would like to change the presentation I need to create a new DTH? Has this always been like this or is it because of the transition to Edge and not using the tiles configuration in the DTH anymore?

To develop with Edge you don’t need the Developer Workspace, or an Organization registered.
The only things you need are:

  • A compatible SmartThings Hub. The ones fully compatible so far are V2 and V3 Hubs (with firmware v43), Wi-Fi Hubs are currently receiving the firmware update that will make them compatible.
  • Install the SmartThings CLI

In Edge, if you register for the default handlers of the capabilities, you don’t need the configure function because it’s done automatically. If you want to override that config, you can define the doConfigure lifecycle and define your own.
About the parse() method, now, you can define Zigbee handlers for attributes or clusters, the first being more specific than the second one.
However, if you register to the defaults, messages are handled automatically as well.
There is a tutorial that can help you out:

Also, you can take a reference from the drivers released by SmartThings in this repo, there might be one that you could use only by adding your device’s fingerprint.

Do you know the corresponding commandID and how it works? Could it be 0x00 - StartWarning?
Then, I don’t think “alarm” will work, you would need to use another capability, like “momentary” capability which allows you to push a button.
The function needed to receive the command is “push()”. For example:

//format for the Groovy handler
def push(){
zigbee.command(clusterID, commandID, optional_payload) 

Yes, if you want to see the changes immediately, I don’t remember the exact time it took for the auto-refresh, I think 12 hours.

Since we were able to manipulate more of the device presentations, we noticed that issue, and the only way around it was creating a new DTH or waiting for the auto-refresh but the last one wasn’t so reliable. So, it’s not due to the migration from Groovy.