edward-shen/MMM-pages

Change pages with voice

Zeroo92 opened this issue · 3 comments

Hi Edward,
I've add your MMM-pages and MMM-page-indicator, and, thank you !
Because I saw a video on YouTube (https://www.youtube.com/watch?v=JogbkzNnVXI), I try to use Amazon Echo (MMM-AlexaControl) to change my pages but I think I need to use your notifications system and I don't understand this part... Do I need to use your "regarding notification" section to do what I want ? Can you help me please ?
Sorry for my English...
Thanks

Here is my code :

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 or empty, is "localhost"
port: 8080,
ipWhitelist: [], // 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"],

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: "fr",
timeFormat: 24,
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: [
	{
		module: "alert",
	},
	{
		module: "updatenotification",
		position: "top_bar"
	},
	{
		module: "clock",
		position: "top_right"
	},
	{
		module: "calendar",
		header: "US Holidays",
		position: "top_left",
		config: {
			calendars: [
				{
					symbol: "calendar-check",
					url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"					}
			]
		}
	},
	{
		module: "compliments",
		position: "lower_third",
		config:{
			updateIntervale: 10000,
			compliments:{
				morning: [
					  "Bonjour !",
					  "Passez une bonne journée !",
					  "Bonne journée !"
				],
				afternoon: [
					  "Bon après-midi"
				],	  
				evening: [
					  "Bonne soirée",
					  "Faites de beaux rêves",
					  "Bonne nuit :)"
				]
			}
		}
	},
	{
		module: "currentweather",
		position: "top_right",
		config: {
			location: "Rueil-malmaison, France",
			locationID: "6451979", //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
			appid: "XXXXXXXXXXXXXXXXXXX"
		}
	},
	{
		module: "weatherforecast",
		position: "top_right",
		header: "Météo",
		config: {
			location: "Rueil-malmaison, France",
			locationID: "6451979", //ID from https://openweathermap.org/city
			appid: "XXXXXXXXXXXXXXXXXXXX"
		}
	},
	{
		module: "newsfeed",
		position: "bottom_bar",
		config: {
			feeds: [
				{
					title: "KORBEN",
					url: "http://korben.info/feed"
				}
			],
			showSourceTitle: false,
			showPublishDate: false,
			broadcastNewsFeeds: true,
			broadcastNewsUpdates: true
		}
	},
	{
		module: "newsfeed",
		position: "bottom_bar",
		config: {
			feeds: [
				{
					title: "BFM",
					url: "https://www.bfmtv.com/rss/info/flux-rss/flux-toutes-les-actualites/"
				}
			],
			showSourceTitle: false,
			showPublishDate: false,

		}
	},
	{
		module: "newsfeed",
		position: "bottom_bar",
		config: {
			feeds: [
				{
					title: "ANDROIDPIT",
					url: "https://www.androidpit.fr/feed/main.xml"
				}
			],
			showSourceTitle: false,
			showPublishDate: false,
			broadcastNewsFeeds: true,
			broadcastNewsUpdates: true
		}
	},
	{
		module: "newsfeed",
		position: "bottom_bar",
		config: {
			feeds: [
				{
					title: "01NET",
					url: "https://www.01net.com/rss/info/flux-rss/flux-toutes-les-actualites/"
				}
			],
			showSourceTitle: false,
			showPublishDate: false,
			broadcastNewsFeeds: true,
			broadcastNewsUpdates: true
		}
	},
	{
		module: "MMM-NowPlayingOnSpotify",
		position: "top_left",
		config: {
				clientID: "xxxxxxxxxxxxxxxxx",
				clientSecret: "xxxxxxxxxxxxxxxxx",
				accessToken: "xxxxxxxxxxxxxxxxx",
				refreshToken: "xxxxxxxxxxxxxxxxx"
		}
	},
	{
    		module: 'MMM-Remote-Control'
    		// uncomment the following line to show the URL of the remote control on the mirror
    		, position: 'bottom_left'
    		// you can hide this module afterwards from the remote control itself
    
		},	
		{
    		module: 'MMM-pages',
    		config: {
            		modules:
                			[["MMM-AlexaControl"],
                 			[ "MMM-NowPlayingOnSpotify", "MMM-Remote-Control"],
				[ "MMM-Globe"]],
            		fixed: ["clock", "weatherforecast", "newsfeed", "calendar","currentweather", "compliments", "MMM-page-indicator"],
    		}
		},
	{
    		module: 'MMM-page-indicator',
    		position: 'bottom_bar',
    		config: {
        				pages: 3,
    		}
		},
	{
		module: 'MMM-Globe',
		position: 'center',
		config: {
			style: 'europeDiscSnow',
			imageSize: 600,
			ownImagePath:'',
			updateInterval: 10*60*1000
		}
	},
	{
    		module: 'MMM-AlexaControl',
    		position: 'middle_center',
    		config:{
        			image: true,
			height: 50,
			width: 50,
        			pm2ProcessName: "mm",
        			vcgencmd: "vcgencmd",
			deviceName: "Mirroir"
    		}
		},
]

};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}

Salut! Je suppose vous parlez français? Alors que mon français n'est pas super, je ferai de mon mieux.

Veuillez regardez ce post: dans la config pour MMM-AlexaControl, vous devez ajouter une ligne pour qu'elle sache contrôler les pages:

	{
    		module: 'MMM-AlexaControl',
    		position: 'middle_center',
    		config:{
        		image: true,
			height: 50,
			width: 50,
        		pm2ProcessName: "mm",
        		vcgencmd: "vcgencmd",
			deviceName: "Mirroir",
			pages: XXXXX
    		}
	},

où "XXXX" est la numero de pages.

Si cela ne vous aide pas, il est préférable d'ouvrir un issue sur la Github du MMM-AlexaControl. Je seulement fournis des méthods pour que d'autres modules interagissent avec les MMM-Pages. Je ne sais pas comment ils interagissent avec MMM-Pages.


(dans anglais)

Please look at this post: In MMM-AlexaControl's config, you need a line to tell it to controll the pages:

	{
    		module: 'MMM-AlexaControl',
    		position: 'middle_center',
    		config:{
        		image: true,
			height: 50,
			width: 50,
        		pm2ProcessName: "mm",
        		vcgencmd: "vcgencmd",
			deviceName: "Mirroir",
			pages: XXXXX
    		}
	},

where "XXXX" is the number of pages.

If that doesn't help, it's better if you open an issue on MMM-AlexaControl's Github. I only provide methods for other modules to interact with MMM-pages. I don't know how they interact with MMM-pages.

Hi and thank you for your help.
I'm going to try today and If all is okay I come here to close the issue.

It works.

Thank you very much