Hello Bugsounet ! Back it's great
-
Hello Cedric. Glad to be able to chat with you again!
I have a little question.
Is it possible to send a notification via the google assistant to a particular module asking it to hide?
I think I know the answer but I am convinced that you will find a solution for me …For info: I created a recipe, configure my module for reception.
It seems that the command reaches the module and is decoded according to the information I see on the console in dev mode) but I have the impression that when the GA closes all the modules are reloaded suddenly my order is canceled.
You confirm ? -
hi, when your module received the information just lock the hidding (maybe you have not set it)
with something like this:
module.hide(500, {lockString: "LOCKEDBYMYMODULE"}) ```js `lockString` value is +/- equal a password for locking (other module can't lock it) after for show it's the same ;)
-
It works perfectly with this method. Thank you !
-
One more thing … Is it possible to send multiple notifications in the same command. I have been looking for hours but cannot find the exact syntax …
Like
notificationExec: {
notification: “HIDE_XXX”, “HIDE_YYY”
} -
give me your recipe, i will see
-
var recipe = { transcriptionHooks: { "masquerlesmodules": { pattern: "supprime tous les modules", command: "masquerlesmodules" }, "afficherlesmodules": { pattern: "affiche tous les modules", command: "afficherlesmodules" }, "masquercolis": { pattern: "supprime le module mes colis", command: "masquercolis" }, "affichercolis": { pattern: "affiche le module mes colis", command: "affichercolis" }, "masquerscoreboard": { pattern: "supprime le module résultats foot", command: "masquerscoreboard" }, "afficherscoreboard": { pattern: "affiche le module résultats foot", command: "afficherscoreboard" } }, commands: { "masquerlesmodules": { notificationExec: { notification: "HIDE_SHIPPING,HIDE_SCOREBOARD", } }, soundExec: { chime: "close" }, "afficherlesmodules": { notificationExec: { notification: "SHOW_SHIPPING,SHOW_SCOREBOARD", } }, soundExec: { chime: "open" }, "masquercolis": { notificationExec: { notification: "HIDE_SHIPPING", } }, soundExec: { chime: "close" }, "affichercolis": { notificationExec: { notification: "SHOW_SHIPPING", } }, soundExec: { chime: "open" }, "masquerscoreboard": { notificationExec: { notification: "HIDE_SCOREBOARD", } }, soundExec: { chime: "close" }, "afficherscoreboard": { notificationExec: { notification: "SHOW_SCOREBOARD", } }, soundExec: { chime: "open" } }, plugins: { // Describe your plugin callback functions here. // }, } exports.recipe = recipe // Don't remove this line.
-
@2hdlockness said in Hello Bugsounet ! Back it's great:
some errors inside (and corrected)
try this for many notification to send:
var recipe = { transcriptionHooks: { "masquerlesmodules": { pattern: "supprime tous les modules", command: "masquerlesmodules" }, "afficherlesmodules": { pattern: "affiche tous les modules", command: "afficherlesmodules" }, "masquercolis": { pattern: "supprime le module mes colis", command: "masquercolis" }, "affichercolis": { pattern: "affiche le module mes colis", command: "affichercolis" }, "masquerscoreboard": { pattern: "supprime le module résultats foot", command: "masquerscoreboard" }, "afficherscoreboard": { pattern: "affiche le module résultats foot", command: "afficherscoreboard" } }, commands: { "masquerlesmodules": { notificationExec: { notification: "HIDE_SHIPPING,HIDE_SCOREBOARD" }, soundExec: { chime: "close" } }, "afficherlesmodules": { moduleExec: { module: ["MMM-GoogleAssistant"], exec: (module) => { module.sendNotification("SHOW_SHIPPING") module.sendNotification("SHOW_SCOREBOARD") } }, soundExec: { chime: "open" } }, "masquercolis": { notificationExec: { notification: "HIDE_SHIPPING" }, soundExec: { chime: "close" } }, "affichercolis": { notificationExec: { notification: "SHOW_SHIPPING" }, soundExec: { chime: "open" } }, "masquerscoreboard": { notificationExec: { notification: "HIDE_SCOREBOARD" }, soundExec: { chime: "close" } }, "afficherscoreboard": { notificationExec: { notification: "SHOW_SCOREBOARD" }, soundExec: { chime: "open" } }, }, plugins: { // Describe your plugin callback functions here. // }, } exports.recipe = recipe // Don't remove this line.
result:
[Notification][MMM-GoogleAssistant] ASSISTANT_HOOK [Notification][MMM-GoogleAssistant] SHOW_SHIPPING [Notification][MMM-GoogleAssistant] SHOW_SCOREBOARD [Notification][MMM-GoogleAssistant] ASSISTANT_STANDBY
I have only do : “afficherlesmodules” command
-
It’s perfect and I didn’t fall into the trap I saw that you had intentionally forgotten to put a }
"afficherlesmodules": { moduleExec: { module: ["MMM-GoogleAssistant"], exec: (module) => { module.sendNotification("SHOW_SHIPPING") module.sendNotification("SHOW_SCOREBOARD") } } <---HERE }, soundExec: { chime: "open" } },
-
nop …
just copy/past ALL my purpose
sample of command:
"command": { moduleExec: { module: ["MMM-GoogleAssistant"], exec: (module) => { !!! <JS command to do > !!!! } }, soundExec: { chime: "open" } },
others is:
"command name": { notificationExec: { notification: "some noti" }, soundExec: { chime: "close" } },
-
ps: did you read the chat I sent you about the personal GA Backround on JARVIS Iron Man that I did?
Et pps: Peut-on parler directement en Français sur ton forum ou préfères tu que l’on parle Anglais absolument ?
-
sorry i prefer english, FR is only for FR modules (Freebox for example)
sure in private you can