Custom Capability and CLI Developer Preview

Yes, I generate the presentation sample file from my device handler, and create presentation with sample file by using cli. After then, the cli will output the ‘mnmn’ and ‘vid’, I update these ‘mnmn’ and ‘vid’ in my device handler. But it can not display correctly in smartthings new apps as my expectation.
Have I missed something?

Having the same issue with two custom capabilities I created also. Made them mid September and had everything functioning (a slider and a list) and now I get a network error, the setter command is not called.

Has this started working? I had submitted a this not working and it was acknowledged as a bug. Has it been fixed because I still don’t see it working here.

@bangali - Currently, the feature to display multiple attributes of a custom capability in the device presentation is not available and the future releases are not documented publicly. Once the feature is ready for release, the documentation is included in the announcement.

Thank you for your input @jking. I have replicated and reported this behavior to our engineering department and I will follow-up the progress of this fix for you.
As a workaround, you could use one capability you created in the past and update its definition and presentation according to your needs.

About VisibleCondition @RBoy, the implementation is correct, our engineering department continues working for this functionality to be effective, I have kept an eye on this as well.

2 Likes

any word on this?

thank you.

in device config need a way to show optional device cards in the detail view only when value of a device capability contains a value … any value.

feature extension request: please add “IS_EMPTY” and “IS_NOT_EMPTY” to methods to compare. alternately if there is another way to check device capability attribute in visibleCondition for empty vs not empty please advise.

for visibleCondition operator operator (string) Required

“CONTAINS” “DOES_NOT_CONTAIN” “EQUALS” “DOES_NOT_EQUAL” “GREATER_THAN” “GREATER_THAN_OR_EQUALS” “LESS_THAN” “LESS_THAN_OR_EQUALS”

The method to compare

thank you.

1 Like

I wrote this a day or so ago, having checked that it still seemed to be true. Yet just now I noticed that changes I had made to a capability presentation had appeared on live devices without my having done anything.

This is a bit embarrassing really as I didn’t want them to go live. There has been a leap from not being able to make the changes visible, to not being able to stop them.

Well, at least it’s different behavior? Small improvements?

1 Like

As long as I’m not imagining it.

4 Likes

So what I have are contact sensors that also have a custom capability that mops up two custom commands (to override the open and closed status). The capability presentation for said custom capability didn’t include any UI whatsoever because there isn’t anything that works yet.

Earlier this week I tweaked the capability presentation to include pushButtons for the commands and I created a test device. This was just to help me detect when things start working. So as you would expect it revealed two things:

  1. The pushButton displays but doesn’t run a command.
  2. You only get one pushButton even though there are two defined.

Now I would not expect that to appear in my actual Contact Sensor devices because the presentation hasn’t changed. Indeed here is an extract:

    "detailView": [
        {
            "capability": "contactSensor",
            "version": 1,
            "label": "___PO_CODE_SMARTTHINGS_DREAM_SAC_TMBODY_CONTACT_SENSOR",
            "displayType": "state",
            "toggleSwitch": null,
            "standbyPowerSwitch": null,
            "switch": null,
            "slider": null,
            "pushButton": null,
            "playPause": null,
            "playStop": null,
            "list": null,
            "textField": null,
            "numberField": null,
            "stepper": null,
            "state": {
                "label": "{{contact.value}}",
                "alternatives": [
                    {
                        "key": "open",
                        "value": "___PO_CODE_SMARTTHINGS_DREAM_SAC_SBODY_OPEN",
                        "type": "active"
                    },
                    {
                        "key": "closed",
                        "value": "___PO_CODE_SMARTTHINGS_DREAM_SAC_SBODY_CLOSED",
                        "type": "inactive"
                    }
                ]
            },
            "multiArgCommand": null,
            "component": "main",
            "visibleCondition": null
        },
        {
            "capability": "battery",
            "version": 1,
            "label": "___PO_CODE_SMARTTHINGS_DREAM_SAC_TMBODY_BATTERY",
            "displayType": "slider",
            "toggleSwitch": null,
            "standbyPowerSwitch": null,
            "switch": null,
            "slider": {
                "range": [
                    0,
                    100
                ],
                "step": null,
                "unit": "battery.unit",
                "command": null,
                "argumentType": null,
                "value": "battery.value",
                "valueType": "integer"
            },
            "pushButton": null,
            "playPause": null,
            "playStop": null,
            "list": null,
            "textField": null,
            "numberField": null,
            "stepper": null,
            "state": null,
            "multiArgCommand": null,
            "component": "main",
            "visibleCondition": null
        }
    ],

All I see there are a Contact Sensor and a Battery. Yet …

Screenshot_20201022-085945_SmartThings

So where has Matey soap bubbles there come from? I am getting that in every device that has that custom capability in its config, but it is NOT in the presentations now and it has NEVER been in them.

Next question is, how do I get rid of it sharpish? That is not my current capability presentation (I changed it back) and it is not in the device presentations. Quite a few punters use my handlers so they will be even more puzzled.

Update: The tile did disappear by itself eventually. However I couldn’t find a way to force the issue.

Don’t get me wrong, this is a game changer in many ways. It means we can push out oven ready handlers without exposing broken functionality. However it also means we have to be more careful in development and would need version numbering to be a real thing and not just an aspiration.

Just in case it is relevant, my mobile app has not updated yet, so if there is any updated functionality in this area, I don’t have it yet.

It may be cached over from the previous presentation. I noticed it still takes about 12 hours for it to update. It’s possible your last update happened close to the window where the platform probably flushes the presentation cache and hence it appeared to update instantly. The other option is to change the DTH the IDE and then revert it back, followed up a sign out/in of your ST mobile app.

The pushButton in detailView is still broken, it doesn’t’ send commands. It’s only been 3 months since it was first reported as broken. While the dev advocacy team does a good job of capturing bugs and opening tickets, I don’t see any urgency from the engineering team responsible for fixing the bugs, plus the new ST app isn’t compatible with iOS 14 and neither is anyone in a hurry to fix the iOS 14 compatibility issues which is shocking given that there’s only one app left to maintain now!

The second issue you pointed out is also a known bug where one presentation only renders the first control. Morgan earlier mentioned that they are aware of it and are working on eventually fixing it; so keep in mind that if you presentation has more than one control in it, while today it’ll render only the first control, at some point in the distant future when it’s fixed you’ll suddenly see more controls popping up. So my recommendation is either design it with one control per presentation and leave it be or have more than one control and just keep in mind that it’ll eventually show up one day.

1 Like

MUST. HAVE. SHORTER / FASTER. SPRINTS.

5 Likes

and CI/CD otherwise code’s just going to sit on the feature branch.

1 Like

Sorry about that, the intention has always been to have capability presentation updates cause the presentations to be updated / regenerated. The previous non-update was a bug, not a feature. Thanks for letting us know that it has now been resolved, sorry that you had some unexpected results as we got the fixes rolled out.

Keep in mind that we are still in active development based on the feedback of the community, and the inability to see the capability presentation changes in the resulting device presentation has been something we have gotten a lot of reports about.

Thanks again

2 Likes

This change is going to production this week. The generate endpoint will have no keys included.

Do you actually intend for this to look for an attribute value of empty string?

Morgan - is there ANY way you guys can get soemthing that resembles a roadmap posted? We’re not asking for proprietary info and roadmaps change all the time. We’re dying out here not knowing what’s planned / in / out / won’t fix and the schedule.

Done right: https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=

Of course I’d also like access to the bug data base (a’la Mojang’s Jira bug DB: https://bugs.mojang.com/secure/Dashboard.jspa) but I think we’d all settle for just knowing what’s planned and a GUESS at when…

5 Likes

This is a really reasonable request, and while I don’t want to speak for the organization at large, for this particular feature I am actually personally tracking the issues we have outstanding across the mobile, SDK, presentation, cloud, and device control teams.

Let me talk with my managers tomorrow and I think I can at least share out what we have in flight and when we expect it for the next few months. Some of these are bug fixes we are rolling in our weekly cloud deploys, while others (like automation view support for example) are parts of larger releases of the mobile client.

I’ll put something on the calendar for tomorrow and bring some info back if I can. Thanks for the push Nathan and we appreciate everybody’s vocal feedback as we iterate on these new features.

Regardless of what I get for an answer I wont end the day tomorrow without updating you all.

7 Likes

ideally any device attribute including strings.

my app manages rules driven rooms occupancy related automation based on a variety of devices, their sensor values and other settings. many of the devices that can be specified through the app are optional. the device config is setup so that all of the devices listed in the app display their current respective sensor values. however when an optional device has not been specified in the app i am looking for a configurable way via the device config such that that particular card is not “visible”.

if their is another way of doing this without creating a multitude of device configs please advice.

thank you.

@morgan.bridges the update is very welcome and I would be one of those that requested it, but it was unanticipated and the mechanism isn’t clear. The app displaying something different to what the presentation requests isn’t unusual as that is common with the standard capabilities, but having it display something that isn’t shown as being in the device presentations at all is.

I changed the capability presentation and the changes were eventually reflected in all the live devices using that capability without any further action on my part. That is great , albeit a little unforgiving if you make a mistake (but that is what testing is for).

The weird bit is when you ask the API for your device presentation and it doesn’t show the changes that are already live. Is that all playing catch up still?