<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Alexa to Selfie]]></title><description><![CDATA[<p dir="auto">Hi Guys,</p>
<p dir="auto">I’m quite new to magic mirror and would be considered new to Linux also.</p>
<p dir="auto">I’ve been playing around with modules and I llove the work that out but the documentation is hard to understand my my level. I want to control MMM-SelfieShoot with MMM-AlexaControl.</p>
<p dir="auto">I was able to work out the default start stop PM2 process for the Magic Mirror bur I dont know how to incorporate new notifications. Also I kinda broke the config file while playing around but sure thats the fun of it all I suppose.</p>
<p dir="auto">Any help would be great I’ve been quite some time with this!</p>
<p dir="auto">Please see below for my configs.<br />
MAagicMirror config</p>
<pre><code>/* Magic Mirror Config Sample
 *
 * By Michael Teeuw https://michaelteeuw.nl
 * MIT Licensed.
 *
 * For more information on how you can configure this file
 * see https://docs.magicmirror.builders/getting-started/configuration.html#general
 * and https://docs.magicmirror.builders/modules/configuration.html
 */
let config = {
	address: "localhost", 	// 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 or empty, is "localhost"
	port: 8080,
	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
					// you must set the sub path here. basePath must end with a /
	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 --&gt; 192.168.3.15 use CIDR format :
															// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true

	language: "en",
	locale: "en-UK",
	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
	timeFormat: 12,
	units: "metric",
	// serverOnly:  true/false/"local" ,
	// local for armv6l processors, default
	//   starts serveronly and then starts chrome browser
	// false, default for all NON-armv6l devices
	// true, force serveronly mode, because you want to.. no UI on this device



	modules: [
		 {
        disabled: false,
        module: 'MMM-Astro',
        position: 'top_left',
		      config: {
		      sign: "leo",
		      iconset: "4",
		      extend: false,
		             }
       },
       	    {
        module: 'MMM-AlexaControl',
        position: 'middle_center',
        config:{
            image: false,
            pm2ProcessName: "Smart_Mirror",
            monitorToggle: true,
            vcgencmd: "hide",
            deviceName: "Smart Mirror"
        }
    },
    {
    module: 'MMM-SleepWake',
    config:{
       mode: 'DPMS'
    }
},
{
    module: "MMM-MotionDetector",
    config: {
       captureIntervalTime: 1000,
    	scoreThreshold: 20,
    	timeout: 12
    },
  },
{
	disabled: false,
	module: "MMM-Selfieshot",
	config: {
	storePath: "./Storage/Photos",
	width:1280,
	height:720,
	quality: 100,
	device: null,
	shootMessage: "Smile!",
	shootCountdown: 3,
	displayCountdown: true,
	displayResult: true,
	playShutter: true,
	shutterSound: "shutter.mp3",
	}
},
		{
			module: "alert",
		},
		{
			module: "updatenotification",
			position: "top_bar"
		},
		{
			module: "clock",
			position: "top_center"
		},
		
		{
  		module: "MMM-OpenWeatherMapForecast",
  		header: "Weather",
  		position: "top_right",
  		classes: "default everyone",
  		disabled: false,
  		config: {
    			apikey: "f,
    			latitude: "      
    			iconset: "4c",
    			units: "metric",
    			useAnimatedIcons: true,
    			concise: false,
    			forecastLayout: "table",
    			showWind: true
  			}
		},
	
	],
	 
};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
</code></pre>
<p dir="auto">MMM-AlexaControl config</p>
<pre><code>/**
 * Magic Mirror
 * Module: MMM-AlexaControl
 * 
 * By JoChef2
 * MIT Licensed.
 */

Module.register("MMM-AlexaControl",{
     
    defaults:{
        image: true,    //  shows the image
        height: 265,    // heigth of the image
        width: 265,     // width of the image
        pages: 0,       //  number off pages in MMM-Pages module. 0 means you doesn't use it
        devices: {      //  empty object for your custom devices
            devices: []
        },
        notifications: [
        
        {
        name: 'Seflie',
        port: 11100,
        OnOff: false,
        notification: [this.sendNotification("SELFIE_SHOOT")]
    	}
    	
    ],  
    
    //  empty array for your notification devices
        commands: [this.sendNotification("SELFIE_SHOOT")],       // empty array for your command devices
        startPort: 11000,   //  the lowest used port
        refresh: false,      //  refresh your Mirror
        restart: false,
        selfie: true,      //  restart your Mirror with pm2
        stop: false,         //  stops your Mirror with pm2
        reboot: false,      //  reboot your pi
        shutdown: false,    //  shutdown your pi
        pm2ProcessName: "Selfie",  //  name of your pm2 process
        monitorToggle: false,   //  switch your monitor on and off
        vcgencmd: 'vcgencmd',  //  command you use for monitor toggle
        cecAddress: "0.0.0.0", //  Address for the cec-client
        usb: false          // toggle usb power of your pi
    },

    getTranslations: function(){            // add more translations
        return {
            en: "translations/en.json",
            de: "translations/de.json"
        }
    },

    start: function(){
        Log.log('Starting module: ' + this.name);

        // send all translations to node_helper
        this.sendSocketNotification('TRANSLATIONS', {"monitor": this.translate("MONITOR"), "shutdown": this.translate("SHUTDOWN"), "reboot": this.translate("REBOOT"), "page": this.translate("PAGE"), "refresh": this.translate("REFRESH"), "restart": this.translate("RESTART"), "stop": this.translate("STOP"), "selfie": this.translate("SELFIE_SHOOT"), "usb": this.translate("USB"), "deviceName":this.translate(this.config.deviceName)});
        this.sendSocketNotification('SET_DEVICE', this.config);  // send the config to node_helper
    },

    getDom: function(){             // returns only an image or an empty div (necessary for MMM-Pages)
        if(this.config.image){
            let img = document.createElement("img");
            img.classList = "img";
            img.src = "MMM-AlexaControl/AlexaLogoGrey.png";
            img.height = this.config.height;
            img.width = this.config.width;
            return img;
        }else{
            return document.createElement("div");
        }
    },

    socketNotificationReceived: function(notification, payload) {
        if(notification === "PAGE_CHANGED"){              //  change pages of MMM-Pages
            this.sendNotification("PAGE_CHANGED", payload);
        }
        if(notification === "ACTION"){                    //  refresh the Mirror
            if(payload === "refresh"){
                window.location.reload(true);
            }
        } 
        if(notification === "selfie"){
            this.sendNotification("SELFIE_SHOOT");  //  send any notification to any module
        }
        if(notification =='MONITOR_ACTION'){
            Log.log('RECEIVE monitor NOTIFICATION='+payload)
            this.sendNotification(notification,payload)
        }
    }
 });
</code></pre>
]]></description><link>https://forum.magicmirror.builders/topic/15756/alexa-to-selfie</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 22:16:29 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/15756.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Oct 2021 18:27:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Alexa to Selfie on Tue, 19 Oct 2021 19:22:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> Sound advise I’ll be sure to remember it! Honeslty makes thing easier too I hate having to edit scripts to communicate to each other in other forms of development haha</p>
]]></description><link>https://forum.magicmirror.builders/post/95662</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/95662</guid><dc:creator><![CDATA[Alyx]]></dc:creator><pubDate>Tue, 19 Oct 2021 19:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to Alexa to Selfie on Mon, 18 Oct 2021 19:52:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> Yes I did try that but it was when my source script for the alexa module was tampered with. I’ll give it another shot and let you guys know how it goes!</p>
]]></description><link>https://forum.magicmirror.builders/post/95650</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/95650</guid><dc:creator><![CDATA[Alyx]]></dc:creator><pubDate>Mon, 18 Oct 2021 19:52:47 GMT</pubDate></item><item><title><![CDATA[Reply to Alexa to Selfie on Mon, 18 Oct 2021 18:55:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alyx" aria-label="Profile: Alyx">@<bdi>Alyx</bdi></a></p>
<p dir="auto">for AC</p>
<pre><code>        notifications: [
        
        {
        name: 'Seflie',
        port: 11100,
        OnOff: false,
        notification: [this.sendNotification("SELFIE_SHOOT")]
    	}
    	
    ],  
</code></pre>
<p dir="auto">in config.js</p>
<p dir="auto">u put JUST THE TEXT and data for the notification</p>
<pre><code>        notifications: [
        
        {
        name: 'Seflie',
        port: 11100,
        OnOff: false,
        notification: ["SELFIE_SHOOT", ""]
    	}
    	
    ],  
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/95642</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/95642</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 18 Oct 2021 18:55:59 GMT</pubDate></item><item><title><![CDATA[Reply to Alexa to Selfie on Mon, 18 Oct 2021 19:28:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alyx" aria-label="Profile: alyx">@<bdi>alyx</bdi></a> 1st NEVER  edit the module source.</p>
<p dir="auto">all config goes in config.js, for every module</p>
<p dir="auto">anything in config.js will replace the same item in the module defaults section</p>
<p dir="auto">for config syntax.  see</p>
<p dir="auto"><a href="https://forum.magicmirror.builders/topic/15743/no-javascript-experience-config-js-not-working/16?_=1634583021802">https://forum.magicmirror.builders/topic/15743/no-javascript-experience-config-js-not-working/16?_=1634583021802</a></p>
<p dir="auto">to diagnose errors</p>
<p dir="auto">in the MagicMirror folder do</p>
<pre><code>npm run config:check
</code></pre>
<p dir="auto">repeat til no errors…(see the step above about syntax)</p>
]]></description><link>https://forum.magicmirror.builders/post/95640</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/95640</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 18 Oct 2021 19:28:37 GMT</pubDate></item></channel></rss>