• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Almost done need to active my mirror by Phrase

Scheduled Pinned Locked Moved Unsolved Troubleshooting
phrase
24 Posts 4 Posters 7.3k Views 4 Watching
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.
  • ? Offline
    A Former User @otto
    last edited by Sep 10, 2019, 10:43 PM

    @otto I think your code is enough.(at least logically). evenif there be a problem, it would not be serious to solve.

    O 1 Reply Last reply Sep 11, 2019, 9:37 AM Reply Quote 0
    • O Offline
      otto @Guest
      last edited by Sep 11, 2019, 9:37 AM

      @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?
      ? 1 Reply Last reply Sep 11, 2019, 9:40 AM Reply Quote 0
      • ? Offline
        A Former User @otto
        last edited by A Former User Sep 11, 2019, 9:40 AM Sep 11, 2019, 9:40 AM

        @otto
        module: [] will point all modules.
        if you want, you can add specific module names in it. like module:["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.
        1 Reply Last reply Reply Quote 0
        • S Offline
          smassy
          last edited by smassy Sep 17, 2019, 1:45 AM Sep 17, 2019, 1:44 AM

          @otto

          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.

          O 2 Replies Last reply Sep 22, 2019, 8:36 AM Reply Quote 0
          • O Offline
            otto @smassy
            last edited by Sep 22, 2019, 8:36 AM

            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…

            1 Reply Last reply Reply Quote 0
            • O Offline
              otto
              last edited by otto Sep 22, 2019, 11:26 AM Sep 22, 2019, 11:24 AM

              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,**
              ? 1 Reply Last reply Sep 22, 2019, 11:28 AM Reply Quote 0
              • ? Offline
                A Former User @otto
                last edited by Sep 22, 2019, 11:28 AM

                @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.

                O 1 Reply Last reply Sep 23, 2019, 9:59 AM Reply Quote 0
                • O Offline
                  otto @Guest
                  last edited by Sep 23, 2019, 9:59 AM

                  @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/bw4QpXnL

                  it feels like my config is a bit messy?

                  1 Reply Last reply Reply Quote 0
                  • O Offline
                    otto @smassy
                    last edited by Sep 23, 2019, 10:13 AM

                    @smassy can u post your config, whant to see whear u add the recipes line,

                    1 Reply Last reply Reply Quote 0
                    • O Offline
                      otto
                      last edited by otto Sep 28, 2019, 5:58 PM Sep 28, 2019, 5:57 PM

                      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 works

                      can 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

                      ? S 2 Replies Last reply Sep 29, 2019, 10:36 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        16/24
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy