Closed DjDOESIT closed 8 years ago
Hi DjDOESIT
it looks like your config is not quite right. I've not used the airquality module, the following config should work
{
module: 'airquality',
position: 'top_center',
classes: 'scheduler',
config: {
module_schedule: {from: '0 5 * * *', to: '0 10 * * *', dimLevel: '25'},
location: 'france/paris/paris-centre/'
}
},
If this doesn't work, can you post the log (pm2 logs mm
) so I can investigate further
0|mm | at emitOne (events.js:96:13)
0|mm | at ClientRequest.emit (events.js:188:7)
0|mm | at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:472:21)
0|mm | at HTTPParser.parserOnHeadersComplete (_http_common.js:105:23)
0|mm | at TLSSocket.socketOnData (_http_client.js:361:20)
0|mm | at emitOne (events.js:96:13)
0|mm | at TLSSocket.emit (events.js:188:7)
0|mm | at readableAddChunk (_stream_readable.js:176:18)
0|mm | WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.
0|mm | WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.
Config.js:
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*/
var config = {
port: 6060,
language: 'fr',
timeFormat: 24,
units: 'metric',
modules: [
{
module: 'MMM-ModuleScheduler' // Nom du module
},
{
module: 'alert', // Nom du module
},
{
module: 'clock', // Nom du module
position: 'top_left' // Emplacement sur le miroir
},
{
module: 'airquality', // Nom du module
position: 'top_left', // Emplacement sur le miroir
config: {
module_schedule:{from: '0 5 * * *', to: '0 10 * * *', dimLevel: '25'},
location: 'france/paris/paris-centre/' // Localisation
}
},
// {
// module: 'compliments', // Nom du module
// position: 'lower_third' // Emplacement sur le miroir
// },
{
module: 'currentweather', // Nom du module
position: 'top_right', // Emplacement sur le miroir
config: {
location: 'Paris,France',
locationID: '', //ID from http://www.openweathermap.org
appid: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX' // API key openweathermap
}
},
{
module: 'weatherforecast', // Nom du module
position: 'top_right', // Emplacement sur le miroir
header: 'Météo Sens', // Titre du module
lang: 'fr', // Language pour le module
config: {
location: 'Sens,France', // Localisation
locationID: '', //ID from http://www.openweathermap.org
appid: 'XXXXXXXXXXXXXXXXXXXXXX' // API key openweathermap
}
},
{
module: 'phone_notification', // Nom du module
position: 'bottom_right', // Emplacement sur le miroir
header: 'Notifications Mobile', // Titre du module
config:{
accessToken: 'XXXXXXXXXXXXXXXXXXXXXXXX', // Token PushBullet
numberOfNotifications: 5, // Nombre de notifiations
displayNotificationIcon: true, // Active ou désacle les notifications
displayMessage: false, // Affiche le message
displayCount: true, //Affiche le nombre de notifications
alert: false, // Active aloerte ou non
fade: true, // ?
maxCharacters: 50 // Nombre maximum de caractères
}
},
{
module: 'newsfeed', // Nom du module
position: 'bottom_bar', // Emplacement sur le miroir
config: {
feeds: [
{
title: "Le Monde",
url: "http://www.lemonde.fr/rss/une.xml"
},
{
title: "Mandala",
url: "http://mandala.skynetblogs.be/atom.xml"
},
{
title: "Universalis",
url: "http://www.universalis.fr/syndication/ephemeride.xml"
}
],
showSourceTitle: true,
showPublishDate: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== 'undefined') {module.exports = config;}
it does not work
Thank you again for the help
The last two lines of the log suggest your config file contains some errors.
0|mm | WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.
0|mm | WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.
I would suggest removing the MMM-ModuleScheduler settings from the config file and make sure everything works.
Once that's done, re-add MMM-ModuleScheduler and the config for the airquality module as specified in my comment above including both the classes
and module_schedule
properties
Ok, that's good, I completely forgot to add "'classes' scheduler' ".... :/ ..... Thank you for your help ! And for having responded so quickly.
Hi, I have add the module to the file "config.js" And to test i add the following times in the "airquality" module: "Module_schedule: {from:" 0 5 * * * 'to' 0 10 * * * 'dimLevel:' 25 '}, " But infromations are listed even outside the specified time range.
an idea ? thx