Read the statement by Michael Teeuw here.
Config File Help (Camera, Voice Control, Spotify)
-
Hi All,
Complete Newbie here, I have managed to install the following modules.
Raspotify
MMM-Spotify
MMM-Remote-Control
MMM-AlarmClock
MMM-Hotword
MMM-AssistantMk2and everything works, then I installed
Camera, Voicecontrol, (created & retrieved the sound files, ShowCamera, HideCamera and Selfie) but I’m stuck now on the config file…
and I’m not sure how to get the triggers to work !! ( Voice commands to work)
I would like to do the following.
- Using MMM_AssistantMk2, control spotify
- Use the camera and voicecontrol
Below is my Config.file, with location and ID omitted. Please help !!
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "0.0.0.0", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "en", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "MMM-Spotify", position: "bottom_left", config: { style: "mini", // "default" or "mini" available control: "default", //"default", "hidden" available updateInterval: 1000, onStart: null, // disable onStart feature with `null` allowDevices: [], //If you want to limit devices to display info, use this. // allowDevices: ["RASPOTIFY", "My iPhoneX", "My Home speaker"], } }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar", header: "SA Holidays", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "webcal://www.officeholidays.com/ics/ics_country.php?tbl_country=South%20Africa" } ] } }, { module: 'camera', position: 'top_center', config: { selfieInterval: 3, // Time interval in seconds before the photo will be taken. emailConfig: { service: 'Hotmail', // Email provider to use to send email with a photo. auth: { user: '<name@email.com>', // Your email account pass: '<password>' // Your password for email account } } } }, { module: 'voicecontrol', position: 'bottom_left', config: { models: [ { keyword: "Show Camera", description: "Say 'Show Camera' to display camera", file: "ShowCamera.pmdl", message: "SHOW_CAMERA" }, { keyword: "Hide Camera", description: "Say 'Hide Camera' to hide camera", file: "HideCamera.pmdl", message: "HIDE_CAMERA" }, { keyword: "Selfie", description: "Say 'Selfie' when camera is visible", file: "Selfie.pmdl", message: "SELFIE" }, ] } }, { module: 'MMM-Remote-Control', disabled: false, config: { customCommand: {}, customMenu: 'custom_menu.json', showModuleApiMenu: 'true', apikey: '', } }, { module: "MMM-Remote-Control-Repository", }, { module: 'MMM-AlarmClock', position: 'top_right', config: { sound: 'blackforest.mp3', format: 'dddd, h:mm a', timer: 60000, volume: 1.0, touch: false, fade: false, alarms: [ { time: '19:02', days: [1,2,3,4,5,6,7], title: 'Morning Alarm', message: 'Get Up! and train like a beast!' } ] } }, { module: "compliments", position: "lower_third" }, { module: "currentweather", position: "top_right", config: { location: "XYZ", locationID: "XYZ", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "XYZ" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "XYZ", locationID: "XYZ", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "XYZ" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "News ", url: "XYZs" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } }, { module: "MMM-Hotword", position: "bottom_right", config: { 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 } } } }, { module: "MMM-AssistantMk2", position: "bottom_right", config: { deviceLocation: { coordinates: { latitude: xx.xxx, // -90.0 - +90.0 longitude: yy.yyyy // -180.0 - +180.0 }, }, record: { recordProgram : "arecord", device : "plughw:1", }, 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 notifications: { ASSISTANT_ACTIVATED: "HOTWORD_PAUSE", ASSISTANT_DEACTIVATED: "HOTWORD_RESUME", }, useWelcomeMessage: "brief today", profiles: { "default" : { lang: "en-US" } }, } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
-
@ricardoyen said in Config File Help (Camera, Voice Control, Spotify):
MMM_AssistantMk2
so, what you want are recipes.
https://github.com/eouia/MMM-AssistantMk2/wiki/Usage#recipes as individual files in the module folder. this will make the config file change very small
basically little files that take a spoken word/phrase and then take some action, execute some ‘command’ (command could be to Magic Mirror or to the system …)
so, you could write down what you need the system to do…
if I say this … then this is what should happen
i don’t know anything about the 'Camera, Voicecontrol, (created & retrieved the sound files, ShowCamera, HideCamera and Selfie) ’ thing…
-
Ok, suppose I manage to get the receipe,
Which file in which directory do I modify to make it work…
I was to start spotify, stop spotify, next track, pause etc.
-
u create a file in the MMM-AssistantMK2 folder for each distinct recipe. (distinct action, start spotify, stop spotify, etc,etc)
then in config you put those in a single list
and then connect the command to the recipeso for each recipe, you would determine WHAT you need to do, then get the system operations for HOW to do that (issue this command, change this file, … whatever)…
I believe no one has done all this yet