Custom Capability and CLI Developer Preview

Hello @SZaf,

For the DTH update, you could try the workaround of changing its name instead of creating a new device. We mentioned above that the device configuration presentation is cached, so you can also try the workaround mentioned there.

As for the available displayTypes, currently, the list is fixed, if you want to see the presentation of a predefined capability, you can use the command below to visualize the configuration in JSON format.

smartthings capabilities:presentation capabilityName -j

1 Like

Thank you @nayelyz

One more question: I couldnā€™t find any documentation regarding icons.
Below is a section from the switch capabilityā€™s JSON under dashboard. Is the ___PO_CODE_SMARTTHINGS_DREAM_SAC_SBODY_ON_T_SAMSUNG_CONNECT an icon?

If so, is there a list of all the icons for the new app, similar to http://scripts.3dgo.net/smartthings/icons/ (that is used in tiles)?

ā€œalternativesā€: [
ā€œkeyā€: ā€œonā€,
ā€œvalueā€: ā€œ___PO_CODE_SMARTTHINGS_DREAM_SAC_SBODY_ON_T_SAMSUNG_CONNECTā€,
ā€œtypeā€: ā€œactiveā€

Hi @SZaf,
No, that value in the switch capability is not an icon, is part of the conventions of the predefined capabilities.

Hereā€™s a list that was shared previously in this thread. You can use these values in the device profile metadata, for example:

{
  "name": "deviceIconTest",
  "components": [
      {
          "label": "main",
          "id": "main",
          "capabilities": [
              {
                  "id": "capabilityID",
                  "version": 1
              }
          ],
          "categories": []
      }
  ],
  "metadata": {
      "deviceType": "Fan",
      "ocfDeviceType": "oic.d.fan",
      "vid": "xxx-xxx-xxx",
      "mnmn": "SmartThingsCommunity"
  }
}

Is there an ETA to fix these issues? Itā€™s been 23 days since I reported bugs with the toggleSwitch, list and custom child components, while I appreciate the reproduction and submission of the bug reports, however without a fix I donā€™t see how to move forward.

2 Likes

Hello, @RBoy

Following-up on this issue about setter commands from custom capabilities supporting the list display type, here are some IDE logs where the key has been sent as argument instead of the value specified at the capabilityā€™s presentation.

As mentioned before, this would be impacting the flow-control of command handlers. For example, where I could be handling commands as following:

def setTodo(String arg) {
    	sendEvent(name: 'todo', value: arg)
}

Iā€™m forced to do this:

def setTodo(String arg) {
    if (arg == 'Do copy'){
    	sendEvent(name: 'todo', value: 'copy')
	}
    if (arg == 'Do paste'){
    	sendEvent(name: 'todo', value: 'paste')
    }
    if (arg == 'Do cut'){
    	sendEvent(name: 'todo', value: 'cut')
    }
}

@erickv a couple of things:

  1. Iā€™m not seeing this happen on iOS. The command is never called in the IDE when the command is invoked on the UI.
  2. As of this week, the UI isnā€™t updating at all on the mobile phones. The same control is showing different UI components on Android and iOS. My iOS is stuck showing a state in the detailView where as the Anrdoid is showing a stepper. The presentation file is set to a list
"detailView": [
        {
            "label": "Arm Mode",
            "displayType": "list",
			"list": {
                                     ...

The VID is 7c7c3ec0-db88-3fc2-b498-d4135a2a22dd

iOS (v1.6.49-413)

Android (v1.7.50-21)

Iā€™ve logged out and logged back into the mobile app itā€™s still completely disconnected from reality. Iā€™ve deleted the capability completely and started over and everything is still disconnected from each other.

In short, the whole thing is a mess and nothing is working as directed/documented or even in sync with each other. I donā€™t know the iOS, Android and VID are showing controls which are completely different from each other?

@nayelyz

thank you again. Regarding the icon, can you change the DTH presentation icon with the iconURL parameter rather changing the device profile? In the api I noticed ā€œpreloadā€ suffix before the URL which I didnā€™t find any explanation for.

I tried ā€œiconUrlā€: ā€œhttp://cdn.device-icons.smartthings.com/Appliances/appliances11-icn@2x.pngā€ yet it didnā€™t change anything (I deleted the appā€™s cache as you suggested).

Am I doing something wrong?

On a different note, when I tried to update the device on the app by changing the deviceā€™s name there was an error. The device is a Child device and it seems like a bug in the app because it happened with other child devices that I tried. I had to delete the device and recreate it from the Classic App.

Iā€™m seeing this to. I have done a minor text change to my custom capability presentation. Itā€™s been 4-5 days now. The change has not been made yet, even though the cli reports the change if I check the presentation.

Iā€™m also seeing mismatch between ios and Android, even between devices using the same DH on Android.

Makes it very hard to test changes, you donā€™t know if the changes didnā€™t work or just hasnā€™t been updated yet

3 Likes

Hi @SZaf,
You can also set those properties in the DTH definition, for example:

metadata {
    definition (name: "DTH Icon", deviceType:"fan",ocfDeviceType:"oic.d.fan", ...) {
        ...
    }
}

You would see the icon of the sample below:
fan_icon

The workaround I mentioned to update the device presentation refers to changing the DTHā€™s name so the device can detect the last published version. Apologies for the confusion.

1 Like

@rboy Now all my custom capabilities does not display anything in the detail view anymore. Even on Smartthings own SmartWeather Station tile the capabilities have disappeared, only standard capabilities are displayed. They still show up in the history in new app. Both ios and Android. Have you seen anything similar?

2 Likes

Yea. The custom capabilities have disappeared! Only standard capabilities are displayed!

1 Like

Nice to know that itā€™s not only me.

Tagging @jody.albritton @erickv @nayelyz any info on this issue?

1 Like

I wonder if this is the same thing that is affecting the various 3rd party buttons/remotes as discussed here:

Same here. Custom cap disappeared after changing device type (Iā€™m not sure itā€™s related).

Hi, @cscheiene

Iā€™ve noticed this behavior as well, using either dth or device profiles. Also, Iā€™ve found that running the presentation:device-config:create command will return a 400 Bad Request status code for both device configuration types (dth and profile). This has blocked recreating any integration with custom capabilities.

Both issues have been documented and reported accordingly. Thank you all for sharing.

1 Like

At this point there is so much broken that itā€™s better to wait until the baseline is working again. Even the samples no longer work so itā€™s difficult to work on this as one doesnā€™t know if thereā€™s an issue with the configuration or the platform is having trouble. Iā€™ve lost count of the number of issues reported with the new app (across the board), hopefully weā€™ll start seeing issues being fixed faster than being reported. I know that there is focus to make some progress on this over the next few weeks so Iā€™m going to wait till we get a green light to proceed again.

2 Likes

We are aware of issues with custom capabilities and are actively working to resolve them. We will make updates that might be breaking changes during this developer preview, but once things return to baseline the instructions should be valid once again. I will keep posting updates to this thread.

3 Likes

@jody.albritton this changes are happening in prod not dev, unless entire SmartThings is dev preview.

@milandjurovic71 custom capabilities are released as a developer preview in our production environment. The only way we can do beta testing with our external developers today, is in the production environment.

1 Like

Before telling users to migrate to the new app, wouldnā€™t it be better to make sure it works first? to have your own beta testers to make sure the new app is functional before you release it to the masses? I think youā€™re going about things the wrong way around.

2 Likes