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

    Difficulties to run commands with parameters in linux

    Linux
    2
    6
    634
    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.
    • Kelvin FerrazK
      Kelvin Ferraz
      last edited by

      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:

      52d61702-2930-4e32-b0d8-50d64ff661c2-image.png

      and create the command on TriggerCMD Agent:

      9da700e8-a892-44cb-9efb-902d57db67da-image.png

      Also create a Rotine on Alexa App :

      ce2aebe8-c935-4031-a22e-693f08305379-image.png

      When call alexa response OK, but my script don't run.

      What i'm doing wrong?

      Thanks

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @Kelvin Ferraz
        last edited by

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

        2d494118-e471-4a44-9a29-8789cd09cf74-image.png

        c0799c41-f4a3-4f4d-af14-404a949085da-image.png

        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.

        Russell VanderMey

        Kelvin FerrazK 1 Reply Last reply Reply Quote 0
        • Kelvin FerrazK
          Kelvin Ferraz @Russ
          last edited by

          @Russ

          Yes when I tryied run from website, I received this:

          5fc98a15-4c9c-40aa-959d-61f7973f49ae-image.png

          But my script bash don't run, because I create to test a exit log file:

          288bc4a8-10d9-4e21-9803-084211f7a6b2-image.png

          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:

          e50e9fc3-fd4d-4ea9-bf94-7a482fc54876-image.png

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @Kelvin Ferraz
            last edited by

            @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

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • Kelvin FerrazK
              Kelvin Ferraz
              last edited by

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

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @Kelvin Ferraz
                last edited by

                @Kelvin-Ferraz, awesome. I'm glad it's working.

                Russell VanderMey

                1 Reply Last reply Reply Quote 0
                • tuicemenT tuicemen moved this topic from Instructions on
                • First post
                  Last post