Read the statement by Michael Teeuw here.
Almost done need to active my mirror by Phrase
-
hotword config doc
https://github.com/eouia/MMM-Hotword/blob/master/documents/usage.md
glance only displays the info for some period of time… (default 10 seconds)… how long do you want the info to stay on screen?
the README.md file for each module tells how to use it
-
@sdetweil said in Almost done need to active my mirror by Phrase:
hotword config doc
https://github.com/eouia/MMM-Hotword/blob/master/documents/usage.md
glance only displays the info for some period of time… (default 10 seconds)… how long do you want the info to stay on screen?
the README.md file for each module tells how to use it
thanks for link i have been redning and reding it a coupel of time, and i notis the "This is a real example of recipe file"
is what i am looking for, that is a code for show all/hide all, the “only” thing i need figuer out, is how to get it to work, i need to record some new audio files, and change the “show all” to my phrase that i whant.
and creat trainer for it:Dlooks like i maybe can solve this.
The qustine is if i need to anything more?
will that code hide all of my modules?
or do i need to typ all the namn of them,dont rely know how to explain, i hoop u understand, if not let me know
var recipe = { models: [ { hotwords : "hideall", file : "hideall.pmdl", sensitivity : "0.5", }, { hotwords : "showall", file : "showall.pmdl", sensitivity : "0.5", }, ], commands: { "hideall": { moduleExec: { module: [], exec: (module) => { module.hide()} } }, "showall": { moduleExec: { module: [], exec: (module) => { module.show()} } }, }, } exports.recipe = recipe // Don't remove this line.````
-
@otto I think your code is enough.(at least logically). evenif there be a problem, it would not be serious to solve.
-
@Sean thanks for reply
commands: { "hideall": { moduleExec: { **module: [],** exec: (module) => { module.hide()}```` Do i need write all of the module namn? or is that module [], inculude all of my module? if so i "just need to" 1. record audio file using tranier 2 add the file to models directory 2. add the recipe file to recipes directory 3. add config js : recipes: ["hide_show_all"] any it that right?
-
@otto
module: []
will point all modules.
if you want, you can add specific module names in it. likemodule:["clock", "calendar"]
Your attempt is right. Wish you good luck.
If you have trouble, contact me via these;- mail : eouia0819@gmail.com
- Telegram : @eouia
Or github issue board.
-
The way I did it is by using MMM-Assistantmk2, hotword and google voice reco. There is an already build ‘recipe’ in Assistantmk2 that do what you want.
The module is hide_and_show_all_modules.js
var recipe = { transcriptionHook: { "HIDE_ALL_MODULES": { pattern: "Go to sleep", command: "HIDEMODULES" }, "SHOW_ALL_MODULES": { pattern: "Wake up", command: "SHOWMODULES" }, }, command: { "HIDEMODULES": { moduleExec: { module:()=>{ return [] }, exec: (module, params, key) => { module.hide(1000, null, {lockString:"AMK2"}) } } }, "SHOWMODULES": { moduleExec: { module:()=>{ return [] }, exec: (module, params, key) => { module.show(1000, null, {lockString:"AMK2"}) } } }, }, } exports.recipe = recipe
In your config.js file , within the MMM-AssistantMk2 section, there is a line where you have to put all your ‘recipes’
recipes: ["hide_and_show_all_modules.js","playlist.js","volume.js"],
When I say ‘Jarvis Go to sleep’ my screen goes black and then when I say ‘Jarvis Wake up’ all my modules appear.
For the record I’m french :smiling_face: so the phrases there are not the one I’m using, it may need some test so you don’t use google reserved words.
-
yes i am doing almost the same, i found the hide_and show all… i did make new hotword, and have edit the recipes… so all i have left now, was to start it and see it work but, cant some error in the config…
-
i cant post my code, the forum is saying its spam:/
position: "top_right", config: { recipes: ["hiden_show_all.js",] chimeOnFinish: null, mic: { recordProgram: "arecord", device: "plughw:1" }, models: [ { hotwords : "smart_mirror", file : "smart_mirror.umdl", sensitivity : "0.5", }, ], commands: { "smart_mirror": { notificationExec: { notification: "ASSISTANT_ACTIVATE", payload: (detected, afterRecord) => { return {profile:"default"} } }, restart:false, afterRecordLimit:0 ``` i am geting error on **chimeOnFinish: null,**
-
@otto
First, you should confirm how it works; With MMM-Hotword itself? or With MMM-AssistantMk2? both are slightly different. I think you have some confusing at this moment. -
@Sean dont relly understand you post. and dont rely know what i sholde do next, this is the first boot up afteri have create hotword, recipes, dont know if its wrong in my config or in my files,
this is my config:
https://pastebin.com/bw4QpXnLit feels like my config is a bit messy?