Custom Capability and CLI Developer Preview

@erickv @jody.albritton I’m getting an error every time I try to create a new device-config using only capabilities established since yesterday. I can create all sorts of permutations using the capabilities I created a few weeks ago, but I get the error below when the device-config doesn’t include an older capability. If I include an older capability, the device-config is created successfully but the presentation in the app skips the new capabilities and only shows the older one.

C:\Users\phili\Documents\SmartThingsCLI>smartthings presentation:device-config:create -j -i orpdevicex.json
[2020-08-14T08:14:38.758] [ERROR] cli - caught error Error: Request failed with status code 400: {"requestId":"E2C88F09-6A87-4111-A6BA-505D6BF4549E","error":{"code":"UnexpectedError","target":null,"message":"unsuccessful-http-call status=400","details":[]}}

I’ve gone so far as to create a capability with presentation (platinummassive43262.orpMeasurement1) that is an exact duplicate of one of my older, working capabilities (platinummassive43262.orpMeasurement). A device-config using only the old capability succeeds, using only the new fails, and using both succeeds. My best guess from the error that’s thrown is that the detailView section of newly created capabilities isn’t being recognized. I’m not getting the result I’d expect in the dashboard either when I create a device-config that uses both old and new with the new in the dashboard, so it’s probably more accurate to say that the new capabilities are being completely ignored.

Here’s the capability definition of old and new side by side (minus the closing brackets that fell off the bottom of the screen):

And here are the capability presentations side by side:

1 Like

Hello @mvevitsis,

Yes, we are currently working on this for an upcoming release.

1 Like

If you have the namespace and capability name, you can query on it with the same CLI commands as with your own. You can also see the official capabilities that way.

I have the same issue.
I get similar errors when I’m trying to create the device configuration

1 Like

Not near enough to block the need for custom capabilities today. Groovy devices are still going to be required for some time.

The hashing prevents the need for the platform to sustain multiple identical capabilities. Lot’s of people will have the same featured capability but call it a different name. The hash allows the platform to de-dupe capabilities.

With the CLI, if you know the namespace you can pull it’s presentation and config. You can dump it to YAML or JSON with flags in the command line.

3 Likes

So I am trying my best to make the most of this new platform but you are really pushing me away. I tried using a standard capability but it doesn’t work (see this post). So I thought I would try this CLI thing. No luck here either. First, I tried putting in everything I wanted and that failed. Then I tried a dry run (-d flag) and it seemed to work:

So then I tried for real but again, it gives me an error:

If you want us to convert, then you need to have working tools. You should delay the change-over until you have working tools or you will push me along with many others to a new platform. I am eyeing Habitat but would prefer to stick with SmartThings if you can actually keep it smart.
thanks.

4 Likes

Try creating without the -o and filename first. I haven’t tried that, so I don’t know if it’s allowed. You can always output to json after creating, so there’s no need to do it in one step.

The help said it was a valid option. Trying your suggestion. thanks.

Be warned… In my experience, any new capabilities created right now won’t show up. I’m able to make a capability and capability presentation right now, but I stall out when making a device-config. Need ST staff to chime in on the status of this…

Well, still getting the same error. I also tried putting values in for minimum and maximum but that didn’t help. I guess we need ST staff to chime in like you said. :frowning_face:

Check your capabilities. You could possibly be running to an issue with it being in the proposed state

"status": "proposed"

I am going to ping the engineering teams and ask the to clarify the error if it is hanging because of the status.

I had a feeling that might be the issue. The only thing I notice that doesn’t work is the display of the value in the dashboard view. The +/- buttons work and the value changes in the detailed view but I get the error popping up.

So, given it was in the proposed state, I tried going the custom route but the CLI also failed me giving the error above whenever I try to actually create a capability. In dry run, it seems to work fine and outputs the json.

So, I really hav two problems standing in my way of success on either path. At this point I would prefer the custom capability but I can’t make any progress.

This is driving me absolutely insane right now. I really want to get something working, and I can even deal with needing lots of trial and error, but if that is the case, I need the results of each attempt to show up immediately for this to be viable. I can’t be spending half my time wondering if the device actually refreshed my last change or not.

On a related note, I actually really love the progress made in the new app in general. I have switched over myself, and many things are much simpler. I hate that so many people are switching over and immediately getting a perceived bad experience when some of these custom devices are still broken because we haven’t gotten a good shot at fixing them first.

4 Likes

Absolutely, and to add to that …

In the last few days I have noticed:

  • Weird online/offline reporting problems. As I no longer see ACTIVE/INACTIVE reported in the IDE I conclude that the device Health changes have happened. The major recent outage seemed suspicious too. Not great timing with migrations going on. That could be backend issues but unfortunately timed, but …
  • All my Aqara buttons spontaneously started giving the “can’t connect to device” error in the app, despite working fine for months and functioning perfectly otherwise. As did those of other users, and I am using my own DTH so that wasn’t a common factor. The only way I could clear the problem was by adding a ‘vid:’ which has me staring at the app in general and the plugin again. And now …
  • Significant numbers of users are reporting all their temperature reporting devices are displaying in C on the detail pages instead of F, and I don’t mean just the letter C, they’ve had a temperature scale conversion applied. The event data is still in F and so is the dashboard. That has to be happening at the plugin level doesn’t it? It would be a potentially useful tool if it was supposed to be happening.

I am not happy, and very concerned, and I am one of the champions …

4 Likes

Am I reading this correctly that changes to capabilities and device configs do not show up right away in the new app? I’m wondering why my changes (which cli indicates as legal so-to-speak) do not show in the app … as if the capabilities don’t exist at all. (And I’m definitely following the instructions: cap:create, cap:pre:create, DTH IDs, MNMM, VID, etc.)

How are we expecting to migrate within two months if we cannot test our code? Am I missing a refresh capability (too frustrated to enjoy the pun)?

Any help would be appreciated. Thanks.

1 Like

In my experience, the first time you post your new vid into your DTH and load it up on your phone, you should see the result immediately. If the vid changes as you add/remove things from the presentation, you should likewise immediately see the result.

The problem is if you make changes that don’t change the vid. Let’s say you have everything set, but you change a capability presentation because you want it to have a space between the value and the units. After that, the presentation won’t refresh until… Well, that’s where the problem is. Waiting until the next day works. I’m hoping having a dev phone that you can uninstall/reinstall the ST app works, but I haven’t played with it enough to know.

Try creating a device-config with only your new capabilities in it. In the past couple days, the CLI has errored out every time I’ve done that, and when I make one with existing capabilities it just skips my new one. ST staff haven’t responded on the issue, but it seems like something is still broken.

Appreciate the help. My device-config have included new customs and ST standards. I’ll try one with just my customs … so I can witness the other issue :slight_smile: Thanks.

The excuse of over head costs is a mute point. As a simple commercial user I’d be happy to host the endpoints for smartthings with several T1 and fiber gig WAN connections…

1 Like

If anyone has a working example of a custom pushbutton capability working in detail view, I’d love to see it. I can get one button to show on the dashboard, and everything seems to be taking in the API, but nothing shows up in detail view. I know there have been recent issues with detail view in general, but it sounded like those were fixed?

This is one I created a few weeks ago when things were initially working showed up and worked fine. As of now though, it gives me buttons on the detail view that do nothing when pushed. If you’re not seeing your button on the detail view and created it recently, I would wager that it’s because no newly created capabilities are showing on the detail view.

1 Like