Open or close Kodi with a SmartThings virtual switch
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.
Alexa, turn on Kodi Alexa, turn off Kodi
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.
@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
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
This post is deleted!
if "%1"=="on" it works for another program?
@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:
You have to set Allow Parameters to true before you can use the Off Command field.