use config.js
file of MagicMirror for configuring MMM-GoogleAssistant
Don't panic !
MMM-GoogleAssistant have the new MagicMirror technology embed.
We will apply it
MMM-GoogleAssistant have his own default config in main core
You have just to copy past the new needed part and new needed feature to change !
MMM-GoogleAssistant will merge automaticaly with your new needed feature
You don't have to copy/past all part (because it's already in main core)
You don't need to use all of these, Because all of them be set as default value.
Just pick what you need then override in yourconfig.
Just use and activate what you need to use!
{
module: "MMM-GoogleAssistant",
configDeepMerge: true,
config: {
assistantConfig: {
latitude: 51.508530,
longitude: -0.076132,
}
}
},
{
module: "MMM-GoogleAssistant",
configDeepMerge: true,
config: {
debug: false,
stopCommand: "stop",
otherStopCommands: [],
assistantConfig: {},
responseConfig: {
chimes: {},
imgStatus: {},
zoom: {}
},
recipes: []
}
},
configDeepMerge
tool for creating your personal configuration !For creating your own configuration, MMM-GoogleAssistant will merge default core configuration and your needed configuration
Just copy the Template and change with your needed value in named field (inside {}
)
Notes:
If you have some empty field with{}
, you can delete it !
If you don't use a feature or a field: Don't past it in the config.
All sample values are already in main core of MMM-GoogleAssistant
Don't be stupid !
Don't copy/past some parts without modify anything !
Why ?
It's already enabled in main core!
root
of configDisplay needed value for debug mode
config: {}
config: {
debug:false,
stopCommand: "stop",
otherStopCommands: []
}
field type default value debug BOOLEAN false stopCommand STRING stop otherStopCommands Array of String [ ]
debug
: When you set debug
to true
, detailed log will be recorded. When you don't want log, set it to false
stopCommand
: Command to say if you want to stop all plugins (EXT_ modules) playingotherStopCommands
: Allow to use other/multi keywords for stopCommand using. It must be defined in arrayotherStopCommands sample:
You want to define
stoppe
,annuler
,thank you
keywords in addition of default stopCommand
otherStopCommands: [ "stoppe", "annuler", "thank you" ]
Just make your own keywords for your global stop command list!
assistantConfig: {}
Define your localisation, language, define if assistant is registred to GoogleHome
config: {
assistantConfig: {},
}
assistantConfig: {
lang: "en-US",
latitude: 51.508530,
longitude: -0.076132,
deviceRegistred: false
},
field (- subFiled) type default value assistantConfig OBJECT { ... }
- lang TEXT "en-US" - latitude NUMBER 51.508530 - longitude NUMBER -0.076132 - deviceRegistred BOOLEAN false
lang
: language of the assistantlatitude
& longitude
: location of your MagicMirror installed.deviceRegistred
: enable this feature if this module is registred in Google Home app
Change latitude and longitude value for your actual position.
This website can help you to determinate it
Currently supported languages are:
de-DE, en-AU, en-CA, en-GB, en-IN, en-US, fr-CA, fr-FR, it-IT, ja-JP, es-ES, es-MX, ko-KR, pt-BR
Google Supported Language Code
For another languages, some language could be understood but not guaranteed.
responseConfig: {}
How GoogleAssistant should respond
config: {
responseConfig: {},
}
responseConfig: {
// i'm not stupid !
// i will not copy/past this part without modify anything !
useFullscreen: false,
responseOutputCSS: "response_output.css",
screenOutputTimer: 5000,
useChime: true,
confirmationChime: true
}
field (- subFiled) type default value responseConfig OBJECT { ... }
- useFullscreen BOOLEAN false - responseOutputCSS STRING screen_output.css - screenOutputTimer NUMBER (ms) 5000 - useChime BOOLEAN true - confirmationChime BOOLEAN true
useFullscreen
: Use MMM-GoogleAssistant fullscreen mode and hide all modulesresponseOutputCSS
: CSS name for Google responseOutput controllingscreenOutputTimer
: Duration of response (since it's finishing). After this milliseconds, the response window will be hidden and the module will return to standby status.useChime
: If you don't want the beeping on status changed, set this to false
.confirmationChime
: Emit a confirmation chime when google have understand your querychimes: {}
This feature can change the native chime/sounds with your own
config: {
responseConfig: {
chimes: {},
}
}
chimes: {
// i'm not stupid !
// i will not copy/past this part without modify anything !
beep: "beep.mp3",
error: "error.mp3",
continue: "continue.mp3",
confirmation: "confirmation.mp3",
open: "Google_beep_open.mp3",
close: "Google_beep_close.mp3",
warning: "warning.ogg"
},
Define new sound of the events
Your new sound should be in theresources
directory
Don't use the same name like default (it will be erased on update!)
imgStatus: {}
This feature can change the native status pictures with your own
config: {
responseConfig: {
imgStatus: {},
}
}
imgStatus: {
// i'm not stupid !
// i will not copy/past this part without modify anything !
hook: "hook.gif",
standby: "standby.gif",
reply: "reply.gif",
error: "error.gif",
think: "think.gif",
continue: "continue.gif",
listen: "listen.gif",
confirmation: "confirmation.gif",
information: "information.gif",
warning: "warning.gif",
userError: "userError.gif"
},
Define new pictures of the events
Your new pictures should be in theresources
directory
Don't use the same name like default (it will be erased on update!)
zoom: {}
Define the zoom of transcription and response popup
config: {
responseConfig: {
zoom: {},
}
}
zoom: {
// i'm not stupid !
// i will not copy/past this part without modify anything !
transcription: "80%",
responseOutput: "60%"
}
Google Assistant have 2 output field named transcription
and responseOutput
:
You can define the zoom
in each part
field (- subFiled) type default value zoom OBJECT - transcription STRING 80% - responseOutput STRING 60%
transcription
: zoom of the transcriptionresponseOutput
: zoom of the response of Google Serverrecipes: []
Control MagicMirror with any recipes
config: {
recipes: [],
},
Notes:
** It's an example
** There is no recipe loaded by default in main core of MMM-GoogleAssistant
** If you have to modify content of the recipe, copy/past it in another file because updater will erase it !
recipes: [
"MyRecipe1.js",
"MyRecipe2.js",
"MyPreferedRecipe.js"
],
field type default value recipes ARRAY of TEXT []
recipes
: The recipe is an extension file of this module. You can load recipes that you need with this field.You can make your own recipe for your purpose.
Read more docs about that and look inside ofrecipes
directory.