Bugsounet Coding

    • Register
    • Login
    • Search
    This Forum is now reserved to registred users!

    Please tell me the recipe when you want to open a specific URL by command

    Recipes
    3
    9
    110
    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.
    • P
      pangeafor last edited by

      Dear MagicMirror fans, let me know. If you want to open a specific URL page for a command using EXT-Browse with MMM-GoogleAssistant, how should you describe it in the recipe?

      A 1 Reply Last reply Reply Quote 0
      • A
        Anthony Donators @pangeafor last edited by

        @pangeafor Hello. I don’t think you need a recipe to open a website. Just say to Jarvis to open “name of website” but bugsounet is the one to give you targeted answer. Check this in case it helps you.

        P 1 Reply Last reply Reply Quote 0
        • P
          pangeafor @Anthony last edited by

          @Anthony
          I’m sorry, I will edit the question. Of course, you can talk to Jarvis and find a page, but if you want Jarvis to open a “specific page” that is not common and has a low ranking in search results, you can do it somewhere. , it means that you have to specify the URL of the page.

          A 1 Reply Last reply Reply Quote 0
          • A
            Anthony Donators @pangeafor last edited by

            @pangeafor I understand. In this case maybe this can help from the wiki:
            This kind of recipe but not sure. I am not a developer

            responseHooks: {
              "FOUND_YOUTUBE": {
                where: "links",
                pattern: "https:\/\/m\.youtube\.com\/watch\\?v=(.+)$",
                command: "PLAY_YOUTUBE"
              }
            },
            commands: {
              "PLAY_YOUTUBE": {
                moduleExec:{
                  module: "MMM-GoogleAssistant",
                  exec: (module, param, from)=>{
                    module.sendNotification("PLAY_THIS_VIDEO", {type:"id", id:param[1]}) // notification to send with param
                  }
                }
              },
            }
            

            But still bugsounet will give you a valid answer.

            P 1 Reply Last reply Reply Quote 0
            • P
              pangeafor @Anthony last edited by

              @Anthony
              Thank you for your advice. If I want to open a specific URL with EXT-Browser instead of Youtube, what should I change?

              A 1 Reply Last reply Reply Quote 0
              • A
                Anthony Donators @pangeafor last edited by

                @pangeafor The one I send you is an example. You must modify it to your needs. I imagine that you have to use the EXT_BROWSER-OPEN notification in the recipe. As I told you I am not a developer so I cannot help you more. Although check this topic because I guess it is the same thing you want. Have patience and bugsounet will reply.

                P 1 Reply Last reply Reply Quote 0
                • P
                  pangeafor @Anthony last edited by

                  @Anthony
                  I am grateful that you gave me various advices. thank you very much. I’m not a developer either, so I’m walking while looking for various hints.

                  1 Reply Last reply Reply Quote 0
                  • bugsounet
                    bugsounet Main Coder last edited by

                    Hi,

                    Something like this:

                    var recipe = {
                      transcriptionHooks: {
                        "WEB_DISPLAY": {
                          pattern: "bugsounet wiki website",
                          command: "WEB_DISPLAY"
                        }
                      },
                    
                      commands: {
                        "WEB_DISPLAY": {
                          notificationExec: {
                            notification: "EXT_BROWSER-OPEN",
                            payload: (params) => {
                              return "https://wiki.bugsounet.fr"
                            }
                          },
                          soundExec: {
                            chime: "open"
                          },
                          displayResponse: false
                        }
                      }
                    }
                    exports.recipe = recipe
                    
                    P 1 Reply Last reply Reply Quote 0
                    • P
                      pangeafor @bugsounet last edited by

                      @bugsounet
                      The recipe you advised worked! Thanks for always helping me out. It’s solid advice.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | @bugsounet ©2022