Samsung SmartThings can trigger commands via TRIGGERcmd


  • administrators

    Now you can run commands by flipping a virtual SmartThings switch.

    I submitted this to be published in the SmartThings app, but in the meantime, use these instructions to set it up.

    You can also watch this video: https://www.youtube.com/watch?v=dq-loAiKAgo

    SmartThings is the leading IoT system.

    With this integration you could have your computer play an MP3 saying, "Hey, get out of here!" when your motion sensor detects motion and your SmartThings security system is armed.

    Or you could have it lock your computer when you leave the house, or when your motion sensor stops detecting motion, or when you flip a switch.

    If you want to pass parameters to your commands from SmartThings, I recommend using Stringify like in this example.

    NOTE: If you delete a command from your TRIGGERcmd account before removing it via the TRIGGERcmd Smartthings device handler (under Smartapps), you'll get errors trying to update your list of TRIGGERcmd virtual switches until you delete the virtual switch associated with that command from the Things list.



  • Hello Russ,

    New TriggerCMD user here. I am currently trying to implement a Smarthings to X10 integration ala Bubba (Nate Hale). I have TriggerCMD working with a command line argument without parameters using cURL, but when I try to create a virtual switch through TriggerCMD and have it pass on or off parameters to a bat file in response to smarthings clicking the switch on or off, nothing happens other than triggerCMD incrementing the runs counter for the Trigger. Not sure where I am going wrong, the bat files work from a command prompt when I manually enter the on or off parameter. Any thoughts?


  • administrators

    @jim-robertson, can you send your script and a screenshot of how you've got the command configured?

    My initial suspicion is you might have your command field set to the name of your batch file without the path like this:

    myscript.bat
    

    That will only work if your script is in a folder that's included in your PATH environment variable. Nate has a video about how to add the folder here, but what some people do is put their batch files in c:\windows because c:\windows is included in the PATH environment variable by default.



  • Russ, I tried the command both alone 'saltlamp.bat, 'saltlamp' and with path 'C:\Scripts\saltlamp.bat'. the Scripts folder is in path as well. I am able to trigger the script at a command prompt ('saltlamp on' or 'saltlamp off' when in a different directory and it fires fine. Here's the contents of the bat file:

    if "%1"=="on" curl http://192.168.1.101:8086/?x10command=DEVICE~sendrf~%"C1% on%"
    if "%1"=="off" curl http://192.168.1.101:8086/?x10command=DEVICE~sendrf~%"C1% off%"

    (I am using double percent signs, the display above converts one set to double quotes)



  • Rus, found the issue. Appears that TriggerCMD's parameters do not play well with cURL 64 bit versions. I dropped down to the cURL 32 bit version without Administrator Privledges, and now can toggle smartthings virtual switches on/off and turn my x10 devices on/off through TriggerCMD. Subscribing today! Thank you very much!


  • administrators

    @jim-robertson, that's interesting. Good job figuring that out. I wouldn't have thought of that.


Log in to reply
 

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.