Custom Capability and CLI Developer Preview

Hello.
Any updates with capability presentation caching issue?

2 Likes

Also wondering this. Everything is a mess for me after the custom capabilities came back. The only good thing is that units is now displayed in the detail view. :stuck_out_tongue_closed_eyes:

1 Like

I made a bunch of junk capabilities last night to try to see which display types are/aren’t working. I only tested a couple in the dashboard, but got everything except stepper (which seems to have bigger issues) to show in detailView. Live logging is really acting up, but I think below is accurate. I didn’t get into alternatives or anything else too crazy - just seeing if they’d render, display data, and trigger a command.

  • list: Displays and triggers command in detailView. It seems like the issue with key and value being swapped has been resolved.
  • numberField: Displays and triggers command in detailView.
  • playPause: Didn’t test.
  • playStop: Didn’t test.
  • pushButton: Displays and triggers command on dashboard. Displays in detailView but does not trigger command.
  • slider: Displays and triggers command in detailView.
  • standbyPowerSwitch: Displays in detailView but does not trigger command.
  • state: Displays on dashboard and detailView.
  • stepper: Displays and triggers command in detailView. Documentation shows command in the wrong format - should be “command”: { “name”: “function”},
  • switch: Displays in detailView but does not trigger command. Rendered as a sliding toggle in detailView, which I think should be the toggleSwitch based on the docs.
  • textField: Displays in detailView but does not trigger command.
  • toggleSwitch: Displays and triggers command on dashboard. Displays in detailView but does not trigger command. The docs say this should be a sliding toggle, but it rendered as a pushButton on the dashboard and an on/off switch in detailView.
4 Likes

Also doesn’t trigger commands in detailView
and the presentation isn’t updated (it remains cached)

There are many other issues (like static and dynamic values aren’t being restricted as per the configuration JSON) which have been reported but these (@philh30) are the critical one to get started.

1 Like

My experience is that when you pick something from the list, it immediately displays the alternative that was picked. When you then change it via sendEvent, it shows exactly what you sent, not invoking the alternative. We might be saying the same thing.

I had the same issue as @orangebucket with state alternatives. When using one on the dashboard, it was consistently stuck on the initial setting. I’ve abandoned alternatives for now except on the action side of list.

I’ve seen that with toggleSwitch, but haven’t tested switch on the dashboard yet. Dashboard activates, and the text updates in both dashboard and detailView, but the icon on detailView never changes to reflect the new state.

1 Like

I’m trying to view the JSON for some of the stock VIDs not in the community mnmn. How can these be queried? For example, the following does not work and results in a not found error:

smartthings presentation generic-arrival SmartThings -j

odd… On the other hand, I just tested:
smartthings presentation generic-dimmer-power SmartThings

… and that does work. Is there a listing of the confirmed stock VIDs somewhere?

I think it may depend on which docs. According to at least one part of the REST API a ‘switch’ is a sliding switch and so is rendered correctly. The description is the same as for ‘standbyPowerSwitch’.

I first expected to see a two position sliding switch but the docs say a ‘button style switch element’ and that does make sense for certain interpretations of ‘toggle’ where the states of the attribute don’t really represent active and inactive, such as what we in the UK call a two-way switch.

I must revisit state as I’ve been getting blanks when I’ve tried it on new capabilities lately.

I had the Nodon Wall Switch DTH working in the previous version, and though I would get it “upgraded”. I would like it to be able to do work like the IKEA 5-button puck. Assigning a push action on the button details itself. But I have a hard time digging through the capabilities and understanding the new stuff.

Anyone have any pointers on what I need to add to make the DTH act similar to the IKEA puck? Right now you can’t really see much in the device, but I can of course still use the buttons in WebCore.

I took a quick look at a Nodon DTH. Is it something like a four button device with pressed/held on each, using the old buttonNumber in the event data fudge to differentiate between the buttons?

If so capabilities aren’t really an issue.
It just needs to be rewritten as a composite device with a child device for each button. It’ll probably still be able to use the button number for backward compatibility. The IKEA Button handler would be excellent for providing the basic structure.

1 Like

I am about ready to give up. I think I am starting to understand the flow of everything. I created the capability, then presentation, then generic device-config, and then specific. I have tried with multiple attributes and single attributes. I have tried with ‘stepper’ and with ‘slider’ display types. Nothing ever shows up in the new app except 'status: connected". I just don’t understand what I might be doing wrong. I have followed the process at the beginning of this thread with no errors reported. So far I don’t seem to be able to generate a device-config that actually displays anything. arghh.

I can make things show up in the new app using standard capabilities and not using the CLI at all.

Any further suggestions?

1 Like

Hello @mikedill24,

The issue with the pushbutton display type has been documented and reported. In this case, the lack of logs when trying to interact with it is because no commands are being generated. Our team continues working to have it fixed as soon as possible.

2 Likes

Hello guys.
I made a new presentation based on this example.

The problem is that in dashboard, I don’t see anything to be appeared on the device icon and in detailview I get only the value displayed.
Is something to do with caching issue? I’m on iOS

Also , why these are two statements of

attr.unit

both specified on “label” and “unit” on detailview?
Thanks

I note that the dashboard tile state is now working with alternative text. I shall do a small happy dance while getting a belated breakfast.

3 Likes

Any ETA on when switch and toggleSwitch commands will start working in detailView?

3 Likes

On the latest vids I have created, the ordrer of the capabilites are actually reflected back in the mobile app. Anyone else seeing this or was it just some lucky coincidence? :stuck_out_tongue_closed_eyes:

This is a great summary. Will you keep it updated as people give some report ?
In my case, I am having problem with textField just like as you mentioned and with usage of multiple attributes in a single capability. It just shows up the first attribute.

In my testing, multiple attributes are ok in a single capability. Multiple displayTypes are not. If you try to include multiple displayTypes in detailView, only the first will show.

This was one of the improvements I saw after the hiatus. Glad to see we have control over order.

I was hoping we’d have some sort of update from ST staff, but barring that I think it’d be great if we can all share info on what we’re seeing. There are already too many people spinning their wheels hitting the same roadblocks. If anyone has updates, please post.

4 Likes

I’m stuck and any advice would be greatly appreciated. My token is correct, but obscured here.

smartthings presentation:device-config:generate ac458e5c-ae50-430b-bc20-7c9165ac25be --dth -o=deviceConfig.json -j --token blahblahblah

[2020-08-25T12:40:06.369] [ERROR] cli - caught error Error: Request failed with status code 500: {“requestId”:“BB755EA9-04C8-44FF-8803-3763B2A74E65”,“error”:{“code”:“UnexpectedError”,“target”:null,“message”:“Error generating device configuration”,“details”:}}

My device handler is here

Here is the json I used when creating the capabiliity.
{
“dashboard”: {

    "states": [

        {

            "label": "{{pressure.value}}"

        }

    ],

    "actions": [],

    "basicPlus": []

         },

"detailView": [

    {

        "label": "Pressure",

        "displayType": "state",

        "state": {

            "label": "{{pressure.value}} {{pressure.unit}}",

            "unit": "pressure.unit"

        }

    }

],

"automation": {

    "conditions": [

        {

            "label": "Pressure",

            "displayType": "numberField",

            "numberField": {

                "value": "pressure.value",

                "unit": "pressure.unit"

            }

        }

    ],

    "actions": []

},

"venturecircle58707.pumpPressure",

"version": 1

}

Looks like you should be referencing the the custom capability here.