Solved MMM-GoogleAssistant recipes
-
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"], }, } ``` },
-
because it’s works only with
pm2
and id0
if you don’t use pm2, it will not worksif 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) -
I actually do use pm2 . I use it to start and stop magic mirror
-
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
-
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.
-
can you send me your
pm2 status
plz -
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 -
Just so you know I also tried it on my Linux machine which is a separate computer and I get the same results
-
ok id is 0 so :
pm2 restart 0
orpm2 restart MagicMirror
should workswhen you say:
restart please
: you have have Hooks icon ?
-
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 -
Is there something in Google assistant configuration that’s turned off and should be turned on. Maybe
-
yes, but it’s not respond to my primary question
@bugsounet said in MMM-GoogleAssistant recipes:
ok id is 0 so :
pm2 restart 0
orpm2 restart MagicMirror
should workswhen you say:
restart please
: you have have Hooks icon ?
you should have this (with icons hook)
if you don’t have it … it will not works
-
Okay I get it so I don’t have that. So how do I fix this problem
-
ok, it’s just mean google use this callback in your language
so retry with an other
pattern
withoutrestart
word -
Okay I replaced restart. Please with Ray
all Google did was tell me who Ray wastranscriptionHooks: { "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" } } } ```}
-
are you sure that the recipe name is good in your conf ?
-
again: are you sure that this line is present in the last line:
exports.recipe = recipe // Don't remove this line.
-
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.
-
@bugsounet said in MMM-GoogleAssistant recipes:
are you sure that the recipe name is good in your conf ?
-
{
module: “MMM-GoogleAssistant”,
position: “top_bar”,
configDeepMerge: true,
config: {
assistantConfig: {
latitude: 37.902881,
longitude: -122.057133,
recipes: [ “MM2-Restart.js” ],
},
}
},