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

    Open Specific Netflix Movie with Alexa

    Windows
    8
    40
    9.5k
    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.
    • Felipe GuedesF
      Felipe Guedes
      last edited by

      @Russ sorry i'm very dummy, i don't know how to execute with parameters.
      I try this several times, but the Execute comando dont recognize my pc.
      I try to say: "Alexa, abrir Execute Comando", thats perfect, after that, when i say: "Execute automação(That is name to my command) no PC(voice name) com parametro boss baby, doesn't work, Alexa say: Eu não encontrei o dispositivo PC.

      Can you create a video with a exemple executing something with parameters, and configuration.

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

        @Felipe-Guedes, before you try to use Alexa, you should make sure your command works the way you expect using the Parameters button.

        3d81048f-ea11-4817-9304-0e5ae6af1d99-image.png

        Before the button will show up, you'll need to enable parameters on your command:

        231ac2b9-3699-4907-992f-bc75d48066d2-image.png

        Then when you click this button:

        79353e80-8268-4f1e-ade2-2bd630a0571f-image.png

        You should have a phrase that ends with X.

        11dd3808-acd9-41f5-997a-44047bf1a797-image.png

        When you talk to Alexa, you say your parameter in place of X.

        Here's a video I made a while ago about how it works with Alexa:
        https://www.youtube.com/watch?v=P6m9gJIsuxE

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • Felipe GuedesF
          Felipe Guedes
          last edited by

          @Russ I dont know why, but de command doesn't execute NODE command.
          Can you explain to me what i need to do?

          1 Reply Last reply Reply Quote 0
          • Felipe GuedesF
            Felipe Guedes
            last edited by

            When i run with parameters, it mark that command is run, but to my nothing happens.

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

              @Felipe-Guedes, the best way to troubleshoot is make sure it works from a cmd prompt first. If you get an error running the node command at the cmd prompt you probably don't have nodejs installed yet.

              After you get it working from the cmd prompt, then add it to the TRIGGERcmd agent and include the parameters in the command field at first.

              This is boss baby example is actually pretty complex to implement, and I realize I didn't include all of the steps. I'm going to be busy this 4th of July weekend but after that I can make a more detailed video if you want.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • Felipe GuedesF
                Felipe Guedes
                last edited by

                Tks @Russ ,
                The command in node runs very well, but when i try to run in trigger cmd in my windows doenst run, when i try to run by the website, it shows me it did, but it didn't.

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

                  @Felipe-Guedes, what is your command? And does that same command work if you run it in a Windows cmd prompt?

                  Russell VanderMey

                  1 Reply Last reply Reply Quote 0
                  • Felipe GuedesF
                    Felipe Guedes
                    last edited by

                    Yes my command runs very well.

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

                      @Felipe-Guedes, it works from the cmd prompt but not from TRIGGERcmd? If so, maybe in your cmd window you're running it from the directory where the script resides, so the problem with running it via TRIGGERcmd is that the working directory is not where the javascript file is. In which case, you could either create a batch file that changes the working dir to that folder before running the node command, or it might be adequate to specify the full path to the .js file as part of your command like this:

                      node c:\scripts\scriptdir\script.js
                      

                      Russell VanderMey

                      1 Reply Last reply Reply Quote 0
                      • Felipe GuedesF
                        Felipe Guedes
                        last edited by

                        Yes, i know that.
                        Thats my configuration:
                        {
                        "trigger": "abrir google",
                        "command": "node C:\Users\Artista\Documents\node_modules\selenium-webdriver\exemple\google.js",
                        "ground": "foreground",
                        "voice": "abrir google",
                        "voiceReply": "",
                        "allowParams": "true"
                        }

                        And the full path:
                        c6a209ef-d18f-43ce-a0b0-2ac841491e9d-image.png

                        When i run directly in cmd, runs very well like i said, but in trggercmd no.

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

                          @Felipe-Guedes, thanks for that info. That helps.

                          I'm still thinking it's a problem with the working directory. Node knows how to find module dependencies based on the working directory. Would you mind trying this?

                          Create a script called c:\scripts\google.bat with these contents:

                          cd /d C:\Users\Artista\Documents\node_modules\selenium-webdriver\exemple
                          node google.js
                          

                          Then make this your triggercmd command: c:\scripts\google.bat

                          Russell VanderMey

                          1 Reply Last reply Reply Quote 0
                          • Felipe GuedesF
                            Felipe Guedes
                            last edited by

                            Perfect, now i can execute the command in trigger cmd and i have other problem hhahahahah.
                            When i say - "Alexa, Execute comando" -> "Execute automacao com parametro boss baby" -> She don't recognize my command. Isn't an exemple with parameters in portuguese.
                            Help me, we almost there !

                            1 Reply Last reply Reply Quote 0
                            • Felipe GuedesF
                              Felipe Guedes @Felipe Guedes
                              last edited by

                              @Felipe-Guedes Otherwise, is this configuration set maximized chrome.

                              var chrome = require("selenium-webdriver/chrome");
                              
                              /** 
                               * Set chrome command line options/switches
                              */      
                              var chromeOptions = new chrome.Options();
                              chromeOptions.addArguments("test-type");
                              chromeOptions.addArguments("start-maximized");
                              chromeOptions.addArguments("--js-flags=--expose-gc");
                              chromeOptions.addArguments("--enable-precise-memory-info");
                              chromeOptions.addArguments("--disable-popup-blocking");
                              chromeOptions.addArguments("--disable-default-apps");
                              chromeOptions.addArguments("--disable-infobars");
                              
                              var driver = new Builder()
                                  .forBrowser('chrome')
                                  .setChromeOptions(chromeOptions)
                                  .build();
                              

                              I'm still searching how to set full screen in video, and how to stop and play.
                              i'll post here when i find

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

                                @Felipe-Guedes, does this work?

                                Alexa, pergunte Execute Comando execute automacao com o parâmetro boss baby.

                                I think I need to fix the portuguese text on the voice command cheat sheet page.

                                EDIT: I updated that voice command cheat sheet page. I hope that works better.

                                Russell VanderMey

                                Felipe GuedesF 1 Reply Last reply Reply Quote 0
                                • Felipe GuedesF
                                  Felipe Guedes @Russ
                                  last edited by

                                  @Russ it's doesn't work.
                                  No problem

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

                                    @Felipe-Guedes, what does Alexa say back to you?

                                    Russell VanderMey

                                    Felipe GuedesF 1 Reply Last reply Reply Quote 0
                                    • Felipe GuedesF
                                      Felipe Guedes @Russ
                                      last edited by

                                      @Russ I try to say in this order:

                                      Alexa, Abrir Execute Comando
                                      Alexa, Execute automação com parâmetro boss baby
                                      Alexa says: Diga algo como execute a calculadora no laptop, você também pode dizer para se já estiver terminado.
                                      

                                      Other way:

                                      Alexa, pergunte Execute Comando executar automação com o parâmetro X.
                                      Alexa says: Diga algo como execute a calculadora no laptop, você também pode dizer para se já estiver terminado.
                                      
                                      RussR 1 Reply Last reply Reply Quote 0
                                      • RussR
                                        Russ @Felipe Guedes
                                        last edited by Russ

                                        Thank you @Felipe-Guedes! That helps. I found and fixed one problem so far:

                                        I said, "Alexa, pergunte Execute Comando executar calculadora." and Alexa sent this to my server, which is wrong. The value should have been calculadora, not comando calculadora.

                                          "name": "Trigger",
                                          "value": "comando calculadora",
                                        

                                        I've had this problem before. Alexa sends extra words in the trigger field. I fixed that, but I'm not sure that's the problem you were having.

                                        After that it worked for me. I said, "Alexa, pergunte Execute Comando executar automação com o parâmetro boss baby" and it ran my command and passed "bos baby" as the parameter.

                                        c1b06f06-51f3-4d66-a701-584834ba1358-image.png

                                        This is my test command:

                                        8ad7e2ef-e4fe-4da7-96e6-15c56d392f17-image.png

                                        Will you please test again and tell me if that helped?

                                        Russell VanderMey

                                        1 Reply Last reply Reply Quote 0
                                        • Felipe GuedesF
                                          Felipe Guedes
                                          last edited by

                                          i need to update something?

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

                                            @Felipe-Guedes, no, I updated the code on the server to handle the problem when Alexa sends comando with the trigger word. I'm hoping that solves the problem you're having.

                                            Russell VanderMey

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post