Using Arduino SmartThings with SmartApps


(aproal90) #1

Is it possible to use a command like

zigbee.smartShield(text: "lock").format()

in the Smart App to send the results to the Arduino in string format?


(Andrew Urman) #2

@aproal90 I’m not sure what you mean. Can you go into detail on what you are trying to do?


(aproal90) #3

I’m sorry for wasting your time. I figured it out about an hour after i posted this.

First, I defined and created a handle command in the actual device.

definition (…) {
    command “SendString”
}

def SendString(String output) {
    zigbee.smartShield(text: “$output”).format()
}

Then I could easily call this from the Smart App

def contactHandler(evt) {
    switch2.SendString("$evt.value")
}


(Andrew Urman) #4

no problem! Thank you for posting the answer.


(Andrew Arace) #5

Did you select your device in your smart app? What device capability did you use for your input()?

I’m trying to do something similar, and I can’t call any custom commands.