Bugsounet Coding

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Solved MMM-GoogleAssistant recipes

    Issues
    3
    32
    297
    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.
    • R
      Ray BetaTester last edited by

      I am trying to get one of the existing recipes Reboot-Restart-Shutdown.js to work but I have been unsuccessful.
      when I start magic mirror everything loads just fine including Google assist, But when I say (restart Please) Nothing seems to happen. What am I doing wrong here.

         		module: "MMM-GoogleAssistant",
         		position: "top_bar",
         		configDeepMerge: true,
         		config: {
         			assistantConfig: {
         			latitude: 37.902881,
         			longitude: -122.057133,
         			recipes: ["Reboot-Restart-Shutdown.js"],
         	     },
         	  }
      ```	    },
      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        because it’s works only with pm2 and id 0
        if you don’t use pm2, it will not works

        if you use another id with pm2 change it in the exec value
        (Don’t forget again to rename the file if you don’t use the original because it’s a sample, it will come back to default on every update)

        1 Reply Last reply Reply Quote 0
        • R
          Ray BetaTester last edited by

          I actually do use pm2 . I use it to start and stop magic mirror

          1 Reply Last reply Reply Quote 0
          • R
            Ray BetaTester last edited by

            So I just give it a try and no luck . When magic mirror is up and running . Everything seems to work. I say Jarvis and Google assistance pops up , but when I say restart. Please. Nothing seems to happen

            1 Reply Last reply Reply Quote 0
            • R
              Ray BetaTester last edited by

              I also took your advice and rename the file.
              Here’s what I did, but again, still isn’t working

              /** Reboot, Restart, Shutdown, Screen /
              /
              Vocal commands script /
              /
              set partern in your language /
              /
              @bugsounet **/

              var recipe = {
              transcriptionHooks: {
              “GA_REBOOT”: {
              pattern: “reboot please”,
              command: “GA_REBOOT”
              },
              “GA_RESTART”: {
              pattern: “restart please”,
              command: “GA_RESTART”
              },
              “GA_SHUTDOWN”: {
              pattern: “shutdown please”,
              command: “GA_SHUTDOWN”
              }
              },

              commands: {
              “GA_REBOOT”: {
              soundExec: {
              chime: “close”,
              },
              shellExec: {
              exec: “reboot”
              }
              },
              “GA_RESTART”: {
              soundExec: {
              chime: “close”,
              },
              shellExec: {
              exec: “pm2 restart MagicMirror”
              }
              },
              “GA_SHUTDOWN”: {
              soundExec: {
              chime: “close”,
              },
              shellExec: {
              exec: “shutdown now”
              }
              }
              }
              }

              exports.recipe = recipe // Don’t remove this line.

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

                can you send me your pm2 status plz

                1 Reply Last reply Reply Quote 0
                • R
                  Ray BetaTester last edited by

                  ray@ray-VirtualBox:~$ pm2 status
                  ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
                  │ id │ name │ mode │ ↺ │ status │ cpu │ memory │
                  ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
                  │ 0 │ MagicMirror │ fork │ 0 │ stopped │ 0% │ 0b │
                  └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────

                  I’m currently not running magic mirror. I’m thinking I have something turned off. I just don’t know what it is.
                  I use pm2 start MagicMirror to start my mirror

                  1 Reply Last reply Reply Quote 0
                  • R
                    Ray BetaTester last edited by

                    Just so you know I also tried it on my Linux machine which is a separate computer and I get the same results

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

                      ok id is 0 so :

                      pm2 restart 0 or pm2 restart MagicMirror should works

                      when you say: restart please : you have have Hooks icon ?

                      1 Reply Last reply Reply Quote 0
                      • R
                        Ray BetaTester last edited by

                        Okay I think I’m missing something here. That’s what my current configuration is when I say restart. Please, it should activate pm2 restart MagicMirror but nothing happens.

                        And just to be clear is this action taken when Google assistance starts. For example, I would say Jarvis Google assistant would start then I would say restart. Please
                        is that correct

                        1 Reply Last reply Reply Quote 0
                        • R
                          Ray BetaTester last edited by

                          Is there something in Google assistant configuration that’s turned off and should be turned on. Maybe

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

                            yes, but it’s not respond to my primary question

                            @bugsounet said in MMM-GoogleAssistant recipes:

                            ok id is 0 so :

                            pm2 restart 0 or pm2 restart MagicMirror should works

                            when you say: restart please : you have have Hooks icon ?

                            you should have this (with icons hook)

                            0324968e-9283-45ba-9981-c977d0426518-image.png

                            if you don’t have it … it will not works

                            1 Reply Last reply Reply Quote 0
                            • R
                              Ray BetaTester last edited by

                              Okay I get it so I don’t have that. So how do I fix this problem

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

                                ok, it’s just mean google use this callback in your language

                                so retry with an other pattern without restart word

                                1 Reply Last reply Reply Quote 0
                                • R
                                  Ray BetaTester last edited by

                                  Okay I replaced restart. Please with Ray
                                  all Google did was tell me who Ray was

                                    transcriptionHooks: {
                                      "GA_REBOOT": {
                                        pattern: "reboot please",
                                        command: "GA_REBOOT"
                                      },
                                      "GA_RESTART": {
                                        pattern: "ray",
                                        command: "GA_RESTART"
                                      },
                                      "GA_SHUTDOWN": {
                                        pattern: "shutdown please",
                                        command: "GA_SHUTDOWN"
                                      }
                                    },
                                    
                                    commands: {
                                      "GA_REBOOT": {
                                        soundExec: {
                                          chime: "close",
                                        },
                                        shellExec: {
                                          exec: "reboot"
                                        }
                                      },
                                      "GA_RESTART": {
                                        soundExec: {
                                          chime: "close",
                                        },
                                        shellExec: {
                                          exec: "pm2 restart MagicMirror"
                                        }
                                      },
                                      "GA_SHUTDOWN": {
                                        soundExec: {
                                          chime: "close",
                                        },
                                        shellExec: {
                                          exec: "pm2 stop MagicMirror"
                                        }
                                      }
                                    }
                                  ```}
                                  1 Reply Last reply Reply Quote 0
                                  • bugsounet
                                    bugsounet Main Coder last edited by bugsounet

                                    are you sure that the recipe name is good in your conf ?

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

                                      again: are you sure that this line is present in the last line:

                                      exports.recipe = recipe // Don't remove this line.

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        Ray BetaTester last edited by

                                        I just tried different patterns and always come up with the same thing. I have used the default restart. Please, Ray, house, with no results

                                        /** Reboot, Restart, Shutdown, Screen /
                                        /
                                        Vocal commands script /
                                        /
                                        set partern in your language /
                                        /
                                        @bugsounet **/

                                        var recipe = {
                                        transcriptionHooks: {
                                        “GA_REBOOT”: {
                                        pattern: “reboot please”,
                                        command: “GA_REBOOT”
                                        },
                                        “GA_RESTART”: {
                                        pattern: “ray”,
                                        command: “GA_RESTART”
                                        },
                                        “GA_SHUTDOWN”: {
                                        pattern: “shutdown please”,
                                        command: “GA_SHUTDOWN”
                                        }
                                        },

                                        commands: {
                                        “GA_REBOOT”: {
                                        soundExec: {
                                        chime: “close”,
                                        },
                                        shellExec: {
                                        exec: “reboot”
                                        }
                                        },
                                        “GA_RESTART”: {
                                        soundExec: {
                                        chime: “close”,
                                        },
                                        shellExec: {
                                        exec: “pm2 restart MagicMirror”
                                        }
                                        },
                                        “GA_SHUTDOWN”: {
                                        soundExec: {
                                        chime: “close”,
                                        },
                                        shellExec: {
                                        exec: “shutdown now”
                                        }
                                        }
                                        }
                                        }

                                        exports.recipe = recipe // Don’t remove this line.

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

                                          @bugsounet said in MMM-GoogleAssistant recipes:

                                          are you sure that the recipe name is good in your conf ?

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            Ray BetaTester last edited by

                                            {
                                            module: “MMM-GoogleAssistant”,
                                            position: “top_bar”,
                                            configDeepMerge: true,
                                            config: {
                                            assistantConfig: {
                                            latitude: 37.902881,
                                            longitude: -122.057133,
                                            recipes: [ “MM2-Restart.js” ],
                                            },
                                            }
                                            },

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