Capabilities with no attributes or commands


(Alex) #1

@Jim
I’m looking at the capability reference page https://graph.api.smartthings.com/ide/doc/capabilities and I have a few questions:

There are a number of capabilities, for example Actuator, Momentary that are missing some columns.

From experience, I know that if I wanted to subscribe to events from a momentary button, I would subscribe to button.pushed.

What about actuator? Is the event called actuated? Is there documentation on this?

What’s the difference between actuator and switch/button/momentary?

Thanks,
Alex


(Jim Anderson) #2

These are really good questions @625alex! Not all capabilities have attributes or commands, which is why some columns are empty.

Wouldn’t that be using the button capability, which does have a button attribute with one possible value being pushed?

There is no event called actuated.

I need to dig more on this to answer with confidence.

I don’t want to fork this thread, but I do want to get each capability documented fully, with descriptions, command signatures/documentation, code examples, etc. That’s not happening today though, but hopefully that will be useful when we get there.

Until then, I’ll work on finding a specific answer to your questions. Hang tight.


(Alex) #3

How do I know that capability.momentary has button capability? Are there any inheritance rules in place?


(Gary D) #4

(in regards to capability momentary) No, it’s using a command event. (not an attribute event.)


(Jim Anderson) #5

If you use capability.momentary, the only thing you know is that it supports the push() command. The specific device used may also support the button capability, since devices often support more than one capability. There is no inheritance structure for capabilities.


(Alex) #6

Taking “Momentary Button Tile” as an example…

It has the following:

capability "Switch"
capability "Momentary"
capability "Sensor"
capability "Actuator"

I have this app that takes momentary as input and subscribes to momentary.pushed.

I give it a “Momentary Button Tile” and it works!

So what is pushed to capability.momentary?

capability.button has attribute button with value pushed. Is there any relationship between capability.button and capability.momentary?


(Jim Anderson) #7

It’s possible that the specific device type sent an event with name “momentary” and value “pushed”. This would allow for subscribing to that event like you have.

There is no specific relationship between these two capabilities, other than a logical similarity in being “button-like”.


(Alex) #8

Yeah, you are right. “Momentary Button Tile” sends pushed event on push.


#9

My guess, purely a guess, is that “actuator” is a zigbee artifact. In zigbee networks you have sensors, actuators, and controllers.

In zwave, you have sensors, switches, and controllers.

But this is just node terminology.

A physical water valve cutoff is an “actuator” from an engineering standpoint, but identifies itself as a “switch” to Zwave.

http://products.z-wavealliance.org/products/953/embedpics

And a physical dimmer control is a “switch” from an electrician’s standpoint, but is an “actuator” in a zigbee network.

(Are we having fun yet? :wink: )

Anyway, seeing “sensor” and “actuator” as capabilities implies to me that this had to do with the zigbee underlayer. And that “switch” and “momentary switch” came in with Zwave (because those are both “actuators” in a zigbee sensornet.)

But I’m just guessing.


(Jim Anderson) #10

See my response to this related post about Actuator and Sensor: