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

    SendResult.bat - command_id

    Scheduled Pinned Locked Moved General Discussion
    14 Posts 3 Posters 2.9k Views 1 Watching
    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.
    • A Offline
      aaaaa12345
      last edited by aaaaa12345

      Re: Smart reply for voice with parameters

      Hi,
      I'm currently trying to 'convert' the content of the 'SendResult.bat'-file (that seems to be hosted by default within the ...TriggerCmd-folder) into AutoHotkey code.

      While the variables for 'token' and 'computer id' seems to get their values from the respective files 'token.tkn' and 'computerid.cfg' I can't see a file that provides the value for 'command id' (well, the content of 'commands.json' isn't really matching with the term 'id')??

      Maybe someone can shed some light on this.
      I'm all πŸ‘‚πŸ» s'

      PS. looks like the exact same question has been asked here: https://www.triggercmd.com/forum/topic/2043/dynamic-replies-from-alexa-via-triggercmd/4?_=1657522199905
      ...but not been answered?!
      PPS. am I right that the batch contents' POST request is the equivalent of the 'Text/Gui Command Editor's 'Save'-button?

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

        @aaaaa12345, good question. The TRIGGERcmd agent sets these two environment variables as it runs your command:

        envVars.TCMD_COMPUTER_ID=computerid;
        envVars.TCMD_COMMAND_ID=cmdid;
        

        So your command can use those environment variables when it runs the SendResult.bat or equivalent.

        Russell VanderMey

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          aaaaa12345 @Russ
          last edited by aaaaa12345

          This post is deleted!
          A 1 Reply Last reply Reply Quote 0
          • A Offline
            aaaaa12345 @aaaaa12345
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • A Offline
              aaaaa12345
              last edited by

              [Solved]

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                aaaaa12345 @aaaaa12345
                last edited by aaaaa12345

                OK, meanwhile I'm able to change a trigger on-the-fly, so it can be used in cases where an ad-hoc 'voiceReply' timed out.

                Here a trigger is simply running a dummy command* and will respond with the dynamically changed 'voiceReply'-statement.
                The concept of this workaround isn't that complicated:
                a) identifying a trigger in the JSON file that should be changed
                b) changing its respective element(s)
                c) update the JSON file at the server
                Next time you ask that respective trigger it'll answer you with that dynamically updated response.

                Yep, you can change a command as well to your liking.
                The code should be available within the next days, provided at the AutoHotkey-Forum. Stay tuned πŸ‘¨πŸŒΎ

                BTW, if you know how to "force" Alexa to respond without being requested (TTS?) I'm all πŸ‘‚πŸ»'s

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

                  @aaaaa12345, that's an interesting idea. I never thought of modifying the commands.json file to get a different voice reply. I put a couple other ideas in this thread:

                  https://www.triggercmd.com/forum/topic/2241/delayed-response

                  Russell VanderMey

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    aaaaa12345 @Russ
                    last edited by aaaaa12345

                    @Russ
                    is there a chance to identify if the current user has subscribed using an API call?

                    Bo

                    BTW, regarding the NotifyMe-skill (mentioned above)...

                    "There is no (current) way to make Alexa blurt out notifications without prompting -- you must ask her why she chimed. Amazon probably designed notifications this way so you are alerted to them even if you are out of the room when they arrive, much like the light on an answering machine lights up to let you know you have messages pending.

                    If you want a skill that can make Alexa speak out without prompting, check out our Virtual Buttons skill"

                    https://www.patreon.com/VirtualButtons

                    HTH

                    RussR 1 Reply Last reply Reply Quote 0
                    • A Offline
                      aaaaa12345
                      last edited by aaaaa12345

                      From what I saw Amazon allows to drop a max of 5 notifications within 5 minutes. So any attempt to auto-update a trigger providing info at a faster pace that way, nope. JFTR.

                      Question: Is there any known 'number of character limitation' for the 'voiceReply' key/element/control??

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

                        @aaaaa12345, I don't know. I haven't tested the limit, but I did test this and it worked:

                        I was thinking I would have stopped by now. Nope. How about I try to repleat it? this is a super long thing to say. I am Alexa, and this is a long thing for me to say. I think I might stop talking any time now. Some how I'm still talking. Imagine that. Can you believe it? I was thinking I would have stopped by now. Nope. How about I try to repleat it? I was thinking I would have stopped by now. Nope. How about I try to repleat it? this is a super long thing to say. I am Alexa, and this is a long thing for me to say. I think I might stop talking any time now. Some how I'm still talking. Imagine that. Can you believe it? I was thinking I would have stopped by now. Nope. How about I try to repleat it? result is {{result}} I was thinking I would have stopped by now. Nope. How about I try to repleat it? this is a super long thing to say. I am Alexa, and this is a long thing for me to say. I think I might stop talking any time now. Some how I'm still talking. Imagine that. Can you believe it? I was thinking I would have stopped by now. Nope. How about I try to repleat it? I was thinking I would have stopped by now. Nope. How about I try to repleat it? this is a super long thing to say. I am Alexa, and this is a long thing for me to say. I think I might stop talking any time now. Some how I'm still talking. Imagine that. Can you believe it? I was thinking I would have stopped by now. Nope. How about I try to repleat it? result is {{result}}

                        Russell VanderMey

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

                          @aaaaa12345, if you query your computer it will return your user too.

                          curl https://www.triggercmd.com/api/command/list?computer_id=(your computer id)&token=(your token)

                          The user object has a status property. If it's 2 you're subscribed. If it's 0 you're not.

                          Russell VanderMey

                          A 1 Reply Last reply Reply Quote 0
                          • A Offline
                            aaaaa12345 @Russ
                            last edited by aaaaa12345

                            @Russ
                            Thx, got it. πŸ‘

                            A 1 Reply Last reply Reply Quote 0
                            • A Offline
                              aaaaa12345 @aaaaa12345
                              last edited by aaaaa12345

                              OK, Voice Monkey offers to trigger an instantaneously Echo Dot announcement via an Alexa Routine (I'd guess that's what TC is doing as well, acting as a switch/doorbell?). I'm using that to hand over whatever processing outcome (as text) to a specific VM monkey that will announce it ad-hoc (without needing to be requested first). VM's API is using a simple GET statement.
                              "The Announcer"-script is hosted here at the AutoHotkey forum.

                              VM's API offers a bunch of options/parameters like audio/video/img*/url/... I've tried it successfully with DropBox/...

                              * so you can play a song, while pushing its cover to your Echo Show (or FireTablet in "Show"-mode).

                              Have phun πŸ™‚

                              A 1 Reply Last reply Reply Quote 0
                              • A Offline
                                aaaaa12345 @aaaaa12345
                                last edited by

                                ...but unfortunately, Amazon has set up restrictions:

                                "Response length – The combined total time for the entire audio response generated from the components cannot be more than 240 seconds."

                                BUT...

                                "Our API throttling limits will allow up to 30 calls within a 60 second window…anything above that will block subsequent requests for the next 15 minutes."

                                So, no creating a music box isn't really doable - a text reader/TTS no problem!

                                1 Reply Last reply Reply Quote 0

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better πŸ’—

                                Register Login
                                • First post
                                  Last post