TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Using TriggerCMD with smartthings

    Scheduled Pinned Locked Moved Announcements
    2 Posts 2 Posters 1.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Steven Canary
      last edited by

      I love the smartapp and the device handler for smartthings. I can now turn off my LAN on my computer when I shut down my monitors at night. My question however is is there a way to change the device type from an on/off switch to a push button?

      Re: Samsung SmartThings can trigger commands via TRIGGERcmd

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @Steven Canary
        last edited by

        @steven-canary, if your commands don't accept parameters, then whether your virtual switch is on or off, it just runs the command when you toggle the virtual switch on or off.

        Or, in the SmartThings device handler code, you can remove the // in front of off(). That would make all of your virtual switches push buttons that automatically toggle themselves back off as soon you toggle them on.

        // handle commands
        def on() {
        log.debug "Executing 'on'"
        sendEvent(name:"switch",value:on)
        parent.on(this)

        // off()
        

        }

        Russell VanderMey

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post