Read the statement by Michael Teeuw here.
Almost done need to active my mirror by Phrase
-
@sdetweil said in Almost done need to active my mirror by Phrase:
@otto I think MMM-Hotword has enough capability to wake up from sleeping hotword detection
The question is how… I have found one that are using Alexa, but not google.
And to be honest I don’t rely know where to start. -
@otto MMM-Hotword listens for the starter word (alexa, mirror, smart-mirrot…) and then signals assistant started, so the assistant can take over. MMM-AssistantMk2 is for google assistant…
but the latest hotword can do wakeup i think… @Sean has done a good job…
i use this combo on one of my mirror setups… (mostly to tell it to go to sleep!, vs wait til the no motion timeout)…
but i can ask anything i can ask GA. my home automation goes thru insteon smarthome devices which I have connected thru Alexa. i haven’t tried GA for that
-
@sdetweil i have been doing som googleing… and found some intresseting post in the forum:
https://forum.magicmirror.builders/topic/5003/mmm-glance-glance-focus-specific-module-s
https://forum.magicmirror.builders/topic/8444/wake-mirror-with-voice/14?
page=2https://forum.magicmirror.builders/topic/653/voice-controlled-wake-sleep-function
-
i think i will needing this:
MMM-Glance will be use as hiding the modules
MMM-Hotword for for the comand mirror mirror on the wall to active it
MMM-NotificationTrigger that will do the hard work and start/stop it allif i can combien them some way it can work, dont know if there is a more faster way
and not sure how -
@otto hotword hears the phrase, and sends the notification you configure.
Some other module listens for that notification and does what you configure. No reason to send ANOTHER notification (notification trigger)… send what glance needs -
@sdetweil okej so u think i just need hotword and glance?
i did install MMM-glance i have no ide what i am doing right now. SO i guess this is as wrong at it can be:/
{ module: 'MMM-Glance', config: { defaultGlancingTime: 10000, alias: { "news" : "newsfeed", module: "alert", "MMM-NowPlayingOnSpotify", "updatenotification", "calendar","compliments","currentweather","weatherforecast","newsfeed","MMM-Hotword","MMM-AssistantMk2", "party mode" : ["clock", "helloworld", "MMM-Something"], ... } } }```` -
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 = recipeIn 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?
-
@smassy can u post your config, whant to see whear u add the recipes line,
-
so i got some time over today, to test it all,
if i say: hide all module it dosent work
but it if i say :Smart mirror hide all modules it works
but mirror mirror on the wall i just get some saying from it, not show the modules.
i need to say :smart mirror show all module it workscan i some way change so i dont need to say smart mirror, just hide all module?
i now need to trying found out what is wrong…dont know wher to start, i guees the .pdl i a good one
-
@otto
You can use MMM-Hotword standalone without MMM-AsistantMk2 just to call simple Hotword as a command.
Make your own .pmdl(“hide modules”). Then make a command of MMM-Hotword to be executed when “hide modules” be called. -
In config.js
{ module: "MMM-AssistantMk2", position: "top_right", config: { // --- ESSENTIALS / modifying for your environment might be needed. deviceLocation: { coordinates: { // set the latitude and longitude of the device to get localized information like weather or time. (ref. mygeoposition.com) latitude: 45.6307, // -90.0 - +90.0 longitude: -72.9563, // -180.0 - +180.0 }, }, recipes: ["hide_and_show_all_modules.js","playlist.js","volume.js"], defaultProfile: "default", // If you have several profiles and want to set one of them as default profile, describe here. profiles: { "default" : { // profile name. profileFile: "default.json", // profile file name. lang: "fr-CA" //currently available (estimation, not all tested): // de-DE, en-AU, en-CA, en-GB, en-US, en-IN // fr-CA, fr-FR, it-IT, ja-JP, es-ES, es-MX, ko-KR, pt-BR // https://developers.google.com/assistant/sdk/reference/rpc/languages }, /* Add your other profiles here, if exists. "other_profile" : { profileFile: "other.json", lang: "de-DE" } */ }, record: { // Full values are in `FOR EXPERTS` section. recordProgram: "arecord", // Defaults to "arecord" - also supports "rec" and "sox" device: "plughw:1" // recording device (e.g.: "plughw:1") }, notifications: { ASSISTANT_ACTIVATED: "HOTWORD_PAUSE", ASSISTANT_DEACTIVATED: "HOTWORD_RESUME", }, play: { // Full values are in `FOR EXPERTS` section. playProgram: "mpg321", // recommended. }, // --- OPTIONAL / not important but customizable for your usage responseVoice: true, // If available, Assistant will response with her voice. responseScreen: true, // If available, Assistant will response with some rendered HTML responseAlert: true, // If available, Assistant will response with Alert module of MM // Sometimes, any response might not be returned. responseAlert is useful for displaying error. screenZoom: "80%", // Adjust responseScreen to your mirror size. screenDuration: 0, // milliseconds. How long responseScreen will be shown after speech. //If you set 0, Screen Output will be closed after Response speech finishes ASAP. youtubeAutoplay: true, //If set as true, found Youtube video will be played automatically. pauseOnYoutube:true, //If set as true, You cannot activate Assistant during youtube playing. //Recommended for the performance (Because permanent hotword detecting might make performance lower) youtubePlayerVars: { // You can set youtube playerVars for your purpose, but should be careful. "controls": 0, "loop": 1, "rel": 0, }, youtubePlayQuality: "default", //small, medium, large, hd720, hd1080, highres or default useWelcomeMessage: "", //Try "brief today" as this value. You can use this value to check module working when MM is starting. onIdle: { //timer: 1000*60*30, // if you don't want to use this feature, just set timer as `0` or command as "" //command: "HIDEMODULES", timer: 0, command: null, }, onActivate: { timer: 0, //command: "SHOWMODULES" command: null, }, }, },
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login