No permission to update standard capabilities

I have created a custom capability
smartthings capabilities:create -i capability.json

Now I want to add a presentation capability, I’m using
smartthings capabilities:presentation:create -i capability.presentation.json

Which result in: {"code":"4030000","message":"No permission to update standard capabilities","details":[]}}

Which is strange as I’m only trying to add a presentation to my custom capability

In some cases I’ve noticed that if the name of the custom cap is identical to a standard cap it throws this error (even though they have different namespaces)

I tried adding a “z” at the end of the capability name to make sure it differed from a standard cap, but still got the permission errror

Hi, @sdalu!

The command presentation:create must include the ID of the custom capability and its version next to the word “create”. For example:

smartthings capabilities:presentation:create namespace.capabilityName -i capability.presentation.json

When using the CLI, a great trick is using --help at the end of the command to see the parameters it needs and flags we can use. For example:

smartthings capabilities:presentation:create --help

Note: Currently, the version field of custom capabilities is cannot be modified so, it will be always 1

Hi @nayelyz ,

If ID and version are not specified, the CLI show a list where it can be selected.

Of course if I specify them in the CLI, I got the same permission denied.
smartthings capabilities:presentation:create stormachieve25639.mainsVoltage 1 -i EdgeLinky/capabilities/mains-voltage.presentation.json

Error: Request failed with status code 403: {"requestId":"21E24F8D-B932-48A1-9968-CC53AA 0A7543","error":{"code":"4030000","message":"No permission to update standard capabilities","details":[]}}

Can you share the following, please?

  1. Which version of the CLI are you using?
  2. The presentation for the capability that you’re trying to save. This is to create a copy and see if I get the same error

smartthings --version
@smartthings/cli/1.0.0 freebsd-x64 node-v16.19.0

capability

{
    "name": "Mains Voltage",
    "attributes": {
	"voltage": {
	    "schema": {
		"type": "object",
		"additionalProperties": false,
		"properties": {
		    "value": {
			"type": "number"
		    },
		    "unit": {
			"type": "string",
			"enum": ["V"],
			"default": "V"
		    }
		},
		"required": ["value"]
	    }
	}
    },
    "commands": {}
}

capability presentation

{
    "dashboard": {
	"states": [
	    {
		"label": "{{voltage.value}}{{voltage.unit}}"
	    }	    
	]
    },
    "detailView": [
	{
	    "label": "Voltage",
	    "displayType": "numberField",
	    "numberField": {
		"command": "Set voltage",
		"value": "volume.value",
		"unit": "volume.unit"
	    }
	}
    ]
}

aaah ok, the presentation file is missing the capabilityID and version inside. For example:

{
   "dashboard":{
      "states":[
         {
            "label":"{{voltage.value}}{{voltage.unit}}"
         }
      ]
   },
   "detailView":[
      {
         "label":"Voltage",
         "displayType":"numberField",
         "numberField":{
            "command":"Set voltage",
            "value":"volume.value",
            "unit":"volume.unit"
         }
      }
   ],
   "id":"stormachieve25639.mainsVoltage",
   "version":1
}

I thought capabilityID and version were specified as argument on the CLI ?

Now I get, which leave me clueless:
Error: Request failed with status code 500: {"requestId":"7D9B7A4F-19DB-4F89-BA35-72D964 F84E55","error":{"code":"5000000","message":"Use bracket notion ['my prop'] if your property contains blank characters. position: 11","details":[]}}

ok, analyzing your configuration closely, I noticed the following:

  1. Your definition has no commands
  2. You’re using a display type that uses a command name: numberField.
  3. In the command name, you used the following text which is not valid: Set voltage

If this capability will be used as “read-only”, you should use the state display type.

If any/all of those things were wrong with his configuration, why doesn’t the error message reflect anything close to that? Instead he gets “no permission to update standard capabilities”?

It might be grabbing an ID by default or something, I’ll open a report about that for clarification.

1 Like

From documentation Capability Presentations | SmartThings Developers, I find it really not clear what can be used and what can not.

For example

The following is ok without command

   "detailView":[
      {
         "label":"Voltage",
         "displayType":"slider",
	 "slider": {
	     "value": "voltage.value",
	     "unit": "voltage.unit",
	     "range": [ 0, 100 ],
	     "step": 1
         }
      }
   ],

The following throw an error without command

   "detailView":[
      {
         "label":"Voltage",
         "displayType":"numberField",
	 "numberField": {
	     "value": "voltage.value",
	     "unit": "voltage.unit",
	     "range": [0, 100]
	  }
      }
   ],

Error: Request failed with status code 422: {"requestId":"47749145-97B3-4120-AFE8-35FD9D 9944D9","error":{"code":"4000000","message":"must not be blank at detailView[].numberField.command","details":[]}}

I’ll check for more info about that so we can clarify this in the docs.
In the case of the “slider” display type, I can tell you that, if we don’t define a command, it means it is read-only as well. You can see how the slider changes in its design, instead of using a “dot” we can move, it shows a “position indicator”. See the sample below: