Difficulties to run commands with parameters in linux
-
Hello,
I'm need say first, congrats, your application is awesome!
I have problem to understand the use of parameters on Linux (I'dont know if the problem is my language "Portuguese") , but when I try execute the call, i'm don't receive any return.
I'm try create a bash script very simple to debug:
and create the command on TriggerCMD Agent:
Also create a Rotine on Alexa App :
When call alexa response OK, but my script don't run.
What i'm doing wrong?
Thanks
-
@Kelvin-Ferraz, you said the command doesn't even run. You'll want to solve that before trying to pass parameters.
Does the command run if you run it from the website? If you want to test sending parameters from the website, you can click the orange Parameters button, then type your parameter and click "Trigger with parameters".
Once you confirm the command runs, and your parameter is passed as $1, you can try sending parameters via Alexa. If you use the original Alexa skill, you can say,
"Alexa, ask TRIGGERcmd to run X with parameter Z."
Or if you use the Smart Home skill you can say, "Alexa, turn off X" and your command will run with "off" as the parameter.
-
Yes when I tryied run from website, I received this:
But my script bash don't run, because I create to test a exit log file:
And this log dont write or is created
I created a simple bash and given a permission with chmod +x
When I execute this script from terminal the exit log is created:
-
@Kelvin-Ferraz, thanks for the screenshots. That helps.
I think your log might be getting written, but not to that Alexa_Call directory. Please try making your script like this:
#!/bin/bash echo $1 >> /tmp/call_alexa.log
-
@Russ said in Difficulties to run commands with parameters in linux:
I think your log might be getting written, but not to that Alexa_Call directory. Please try making your script like this:
awesome!!
This is a problem I was passed, mabe because i don't pointed the correct and complete directory.
Thanks!
-
@Kelvin-Ferraz, awesome. I'm glad it's working.
-