Calling custom commands in custom Smart App?

(Andrew Arace) #1

I’m creating my own device & device type with the arduino shield. I’ve figured most of it out, and have created a new Device Type (with a couple custom commands) and a new Smart App to be the if-this-happens brains behind the device type.

However, I can’t figure out how to call any of my custom commands. It seems the custom capabilities (which bind a specific set of allowed commands) aren’t supported yet, but what about if the commands are known?

I’m building a “bedside monitor” with some LEDs & alarms when something happens (for example, front porch detects motion -> front porch LED comes on, alarm sounds). My Smart App asks for which “Bedside Monitor” to work with (I used the “alarm” capability to tag it for association in the Smart App) and asks for the (currently) two motion sensors to handle. However, it seems no commands would be available on the “monitor” because it is an “alarm”. Is there any way for me to call my frontDoorMotion() command?

If this is completely not possible, I’d like opinions on my potential workaround:

I was toying with the idea of making my Monitor implement the capability.speechSynthesis capability, since it implements the simple speak(String) command that I can use. Anyone have an opinion if this is a good approach?

Calling custom command from IFTTT?
(Geko) #2

Custom commands and attributes totally work. There’s a lot of devices that use them.

(Andrew Arace) #3

Can you provide me any examples?

Identifying my device in my SmartApp, I can only use a built-in capability, which seems to limit me to the list of Commands that the choose capability supports, otherwise I get something like:

10:28:19 PM: debug motion at front door```

(Geko) #4

For example,
Or look at Sonos device.

(Andrew Arace) #5

Thanks a lot for the link - apparently I had my commands-with-parameters syntax incorrect!
Works great, now!

(Geko) #6

No problem. Glad I was able to help.