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

Samsung SmartThings can trigger commands via TRIGGERcmd

Announcements
3
13
5.9k
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.
  • R
    Russ
    last edited by Russ Mar 30, 2024, 6:22 PM Apr 22, 2017, 11:11 PM

    This post is obsolete. Please go here for the new SmartThings information.

    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.

    Russell VanderMey

    R 1 Reply Last reply Jan 12, 2023, 5:29 PM Reply Quote 0
    • J
      Jim Robertson
      last edited by Apr 25, 2018, 9:54 PM

      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?

      R 1 Reply Last reply Apr 26, 2018, 10:16 PM Reply Quote 0
      • R
        Russ @Jim Robertson
        last edited by Russ Apr 26, 2018, 10:17 PM Apr 26, 2018, 10:16 PM

        @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.

        Russell VanderMey

        J 1 Reply Last reply Apr 27, 2018, 3:15 AM Reply Quote 0
        • J
          Jim Robertson @Russ
          last edited by Jim Robertson Apr 27, 2018, 3:18 AM Apr 27, 2018, 3:15 AM

          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)

          J 1 Reply Last reply Apr 27, 2018, 8:39 PM Reply Quote 0
          • J
            Jim Robertson @Jim Robertson
            last edited by Apr 27, 2018, 8:39 PM

            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!

            R 1 Reply Last reply Apr 28, 2018, 7:55 PM Reply Quote 0
            • R
              Russ @Jim Robertson
              last edited by Russ Oct 29, 2018, 11:34 PM Apr 28, 2018, 7:55 PM

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

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • R Russ referenced this topic on Jan 5, 2022, 10:39 PM
              • R Russ referenced this topic on Jan 5, 2022, 10:40 PM
              • R
                regfixit @Russ
                last edited by Jan 12, 2023, 5:29 PM

                @Russ Hi Russ. I was using this but today it seems to have stopped working. I think maybe linked to Smarthings discontinuing the Groovy support. Is there any alternative to run Triggercmd from Smarthings ?

                R 1 Reply Last reply Jan 12, 2023, 10:53 PM Reply Quote 0
                • R
                  Russ @regfixit
                  last edited by Russ Jan 14, 2023, 1:19 AM Jan 12, 2023, 10:53 PM

                  @regfixit, I'm working on an alternative. I just posted about it here:

                  https://www.triggercmd.com/forum/topic/29/smartthings-integration-flip-a-virtual-switch-to-run-a-command/33

                  EDIT: I finished the new SmartThings integration. Please try it and let me know if it works for you.

                  Russell VanderMey

                  R 1 Reply Last reply Jan 31, 2023, 10:21 AM Reply Quote 0
                  • R
                    regfixit @Russ
                    last edited by Jan 31, 2023, 10:21 AM

                    @Russ Thanks Russ, this is brilliant. I've got it all up and running. There was one thing that took a long time to work out - in order to install the app in the smartthings app, you have to enable developer mode in the app. This is really hidden - you have to go into the settings and hold down the "about smartthings" button for 5 seconds, and then there is an option at the bottom of the settings screen (not inside the about smartthings page" to turn on developer mode. Only after doing that can you see your test devices.
                    Maybe worth to add to your otherwise extremely comprehensive setup guide.

                    R 1 Reply Last reply Jan 31, 2023, 10:44 PM Reply Quote 0
                    • R
                      Russ @regfixit
                      last edited by Jan 31, 2023, 10:44 PM

                      @regfixit, thank you! I forgot I had done that. I'll add that step to the instructions.

                      Russell VanderMey

                      R 1 Reply Last reply Feb 2, 2023, 7:46 PM Reply Quote 0
                      • R
                        regfixit @Russ
                        last edited by Feb 2, 2023, 7:46 PM

                        @Russ One other strange thing I've noticed is that at about 1215 AM the smarthings devices turn on by themselves. It doesn't actually trigger the command, but the device status changes to On in Smartthings.

                        R 1 Reply Last reply Feb 2, 2023, 10:27 PM Reply Quote 0
                        • R
                          Russ @regfixit
                          last edited by Russ Feb 6, 2023, 12:59 AM Feb 2, 2023, 10:27 PM

                          @regfixit interesting. I have nothing in my code that would do that, so I'm thinking Samsung's system is doing it. I'll look into it though.

                          I imagine that could be a problem if you're using it to turn a light on/off via X10 or something. Ideally you'd see the correct status in SmartThings.

                          Thanks for reporting the problem.

                          EDIT: I see the problem in my code. I'm working on it.

                          EDIT2: It should work now. Please let me know if you still see the problem, but I think the on/off status should persist now.

                          Russell VanderMey

                          R 1 Reply Last reply Feb 13, 2023, 9:56 AM Reply Quote 0
                          • R
                            regfixit @Russ
                            last edited by Feb 13, 2023, 9:56 AM

                            @Russ Hi Russ I had some issues with my raspberry Pi SD card corrupting and then trying to remember how I'd set it all up in the first place so wasn't using the app for a while.
                            However, I checked now and it's all working fine with no issues with the on/off status.
                            Thanks for your excellent work !

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post