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 @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
            • Felipe GuedesF
              Felipe Guedes
              last edited by

              When i said the command like you said, alexa anwser me a helper to execute the command.

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

                @Felipe-Guedes, are you saying Alexa answered this way again?

                Diga algo como execute a calculadora no laptop, você também pode dizer para se já estiver terminado.
                

                Also, if you go to https://alexa.amazon.com/ you can see the words Alexa thinks you said. Can you copy/paste that here?

                This is what mine showed:

                ec4ad4f7-5cd4-42b8-a9aa-669b820f6932-image.png

                Russell VanderMey

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

                  Sorry, i don't see this msg.
                  Yes, Alexa answer exactly this.

                  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

                    @Felipe-Guedes, does this site work in Brazil or is this just the english or US version of Alexa web?
                    https://alexa.amazon.com/spa/index.html#cards
                    I was hoping you could use that site because it's helpful to know what Alexa is hearing.

                    Also, if this is too much to ask, no problem, but would you mind sending me a recording of yourself saying, this?
                    Alexa, pergunte Execute Comando executar automação com o parâmetro bos baby.
                    I might be able to use the recording to "train" Alexa to hear it correctly.

                    Thank you for your patience.

                    Russell VanderMey

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

                      its that !
                      alexa.PNG

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

                        @Russ How i send you my voice record?

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

                          @Felipe-Guedes, you could use one device, like your computer to play it using that play button: 1f596754-56ea-4a76-a7f5-92de54da7f62-image.png ... and use another device, like your phone to record it.

                          Russell VanderMey

                          AdalbertoA 1 Reply Last reply Reply Quote 0
                          • AdalbertoA
                            Adalberto @Russ
                            last edited by Adalberto

                            @Russ Hello, Russ. I didn't get lucky with this javascript here and I have created my own using Python + Selenium. It actually does the same thing. Opens the browser, inserts the credentials, searchs for the movie (parameter), plays it and puts it on fullscreen. If someone is interested, I can share the code.

                            But actually, my reply is about the way we talk to Alexa to run the script. I'm from Brazil as well... When I'm using "Execute comando" it doesn't feel natural. Most of it is because the "pergunte" in the beginning. Something more like "Alexa, Execute Comando YYYY com parâmetro XXXX" would feel better.

                            The "execute comando" needs to be part of the phrase and not the name of the service to feel more natural.

                            André Ricardo da CostaA 1 Reply Last reply Reply Quote 0
                            • André Ricardo da CostaA
                              André Ricardo da Costa @Adalberto
                              last edited by

                              @Adalberto eu tenho interesse em testar esse código de puder compartilhar amigo. Muito obrigado.

                              AdalbertoA 1 Reply Last reply Reply Quote 0
                              • AdalbertoA
                                Adalberto @André Ricardo da Costa
                                last edited by

                                @André-Ricardo-da-Costa

                                • You will need to install Python and Selenium
                                • Video for reference (PT-BR):
                                  • Python: https://www.youtube.com/watch?v=FcfalMf9bRY
                                  • Selenium: https://www.youtube.com/watch?v=Ot10qzrb13c (choose the version compatible with your browser)
                                • Remember to put Python on windows PATH (during installation)
                                from selenium import webdriver
                                from selenium.webdriver.common.keys import Keys
                                from selenium.webdriver.common.by import By
                                from selenium.webdriver.support.ui import WebDriverWait
                                from selenium.webdriver.support import expected_conditions as EC
                                import time
                                import sys
                                
                                if len(sys.argv) == 2:
                                    movie = sys.argv[1]
                                else:
                                    movie = ' '.join(sys.argv[1:])
                                
                                # You can put the chromedriver wherever you want - you can download it from http://seleniumhq.github.io/selenium/docs/api/javascript/
                                PATH = r"C:\chromedriver.exe"
                                # You can select any browser available for Selenium
                                driver = webdriver.Chrome(PATH)
                                
                                #Netflix login initial page
                                driver.get("https://www.netflix.com/br/login")
                                element = driver.find_element_by_name("userLoginId")
                                
                                #Insert your email
                                element.send_keys("netflixacc@gmail.com")
                                time.sleep(0.2)
                                
                                #Insert your password
                                element2 = driver.find_element_by_name("password")
                                element2.send_keys("netflixpassword")
                                time.sleep(0.3)
                                element2.send_keys(Keys.RETURN)
                                time.sleep(2)
                                
                                #Insert your profile name as seen after you log in
                                profile = driver.find_element_by_link_text("netflixprofilename")
                                profile.click()
                                
                                time.sleep(3)
                                search = driver.find_element_by_class_name("searchBox")
                                search.click()
                                
                                time.sleep(1)
                                searchbox = driver.find_element_by_name("searchInput")
                                searchbox.send_keys(movie)
                                
                                time.sleep(0.5)
                                searchbox.send_keys(Keys.RETURN)
                                
                                time.sleep(2)
                                scene = driver.find_element_by_xpath("/html/body/div[1]/div/div/div[1]/div/div[2]/div/div/div/div[2]/div/div/div[1]/div/div/div/div/div/div[1]")
                                scene.click()
                                
                                time.sleep(0.5)
                                submit = driver.find_element_by_xpath("//button[@class='color-primary hasLabel hasIcon ltr-1jnopvq']")
                                submit.click()
                                
                                time.sleep(5)
                                move = driver.find_element_by_xpath("//button[@class='touchable PlayerControls--control-element nfp-button-control default-control-button button-nfplayerBack tooltip-button tooltip-button-pos-center tooltip-button-align-right']")
                                move.send_keys(Keys.TAB)
                                
                                time.sleep(0.5)
                                fullscreen = driver.find_element_by_xpath("//button[@class='touchable PlayerControls--control-element nfp-button-control default-control-button button-nfplayerFullscreen']")
                                fullscreen.click()
                                

                                On TRIGGERcmd:
                                Trigger: Search on Netflix
                                (EXAMPLE) Command: start C:\PycharmProjects\netflix\netflix.py
                                (You need to put your py file directory)
                                Ground: foreground
                                Voice: netflix
                                Allow parameters: true

                                Portuguese:
                                Activate Execute Comando skill on Alexa app
                                To Alexa: "Alexa, pergunte Execute Comando executar netflix com parâmetro the alienist"

                                English:
                                Activate TRIGGERcmd skill on Alexa app
                                To Alexa: "Alexa, ask TRIGGERcmd to run netflix on the alienist"

                                Any updates I will edit the post. There are things that I want to improve (like the sleep time)

                                Nico RamirezN 1 Reply Last reply Reply Quote 3
                                • DevilsirD
                                  Devilsir
                                  last edited by

                                  Sem título.png
                                  plz, everything worked fine, but seach bar isnt working :(, what can i do?

                                  DevilsirD 1 Reply Last reply Reply Quote 0
                                  • DevilsirD
                                    Devilsir @Devilsir
                                    last edited by

                                    @Devilsir alexa cnt recognize "parametro" commands, if i tell her turn on "netflix" it works, but without parameters

                                    1 Reply Last reply Reply Quote 0
                                    • Nico RamirezN
                                      Nico Ramirez @Adalberto
                                      last edited by

                                      @AdalbertUma pergunta, eu uso python, quando procuro que o argumento está vazio, você poderia me ajudar com qual seria o problema, por favor

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

                                        @Nico-Ramirez, Google Translate translated what you said to this:
                                        Question, I use python, when I make sure that the argument is empty, could you help me with what serious or problem, please

                                        I'm not sure what the problem is. Please clarify.

                                        Russell VanderMey

                                        1 Reply Last reply Reply Quote 0
                                        • RussR Russ referenced this topic on
                                        • tuicemenT tuicemen referenced this topic on
                                        • First post
                                          Last post