Custom Capability and CLI Developer Preview

Did you ever resolve this issue? I’ve got exactly the same problem, but can’t see the solution in this forum.

Oh that’s awesome! I had missed that. No official announcement I take it…

Did you add them in the same DTH?
Here’s a list I share a while ago that can help you with some issues with the device presentation.

As there’s a caching issue with the DTH (something that is being taken care of), I suggest you create a new one because sometimes, it keeps using the previous presentation until de automatic refresh comes up. I used your pm10aqi capability in a device and the label appears correctly in conditions and actions:

1 Like

Hi, @aonghusmor. Our engineering team is reviewing this issue.
It only affects the view and the values selected for the thermostatMode are saved correctly in the ST API. You can verify this by checking the status of your device.

Hi @navelyz . I’m the auther of a DTH, which I’ve been updating to work better with the new app. It all works, but I’m obviously reluctant to release the updated version until this bug/feature has been sorted.

Enum preferences with key/value pairs were working fine yesterday, but today they won’t save.

Example:

input "testEnum", "enum",
		title: "Test:",
		required: false,
		displayDuringSetup: true,
		options: ["Option1Key":"Option 1 Value", "Option2Key":"Option 2 Value", "Option3Key":"Option 3 Value", "Option4Key":"Option 4 Value"]
1 Like

@nayelyz @Brad_ST This is a significant issue. Today alone I have added three devices that now only have basic functionality at best since parameters are not being saved through the settings.

for the last couple of days the app has become even more unresponsive and unusable if that was somehow possible. well ST has achieved the unpossible.

why ST feels the need to have a community while keeping the community in the dark about what it is that keeps regressing the app month after month and release after platform release is a mystery.

whatever it is and whoever it is in “leadership” making these decisions responsible for the current state of the app certainly doesn’t seem to have built a platform or a community before.

4 Likes

Don’t less than 5% of users even use the IDE?
But they claim groovy is not scalable and they have to change everything on the back end to make it stable?
I don’t get it, which is it?
The new c2c integrations aren’t written using groovy, so how are the 5% of us using groovy code causing the instability?
I just don’t get it, the explanations that have been provided simply don’t add up. I’m starting to get fed up with the whole platform.

1 Like

all of the changes so far has been about obscuring the custom capabilities their presentation and device presentations scripts so that those don’t have to be shared for the corresponding devices to be used by the community.

that’s all one needs to know to understand the “community” they are serving.

Not this one. None of us ever asked for any of this.

Hi, @Luis_Mijares and @orangebucket
That’s clear now, thanks. In this case, you can open a ticket to Customer Support. There, you can present your suggestion or feature request, and give the corresponding details, such as what you’d like to see in the mobile app and an example Use Case.

Hi, there! To keep this thread on the Custom Capabilities topic, let’s follow-up on this conversation in the thread you shared above, please.

Anyone had any luck making modifications to presentation->automation json in the last couple days? Now that custom capabilities are showing up in the mobile app Automations tool, I’ve made some tweaks to my capabilities, but it’s been 24 hours and no changes are showing up. Could be it’s not fully functional yet?

Did you re-generate the VID after those changes? In your case, you need to edit the Device Profile and add the device-config file again (in case you modified the default configuration) and save it.
You can verify if your device is using the last presentation version by querying it using the VID, MNID, and device ID values, for example:

I have a number of similarly structured capabilities. I updated two capability presentations a few days ago and they appeared in the Automation actions eventually. It was a bit strange as one change appeared a few hours later but a second change to the same presentation made ten minutes later, plus another one made at the same time, didn’t appear until many, many hours later.

Yesterday I made the same changes to the other capability presentations. Not a sausage …

1 Like

I checked all my files and they all have the same VID currently. If I download the json from Device Profile UI page, it has the same VID as well.

When you say “regenerate VID”, how do I initiate that, exactly? Is it supposed to change when I upload a new file? The ‘new’ device config file that I upload already contains a VID; should I not be including that?

Sorry, what I meant by re-generate the VID is related to the steps below:

  1. Go to your device profile and click on edit
  2. Click on the UI Display tab
  3. If you downloaded this file previously, made some changes, and uploaded it again. Then, take that same file and upload it again.

  1. Click on Save

The file doesn’t have to change to upload it again, the VID will remain the same unless you delete/add some capabilities.
When we query the presentation (VID), we can see all the capabilities’ presentation compiled, and there we can verify if the changes made (label, display type, etc.) are now included.

OK yes, I had done all that. And if I download the device config file again and check the Automations section, it is what I expected, however if I create an automation IF condition for the device, the capability attribute (zonebypass) is not being shown. (The same capability is also used by another device and it shows fine for the other device.)

Should I have to delete and re-add the device?

Here is the Device Config json:

{
  "mnmn": "fE4b",
  "vid": "ST_69f2bc09-a48b-4857-84c2-06f3305a378c",
  "version": "0.0.1",
  "type": "profile",
  "dashboard": {
    "states": [
      {
        "component": "main",
        "capability": "contactSensor",
        "version": 1
      }
    ],
    "actions": []
  },
  "detailView": [
    {
      "component": "main",
      "capability": "healthCheck",
      "version": 1,
      "values": [],
      "patch": []
    },
    {
      "component": "main",
      "capability": "partyvoice23922.contactstatus",
      "version": 1,
      "values": [],
      "patch": []
    },
    {
      "component": "main",
      "capability": "partyvoice23922.zonebypass",
      "version": 1,
      "values": [],
      "patch": []
    }
  ],
  "automation": {
    "conditions": [
      {
        "component": "main",
        "capability": "healthCheck",
        "version": 1,
        "values": [],
        "patch": []
      },
      {
        "component": "main",
        "capability": "partyvoice23922.contactstatus",
        "version": 1,
        "values": [],
        "patch": []
      },
      {
        "component": "main",
        "capability": "partyvoice23922.zonebypass",
        "version": 1,
        "values": [],
        "patch": []
      }
    ],
    "actions": [
      {
        "component": "main",
        "capability": "partyvoice23922.zonebypass",
        "version": 1,
        "values": [],
        "patch": []
      }
    ]
  },
  "migration": true
}

Here is the capability presentation json:

{
    "dashboard": {
        "states": [],
        "actions": [],
        "basicPlus": []
    },
    "detailView": [
        {
            "label": "Zone Bypass Toggle",
            "displayType": "toggleSwitch",
            "toggleSwitch": {
                "command": {
                    "name": "setZoneBypass",
                    "on": "Bypass on",
                    "off": "Bypass off"
                },
                "state": {
                    "value": "zoneBypass.value",
                    "on": "Bypassed",
                    "off": "Not bypassed"
                }
            }
        }
    ],
    "automation": {
        "conditions": [
            {
                "label": "Zone Bypass Status",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "on",
                            "value": "Bypassed",
                            "type": "active"
                        },
                        {
                            "key": "off",
                            "value": "Not bypassed",
                            "type": "inactive"
                        }
                    ]
                }
            }
        ],
        "actions": [
            {
                "label": "Zone Bypass Status",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "on",
                            "value": "Bypass on",
                            "type": "active"
                        },
                        {
                            "key": "off",
                            "value": "Bypass off",
                            "type": "inactive"
                        }
                    ],
                    "command": "setZoneBypass"
                }
            }
        ]
    },
    "id": "partyvoice23922.zonebypass",
    "version": 1
}

Yes, I used your capability in another device and I can see the Automations config in the app.

Also, the presentation already includes this section:

{
    "manufacturerName": "fE4b",
    "presentationId": "ST_69f2bc09-a48b-4857-84c2-06f3305a378c",
    "mnmn": "fE4b",
    "vid": "ST_69f2bc09-a48b-4857-84c2-06f3305a378c",
    "version": "0.0.1",
    "dashboard": {
        ...
    },
    "detailView": [
        ...
        {
            "capability": "partyvoice23922.zonebypass",
            "version": 1,
            "label": "Zone Bypass Toggle",
            "displayType": "toggleSwitch",
            "toggleSwitch": {
                "command": {
                    "name": "setZoneBypass",
                    "on": "Bypass on",
                    "off": "Bypass off"
                },
                "state": {
                    "value": "zoneBypass.value",
                    "on": "Bypassed",
                    "off": "Not bypassed"
                }
            },
            "state": null,
            "component": "main"
        }
    ],
    "automation": {
        "conditions": [
            ...
            {
                "capability": "partyvoice23922.zonebypass",
                "version": 1,
                "label": "Zone Bypass Status",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "on",
                            "value": "Bypassed",
                            "type": "active"
                        },
                        {
                            "key": "off",
                            "value": "Not bypassed",
                            "type": "inactive"
                        }
                    ],
                    "value": null
                },
                "exclusion": [],
                "component": "main"
            }
        ],
        "actions": [
            {
                "capability": "partyvoice23922.zonebypass",
                "version": 1,
                "label": "Zone Bypass Status",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "on",
                            "value": "Bypass on",
                            "type": "active"
                        },
                        {
                            "key": "off",
                            "value": "Bypass off",
                            "type": "inactive"
                        }
                    ],
                    "command": "setZoneBypass"
                },
                "component": "main",
                "exclusion": []
            }
        ]
    },
    ...
}