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

MMM-Buttons to activate MMM-Assistantmk2 (v3)

Scheduled Pinned Locked Moved Solved Troubleshooting
15 Posts 3 Posters 2.2k Views 3 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.
  • A Offline
    Apartment_Moose
    last edited by Apartment_Moose Jan 17, 2020, 1:02 AM Jan 17, 2020, 1:01 AM

    Hi,

    I am looking to activate MMM-Assistantmk2 (v3) by using the MMM-Buttons module.
    i.e - Press a physical push button to then activate the google assistant.

    I have the buttons working as i can get the speakers to make a sound when i press the button, and the 4 circles start to spin around.
    issue is nothing happens beyond this point. they just continue to spin in a circle…

    I have the below config

    {
        module: "MMM-Buttons",
        config: {
            buttons: [
                {
                    pin: 25,
    		name: "Google",
                    shortPress: {
                        notification: "ASSISTANT_ACTIVATE", 
                        payload: {}
                    }
                },
    ]
    },
    
    {
      module: "MMM-AssistantMk2",
      position: "top_center",
      config: {
    	ui: "Classic",
    	assistantConfig: {
          latitude:xxxxxxxxxxxxxxx,
          longitude: -xxxxxxxxxxxxxxxx,
        },
         defaultProfile: "default",
        micConfig: { 
          recorder: "arecord",
          device: "plughw:0",
        },
            
      },
    },
    
    

    i have even tried putting in a payload…

    payload: {type:"MIC"}
    

    and this gets the 4 dots in a line doing a wave pattern… but again no further

    my mic is working as per testing it on

    arecord -D plughw:0,0 -d 3 test.wav && aplay test.wav

    Any help would be great,
    thanks

    ? 1 Reply Last reply Jan 17, 2020, 8:18 AM Reply Quote 0
    • ? Offline
      A Former User @Apartment_Moose
      last edited by A Former User Jan 17, 2020, 9:50 AM Jan 17, 2020, 8:18 AM

      @Apartment_Moose
      Can you show me the logs? To make things simple, except clock, MMM-Button, MMM-AssistantMk2, You’d better remove all other modules from config.js. Execute MM, then show me what happens in log. (add debug:true to MMM-AssistantMk2’s config)

      S 1 Reply Last reply Jan 17, 2020, 12:21 PM Reply Quote 0
      • S Offline
        sdetweil @Guest
        last edited by Jan 17, 2020, 12:21 PM

        @Sean said in MMM-Buttons to activate MMM-Assistantmk2 (v3):

        ou’d better remove all other modules from config.js.

        just add

        disabled:true,
        

        after the each module: u want to turn off

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • A Offline
          Apartment_Moose
          last edited by Jan 17, 2020, 2:59 PM

          Hi @Sean & @sdetweil

          i restarted the raspberrypi last night and now the module is working (? no idea how) and the assistant is working when i speak.
          my issue now is i have no audio with the assistant (even though recording & playback are fine) & the assistant doesn’t turn off until i repeat the button press a few times until it doesn’t understands me.

          I have run the log with only one failure in the log when i press the button to activate

          
          
          mmap() failed: Cannot allocate memory
          Failed to create permanent mapping for memfd region with ID = 2853658957
          Ignoring received block reference with non-registered memfd ID = 2853658957
          mmap() failed: Cannot allocate memory
          Failed to create permanent mapping for memfd region with ID = 2893321627
          Ignoring received block reference with non-registered memfd ID = 2893321627
          
          
          
          

          any help here ?
          thanks

          ? 1 Reply Last reply Jan 17, 2020, 3:06 PM Reply Quote 0
          • ? Offline
            A Former User @Apartment_Moose
            last edited by Jan 17, 2020, 3:06 PM

            @Apartment_Moose
            I have no idea about mmap(). I’m not sure even whether this issue would be related to my module.
            Set debug:true of MMM-AssistantMk2 then show me the log of MMM-AssistantMk2.

            1 Reply Last reply Reply Quote 0
            • A Offline
              Apartment_Moose
              last edited by Jan 17, 2020, 3:12 PM

              see below

              [15:09:19.817] [LOG]    [AMK2] QUERY: { type: 'MIC',
                profile: { profileFile: 'default.json', lang: 'en-US' },
                key: null,
                lang: null,
                useScreenOutput: true,
                useAudioOutput: true,
                session: 1579273759810,
                status: 'standby',
                secretMode: false,
                sayMode: false }
              [15:09:19.985] [LOG]    [AMK2:AS] MIC:RECORDING START.
              mmap() failed: Cannot allocate memory
              Failed to create permanent mapping for memfd region with ID = 2467795728
              Ignoring received block reference with non-registered memfd ID = 2467795728
              [15:09:20.546] [LOG]    [AMK2:AS] CONVERSATION:RESPONSE 
              [15:09:22.659] [LOG]    [AMK2:AS] CONVERSATION:TRANSCRIPTION { transcription: 'test', done: false }
              [15:09:22.792] [LOG]    [AMK2:AS] CONVERSATION:TRANSCRIPTION { transcription: 'testing', done: false }
              [15:09:23.520] [LOG]    [AMK2:AS] CONVERSATION:TRANSCRIPTION { transcription: 'testing', done: false }
              [15:09:23.548] [LOG]    [AMK2:AS] CONVERSATION:END_OF_UTTERANCE
              [15:09:23.551] [LOG]    [AMK2:AS] MIC:RECORDING_END
              [15:09:23.585] [LOG]    [AMK2:AS] Recorder Error: arecord has exited with error code 1.
              
              Enable debugging with the environment variable DEBUG=record.
              [15:09:23.599] [LOG]    [AMK2:AS] CONVERSATION:TRANSCRIPTION { transcription: 'testing', done: true }
              [15:09:23.906] [LOG]    [AMK2:AS] CONVERSATION:SCREEN object
              [15:09:23.915] [LOG]    [AMK2:AS] CONVERSATION:ACTION { requestId: '5e215c36-0000-2e45-8016-089e0826d0a0' }
              [15:09:23.918] [LOG]    [AMK2:AS] CONVERSATION:RESPONSE 
              [15:09:23.929] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.931] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.933] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.937] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.938] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.940] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.941] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.943] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.944] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.945] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.947] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.949] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.950] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.951] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.953] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.955] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.959] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.962] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.966] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.968] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.970] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.972] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.975] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.979] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.982] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.984] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.986] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.987] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.989] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.990] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.992] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.993] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.995] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.997] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:23.999] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.000] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.002] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.004] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.006] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.008] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.010] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.012] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.015] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.017] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.019] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.022] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.027] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.031] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.034] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.036] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.039] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.041] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.043] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.046] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.051] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.056] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 1600
              [15:09:24.058] [LOG]    [AMK2:AS] CONVERSATION:AUDIO 14
              [15:09:24.065] [LOG]    [AMK2:AS] CONVERSATION_ALL_RESPONSES_RECEIVED
              [15:09:24.066] [LOG]    [AMK2:AS] CONVERSATION_END:COMPLETED
              [15:09:24.067] [LOG]    [AMK2:AS] CONVERSATION_PP:RESPONSE_AUDIO_MAKING
              [15:09:24.097] [LOG]    [AMK2:BW] RESPONSE_WAV_FILE_CREATED
              [15:09:24.099] [LOG]    [AMK2:AS] CONVERSATION_PP:RESPONSE_AUDIO_CREATED tmp/lastResponse.wav
              [15:09:24.228] [LOG]    [AMK2] { session: 1579273759810,
                error: null,
                action: { requestId: '5e215c36-0000-2e45-8016-089e0826d0a0' },
                text: null,
                screen:
                 { help: [ 'What can you do?' ],
                   trysay: 'Try saying…',
                   links: [],
                   text: 'You\'re coming in loud and clear 👌',
                   photos: [],
                   path:
                    '/home/pi/MagicMirror/modules/MMM-AssistantMk2/tmp/lastScreenOutput.html',
                   uri: 'tmp/lastScreenOutput.html' },
                audio:
                 { path:
                    '/home/pi/MagicMirror/modules/MMM-AssistantMk2/tmp/lastResponse.wav',
                   uri: 'tmp/lastResponse.wav' },
                transcription: { transcription: 'testing', done: true },
                continue: false,
                lastQuery:
                 { type: 'MIC',
                   profile: { profileFile: 'default.json', lang: 'en-US' },
                   key: null,
                   lang: null,
                   useScreenOutput: true,
                   useAudioOutput: true,
                   session: 1579273759810,
                   status: 'standby',
                   secretMode: false,
                   sayMode: false } }
              mmap() failed: Cannot allocate memory
              Failed to create permanent mapping for memfd region with ID = 3652511026
              Ignoring received block reference with non-registered memfd ID = 3652511026
              
              
              ? 1 Reply Last reply Jan 17, 2020, 3:16 PM Reply Quote 0
              • ? Offline
                A Former User @Apartment_Moose
                last edited by Jan 17, 2020, 3:16 PM

                @Apartment_Moose
                Well, the module itself is working as log says. But the mmap() failed means, you have not enough memory. (I don’t know why) mmap() issue could happen with various reasons, so hard to point out exactly.
                I think it is not related to my module directly because there was no same issue report but I cannot declare definitely.

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Apartment_Moose
                  last edited by Jan 17, 2020, 3:19 PM

                  @Sean

                  ok thanks for taking a look.
                  dont know what the mmap() issue is but i will look into it

                  @sdetweil
                  do you potentially know what could cause this ?

                  S 1 Reply Last reply Jan 17, 2020, 5:24 PM Reply Quote 0
                  • S Offline
                    sdetweil @Apartment_Moose
                    last edited by Jan 17, 2020, 5:24 PM

                    @Apartment_Moose said in MMM-Buttons to activate MMM-Assistantmk2 (v3):

                    do you potentially know what could cause this ?

                    mmap is memory mapped file

                    here is a site with a pretty decent dewscription of what to look for and what to change
                    https://mroonga.org/docs/faq/mmap_cannot_allocate_memory.html

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Apartment_Moose
                      last edited by Apartment_Moose Jan 17, 2020, 5:44 PM Jan 17, 2020, 5:38 PM

                      @sdetweil
                      Thanks for getting back to me on this. I will check it out over the weekend when I next am free (probably sunday). I will report back on if this fixed it. Thanks again for the support as I couldnt find anything on google.

                      S 1 Reply Last reply Jan 17, 2020, 6:37 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        8/15
                        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