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-AssistantMk2

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    6 Posts 2 Posters 2.6k Views 2 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.
    • O Offline
      OceanK
      last edited by

      Hey!

      I have followd the MMM-AssistantMk2 guide and succefully build the module and installed everything. But I cannot figure out the last part. How to configure the mirrors configure.js

      what parameters and what should I place there? If I just copy the whole thing from the example its not working. When I start the mirror it just tells me to configure it. Could someone please paste a code that works for me please so I can try this module out.

      thanx in Advanced

      I did paste this whole thing to my config.js

      {
      module: “MMM-AssistantMk2”,
      position: “top_left”,
      config: {
      deviceModelId: “”, // (OPTIONAL for gaction)It should be described in your config.json
      deviceInstanceId: “”, // (OPTIONAL for gaction)It should be described in your config.json
      deviceLocation: { // (OPTIONAL)
      coordinates: { // set the latitude and longitude of the device (rf. mygeoposition.com)
      latitude: 51.5033640, // -90.0 - +90.0
      longitude: -0.1276250, // -180.0 - +180.0
      },
      },
      useScreen: true, // set this to true if you want to output results to a screen
      //showed contents will be hidden when new conversation starts or ASSISTANT_STOP_CONTENT is comming.

      screenZoom: "80%",
      	transcriptionHook: { //if you set hooking phrase here, this module will catch these words in your speech and emit ASSISTANT_HOOK notification.
      		/*
      		"SCREEN_OFF" : "screen off",
      		"SCREEN_ON" : "screen on",
      		"REBOOT" : "reboot",
      		"SHUTDOWN" : "shut down",
      		"TEST" : "test"
      		*/
      	},
      	youtube: {
      		use:true, //if you want to autoplay of youtube clip in responses of Assistance.
      		height: "480", //This is not real player size. It's for ideal player size for loading video. (related to video quality somehow.)
      		width: "854",
        notifyPlaying: false, // tell other modules whether youtube is playing or not.
      	},
      	auth: {
      		keyFilePath: "./credentials.json"
      	},
      	audio: {
      		encodingIn: "LINEAR16", // supported are LINEAR16 / FLAC (defaults to LINEAR16)
      		sampleRateIn: 16000, // supported rates are between 16000-24000 (defaults to 16000)
      		encodingOut: "LINEAR16", // supported are LINEAR16 / MP3 / OPUS_IN_OGG (defaults to LINEAR16), currently only LINEAR16 is implemented to output, others are not yet. so use LINEAR16.
      		sampleRateOut: 24000, // supported are 16000 / 24000 (defaults to 24000)
      	},
      	defaultProfile: "default", // This default profile should be in `profiles` field.
      	profiles: {
      		"default" : {
      			profileFile: "default.json", //this path will be `~/MagicMirror/modules/MMM-AssistantMk2/profiles/default.json"
      			lang: "en-US"
      			//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
      		},
      		/* You can use multi-profile for your family.
      		"kids" : {
      			profileFile: "jarvis.json",
      			lang: "de-DE"
      		},
      		"myself_korean" : {
      			profileFile: "default.json",
      			lang: "ko-KR"
      		}
      		*/
      	},
      	record: {
      		sampleRate    : 16000,      // audio sample rate
      		threshold     : 0.5,        // silence threshold (rec only)
      		thresholdStart: null,       // silence threshold to start recording, overrides threshold (rec only)
      		thresholdEnd  : null,       // silence threshold to end recording, overrides threshold (rec only)
      		silence       : 1.0,        // seconds of silence before ending
      		verbose       : false,      // log info to the console
      		recordProgram : "arecord",  // Defaults to "arecord" - also supports "rec" and "sox"
      		device        : null        // recording device (e.g.: "plughw:1")
      	},
      },
      
      1 Reply Last reply Reply Quote 0
      • O Offline
        OceanK
        last edited by

        If I put this into the config.js its not working either:

        {
        module: “MMM-AssistantMk2”,
        position: “top_left”,
        config: {}
        },

        what am I doing wrong?

        1 Reply Last reply Reply Quote 0
        • D Offline
          dvbit
          last edited by

          be careful.
          I have the impression that if you cut and paste from the web page some tabs & extra chars creep in.

          use jshint http://jshint.com/ to validate the file

          1 Reply Last reply Reply Quote 0
          • D Offline
            dvbit
            last edited by

            what is the message? invalid configuration… bla bla?

            1 Reply Last reply Reply Quote 0
            • O Offline
              OceanK
              last edited by

              Yes! when I start the mirror I get the page “configure.js”

              can you help me to get paste in the right module code?

              1 Reply Last reply Reply Quote 0
              • D Offline
                dvbit
                last edited by

                Paste in the jshint site. It will give you the exact line where an error is and what is expected.
                90pc of the time it is correct.

                Other method: remove completely the section, paste it in a text only editor like text pad and the paste it back.

                The rules for json are simple but it can get complicated with indents and nesting

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  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