Custom Capability and CLI Developer Preview

Please, can we get an update? When is this going to be fixed? I’m in a holding pattern now.

So looks like the button in the Garage Door was just generated from a stock capability that moved over from the old app. So has anyone had luck with getting the custom pushButton to work?:

pushButton

The pushButton display type will render a capability as a button on the dashboard. A command for the capability is required on a pushButton . It may have argument to be sent.

"pushButton": {
    "command": "setButton",
    "argument": "push"
}

I would like to update a couple DTH’s with buttons but don’t want to try if there’s some bug preventing it from working. Would the argument just be calling on something in the existing dth to run when pushed - ie on() off() pushed(), etc?

It is the command that would be an existing method in the DTH.

1 Like

@erickv @nayelyz I would like create a list command in detailView with a dynamic alternatives “value”. The keys (arugment) in command “alternatives” list is fixed (e.g. command1, command2 etc) . However in the alternatives array I want the value for each key that is displayed to be read from the DTH at runtime. i.e. the DTH needs to update the display of command options at runtime. e.g. for one device it would like display “command1” as “Move up” where as for another device, it may want to display “command1” as “Move down”. How can that be done?

@erickv another (significant) issue, if the command or attribute name has a number it throws an error. For example if I try to define an attribute or a command called preset1, it throws an error:

“error”:{“code”:“ConstraintViolationError”,“message”:“The request is malformed.”,“details”:[{“code”:“PatternError”,“target”:“Attribute preset1”,“message”:“Attribute preset1 does not match the pattern [1]{1,36}$.”,“details”:}

“message”:“Foscam Camera.commands.preset1.name: does not match the regex pattern [2]{1,36}$”,“details”:}

A lot of DTH’s have commands and attributes with a number, why isn’t this allowed?


  1. [a-z]([A-Z][a-z])* ↩︎

  2. [a-z]([A-Z][a-z])* ↩︎

2 Likes

I couldn’t get pushButton to work the other day. I have multiple buttons configured and only 2 will show and throw a network error when pressed.
I’m also missing a lot of state cards. It’s very weird how only some of the items are displayed from each capability

I’m about to start a rant!

It’s because this was rushed!
I couldn’t believe it when I got an email today publicly launching the documentation on this new capability cli when nobody can get it to work reliably.

I’m honestly so ready to throw in the towel on ST right now. I’m basically stuck because I can’t develop anything because nothing is finalized or works 100%. There is no excuse for this to new API to be publicly available yet.
It’s pretty sad when I can only get 1 state card to show out of 10-15. They are just basic strings to display.
This new design really sucks because it’s a nightmare to debug. It’s basically tried and fail, ask a question, wait days, rinse and repeat.

I don’t think it’s unreasonable for someone to work with me directly to help get this stuff working. I ask and ask and nobody seems to be able to help. I was then told to post here and still after 7 days I’m still stuck and the community is once again trying to figure it out our selves.

@erickv @jody.albritton

17 Likes

Yeah, I got that email too. It made me chuckle… So sad…

2 Likes

It was actually announced two months ago, it’s still in developer preview. I do understand your frustrations but the reason we need the support to happen here in the community is that one off direct support for the developer preview will not help anyone else who might have the same issue. Getting a stable api and good documentation Is a priority.

But are you aware it’s not working at all right now because we can’t create new presentations?

And don’t get me started on the new Alexa skill that’s not working at all tonight.

1 Like

Thanks Jody for the info. I appreciate and have been reading the additional documentation output. However, as a newer developer on here trying to figure things out, it is highly discouraging to see experienced developers like @tonesto7 and @RBoy not be able to use this interface. I use their programs regularly, and if they can’t get this working, what chance do I have?

I get it it’s unreasonable to provide direct developer support to everyone right now, but Tonesto is absolutely a special case. Samsung singled his app out and killed it. You have an Alexa skill with a 71% one star rating. There are endless posts from upset users over terrible Alexa integration, just waiting for Tonesto’s update. If it can’t be fixed, you will see a mass exodus of users from this platform, myself included, and the whole thing will fall apart.

So, for the sake of the future of the whole platform, I don’t think it’s too much of him to ask for some help with buttons. Once working, he already advised he will share the configs and we will all learn something.

9 Likes

I created a capability with 2 states, only 1 appears in detailView.

Looking at ST standard capabilities, e.g. “Signal Strength”, it has 2 states, and it appears as a single state card, the values are horizontal, and not what we would expect - 2 state cards vertical down.

I might be wrong, it seems to be 1 per capability.

Removing the presentationId and manufacturerName work for me.

1 Like

I see what you mean. I was unable to create a new configuration and then realized that the API was including two new attributes in the consolidated configuration it was generating, but wasn’t being accepted back by the API. As @hongtat suggested try removing those two attributes and then create the config.

@erickv another bug with the list in detailView. It doesn’t show the state based on the attribute value, instead it shows the command from the attribute value. I’m using your todo sample to check this.
So when the attribute value changes, the display control displays the value from the command alternatives instead of the state alternatives. I believe the display control should be showing the value from the state alternatives on screen when the attribute value changes. (the command selection drop down list is using the value from the command alternatives correctly).

1 Like

That doesn’t work

Now it is working for me as well when removing those 2 attributes. I know for sure it wasn’t working before. I’m guessing they fixed it without telling us.

Still, pretty crappy that we have to figure this crap out on our own instead of them telling us how.

1 Like

@erickv None of the switches (switch, toggleSwitch, standbyPowerSwitch) or pushButton controls are triggering any commands (setter or direct) through detailView (spent the better part of 6 hours trying every possible combination). This is fairly roadblocking issue since a the switch is a very basic control and with nothing working I don’t see any other alternative. It has been quite a while since it was reported and now we have less than 5 weeks to shutdown of the Classic app. Can we have an ETA when it will start working?

7 Likes

I was in the same boat as you. I spent a big chunk of one of my days trying to decipher this new implementation.
It would be nice if they could slow down some and actually test this stuff before publishing documentation.

10 Likes

Hey all, sorry for being clueless on this error, but after updating to the latest CLI release I’m now getting the following error:

[ERROR] cli - caught error Error: Request failed with status code 401: "<html>\r\n<head><title>401 Authorization Required</title></head>\r\n<body>\r\n<center><h1>401 Authorization Required</h1></center>\r\n<hr><center>openresty</center>\r\n</body>\r\n</html>\r\n"

Thinking it would help, I saw “smartthings-cli” as a linked service in the new app, and removed it. That didn’t help.

I also created a new token, but I have no idea how/where it should be used.

Any help would be appreciated, thanks.

@jody.albritton

You token needs to go in the config file located in %userprofile%\AppData\Local\@smartthings\cli

default:
        token: XXXXXXXXXXXXXX
1 Like