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

Open or close Kodi with a SmartThings virtual switch

Windows
5
8
4.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 Oct 16, 2017, 9:32 PM Oct 15, 2017, 9:04 PM

    Create a batch file in c:\scripts called kodi.bat with these contents:

    if "%1"=="on" "C:\Program Files (x86)\Kodi\kodi.exe"
    if "%1"=="" "C:\Program Files (x86)\Kodi\kodi.exe"
    if "%1"=="off" taskkill /im kodi.exe
    

    Go here to setup the TRIGGERcmd SmartApp in SmartThings.

    Use the SmartApp to create a virtual switch for Kodi.

    Say:

    Alexa, turn on Kodi
    Alexa, turn off Kodi
    

    Profit.

    Russell VanderMey

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by Oct 16, 2017, 11:31 AM

      Kodi as a name works fine for me. even spelled it Kodi vs Cody or something. not sure what the issue may be on your end.

      R 1 Reply Last reply Oct 16, 2017, 9:29 PM Reply Quote 0
      • R
        Russ @A Former User
        last edited by Russ Oct 16, 2017, 10:40 PM Oct 16, 2017, 9:29 PM

        @Neflhiem, yea you're right. I was testing it before I told Alexa to discover my new Kodi virtual switch. I assumed it was failing because Alexa didn't hear Kodi right. I was wrong.

        Sorry about that. I re-recorded that video too: https://www.youtube.com/watch?v=qYHbT05UMQc

        Russell VanderMey

        E 1 Reply Last reply Mar 10, 2018, 6:32 PM Reply Quote 0
        • E
          esco0909 @Russ
          last edited by Mar 10, 2018, 6:32 PM

          @russ

          Hey Russ

          Need some quick help when you have a moment

          I setup everything to voice control apps with alexa and I can get everything running but when I say alexa turn off kodi....nothing happens.

          I tried to create a batch file to force close kodi but nothing happens when i test it on the command gui command editor

          R 1 Reply Last reply Mar 10, 2018, 10:36 PM Reply Quote 0
          • R
            Russ @esco0909
            last edited by Mar 10, 2018, 10:36 PM

            @esco0909, does it work from the SmartThings app? I mean can you toggle the switch on or off to see Kodi open or close.

            Also, I wonder if it works from the www.triggercmd.com website when you click the Parameters button and type on or off?

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • M
              Mario Anibal Yaranga Colquicocha
              last edited by Jan 9, 2021, 6:04 AM

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • C
                Carlos Ignacio Ponce Brito
                last edited by Apr 1, 2021, 12:04 AM

                if "%1"=="on" it works for another program?

                R 1 Reply Last reply Apr 1, 2021, 12:14 PM Reply Quote 0
                • R
                  Russ @Carlos Ignacio Ponce Brito
                  last edited by Apr 1, 2021, 12:14 PM

                  @Carlos-Ignacio-Ponce-Brito, yes, you could use that if "%1"=="on" and if "%1"=="off" in a .bat file to open and close any program.

                  Or instead of using a .bat file, now you can use the Off Command field instead like this:

                  bce550bc-8dec-4f58-8bf6-4aca5c7abfe9-image.png

                  You have to set Allow Parameters to true before you can use the Off Command field.

                  Russell VanderMey

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