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

    Dynamic Replies from Alexa via TRIGGERcmd?

    General Discussion
    sendresult
    3
    11
    1.1k
    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.
    • RussR
      Russ
      last edited by Russ

      @furkan-cevik, this field works with the original TRIGGERcmd and TRIGGER command skills work with this Voice Reply field:

      8c2e8f48-9a84-42cf-9c9d-88d267c60e4d-image.png

      You say something like, "Alexa, ask TRIGGERcmd to run Script"

      And when your script runs, it needs to run the sendresult.bat or sendresult.sh script in the .TRIGGERcmdData folder which is in your user's home folder, like this:

      Linux:

      ~/.TRIGGERcmdData/sendresult.sh hello
      

      Windows:

      %USERPROFILE%\.TRIGGERcmdData\sendresult.bat hello
      

      One thing you might want to try is running an Alexa Routine that uses a custom action that uses the TRIGGERcmd (not TRIGGERcmd Smart Home) skill. You just have it say, "ask TRIGGER C M D to run script" for you.

      Under "When this happens" you can pick one of your TRIGGERcmd Smart Home devices as the Routine trigger.

      That way you can still trigger it using the TRIGGERcmd Smart Home skill.

      Russell VanderMey

      Furkan CevikF 3 Replies Last reply Reply Quote 1
      • Furkan CevikF
        Furkan Cevik @Russ
        last edited by

        @russ ill try it later, ty.

        1 Reply Last reply Reply Quote 0
        • Furkan CevikF
          Furkan Cevik @Russ
          last edited by

          @russ Hey Russ,

          im currently trying to understand how your SendResult.bat works.

          I currently cant find out where the script get the info for these 2 Variables:

          -F computer_id=%TCMD_COMPUTER_ID% -F command_id=%TCMD_COMMAND_ID%

          To be exact, its these 2:

          • %TCMD_COMPUTER_ID%
          • %TCMD_COMMAND_ID%

          Im asking this to try/know if I can just run this script on my PC to see if alexa will talk back or not, or am i forced to try it with the skill?

          Thanks!

          tuicemenT 1 Reply Last reply Reply Quote 0
          • Furkan CevikF
            Furkan Cevik @Russ
            last edited by

            @russ ok, i tried now the normal way, its still not really working.

            I made a .bat Script which is just opening 2 Programs for testing purposes:

            30865508-c295-4137-92cd-7dd8f4a38b45-image.png

            This is the command in TRIGGERcmd:

            d752e21f-6e1f-4261-b28f-ea3e424c21d5-image.png

            I also configured it the way you said with the Routine to call it easier:

            Made a Routine:

            I say: "Alexa, test"
            Enabled the option "What i say" to: "Ask Trigger C M D to to run Firefox".

            With this i can run the routine by just saying "Alexa, test".

            The inital start works, its starting Firefox and Edge like in the script, but as voice reply, Alexa only says "reply" and not "Say my name furkan" like i put in the script. Like its instantly saying back "result", without waiting for the script to finish.

            This is the results.log file call, if needed:

            {"data":[{"name":"Firefox","voice":"firefox","voiceReply":"{result}","allowParams":false,"user":"5ee920d8b6af0700198b05d2","computer":"6206f1048f469b001ac34fa8","switch_is_on":false,"runCount":5,"createdAt":"2022-02-12T13:05:52.286Z","updatedAt":"2022-02-12T13:11:20.628Z","lastResult":"Say My name Furkan","id":"6207b0b028bc10001afaec9e"}],"message":"Command result updated successfully."}

            PS: I use Alexa in German, if that matters.

            What am i doing wrong? Thanks Russ!

            1 Reply Last reply Reply Quote 0
            • tuicemenT
              tuicemen @Furkan Cevik
              last edited by

              @furkan-cevik you need the skill enabled for Alexa to see TRIGGERcmd devices. I also believe you need a routine created to see and reply to a TRIGGERcmd device trigger.

              Furkan CevikF 1 Reply Last reply Reply Quote 0
              • Furkan CevikF
                Furkan Cevik @tuicemen
                last edited by

                @tuicemen Hey,

                i have the triggerCMD Skill enabled.

                Like im also to call my script sucessfully, thats not the problem. The problem is that i dont get the configured voice response back.

                But i "found" my mistake, kinda.

                Russ said in this entry, i need to use {result}, but here:

                https://www.triggercmd.com/forum/topic/332/smart-reply-for-voice-with-parameters/3

                It says to use {{result}}

                I switched it to that, and now my Alexa says "No Result" everytime, even tho I have a configured Result:

                20f904a8-a98a-416b-825d-0b78ae7f5512-image.png

                Furkan CevikF 1 Reply Last reply Reply Quote 0
                • Furkan CevikF
                  Furkan Cevik @Furkan Cevik
                  last edited by

                  @furkan-cevik I found my mistake.

                  It took too long to run my .bat file.

                  I read now on other topic, that it has only 4-5sec time to get a result. If it takes too long, it says "No Result".

                  @Russ Is it possible to increase this? I wanna run some api calls and get these as voice reply, but these could take a bit to call.

                  Thanks!

                  tuicemenT 1 Reply Last reply Reply Quote 0
                  • tuicemenT
                    tuicemen @Furkan Cevik
                    last edited by tuicemen

                    @furkan-cevik the time out is on the Alexa side. @Russ had suggested away arround this obstacle using routines and a second script. I can't seem to find that thread right now. I'll post a link to it if/when I find it.
                    Update: here is the link
                    https://www.triggercmd.com/forum/topic/2015/feedback-on-triggers/5

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

                      @Furkan-Cevik, I created this article to clarify the process.

                      Also you're right, I meant {{result}} not {result}. I corrected my post.

                      @tuicemen fyi

                      Russell VanderMey

                      Furkan CevikF 1 Reply Last reply Reply Quote 0
                      • Furkan CevikF
                        Furkan Cevik @Russ
                        last edited by

                        @russ Thanks Russ!

                        1 Reply Last reply Reply Quote 0
                        • A aaaaa12345 referenced this topic on
                        • First post
                          Last post