I’ve had a crack at writing an example config file to show you what im trying to do:-
I’ve taken out anything that is sensitive.
In short i want it to show every module, unless the PIR detects motion then it will disable the “Digital-Pictureframe” profile.
I assume if you use “classes” thats a profile ? and if it doesnt have a “classes” set then its considered default.
var config = {
address: '0.0.0.0',
electronOptions: {},
ipWhitelist: [],
modules: [
//Screen on & off timer{
{
module: 'MMM-ModuleScheduler',
config: {
notification_schedule: [
// TURN THE MONITOR/SCREEN ON AT 07:30 EVERY DAY
{
notification: 'REMOTE_ACTION',
schedule: '00 07 * * *',
payload: {
action: "MONITORON"
}
},
// TURN THE MONITOR/SCREEN OFF AT 22:30 EVERY DAY
{
notification: 'REMOTE_ACTION',
schedule: '30 22 * * *',
payload: {
action: "MONITOROFF"
}
},
]
}
}, {
module: 'alert',
config: {}
}, {
module: 'updatenotification',
position: 'top_bar',
config: {
ignoreModules: []
}
}, {
module: 'clock',
position: 'top_left',
config: {}
},
// top Right Calenar
{
module: 'calendar',
header: 'Family Calendar',
position: 'top_left',
config: {
calendars: [{
symbol: 'calendar-check',
url: 'https://calendar.google.com/calendar/ical/xxx.ics',
}
],
}
},
// Weather Section
{
module: 'currentweather',
position: 'top_right',
config: {
location: 'UK',
locationID: 'xxx',
appid: 'xxx',
}
}, {
module: 'weatherforecast',
position: 'top_right',
header: 'Weather Forecast',
config: {
location: 'false',
locationID: 'xxx',
appid: 'xxx',
}
},
//Screencast
{
module: 'MMM-Screencast',
position: 'bottom_right',
config: {
position: 'center',
height: 600,
width: 800,
castName: 'MagicMirror',
}
},
//PLex Slideshow
{
module: 'MMM-PlexSlideshow',
classes: 'Digital-Pictureframe',
position: 'fullscreen_below',
config: {
plex: {
hostname: '192.168.1.123',
port: 32400,
username: 'xxx@xxx.com',
password: 'password',
},
transitionImages: true,
}
},
//MM Remote Control
{
module: 'MMM-Remote-Control',
header: '',
config: {
customCommand: {},
customMenu: 'custom_menu.json',
showModuleApiMenu: true,
apiKey: ''
}
},
//News Headlines
{
module: 'newsfeed',
position: 'top_bar',
header: '',
config: {
feeds: [{
title: 'BBC News',
url: 'http://feeds.bbci.co.uk/news/rss.xml'
}
],
startTags: [],
endTags: [],
prohibitedWords: []
}
},
{
module: 'MMM-GPIO-Notifications',
config: {
'4': {
gpio_state: 1,
gpio_debounce: 0,
delay: 30000,
notifications: [{
notification: 'SCREEN_ON',
payload: {
'forced': false
}
}, {}
]
}
}
},
{
module: 'MMM-Screen-Powersave-Notification',
config: {
delay: 60,
profiles: {
"Digital-Pictureframe": 600
}
}
},
{
module: 'MMM-ViewNotifications',
position: 'bottom_left',
header: 'Notifications',
config: {
timeout: 0,
format: '{time}: "{module}" sent "{notification}" with {payloadData}', // See below for configurable options
includeModules: ["MMM-GPIO-Notifications", "MMM-Screen-Powersave-Notification"]
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== 'undefined') {
module.exports = config;
}
I just need to understand how to add a module to a profile and then using your example PIR code how to transition from one profile to another