@innovation There are a few ways to do this. I’ve done this for a kitchen display where I have several pages that rotate in sequence, but are also controlled manually with an IR remote control (using the LEFT/RIGHT buttons to go to previous.next pages).
I’m using a combination of the Profile Switcher module (https://github.com/tosti007/MMM-ProfileSwitcher.git) and my own Profile Carousel module the I wrote to handle input from the IR remote (https://github.com/jclarke0000/MMM-ProfileCarousel).
My config looks like this:
{
module: "MMM-ProfileSwitcher",
disabled: false,
config: {
defaultClass: "L_CALENDAR",
everyoneClass: "L_ALL",
includeEveryoneToDefault: true,
defaultTime: 10000,
useLockStrings: true
// animationDuration: 500,
// timers: {
// "L_CALENDAR" : {
// profile: "L_FORECAST"
// },
// "L_FORECAST" : {
// profile: "L_CALENDAR"
// }
// }
}
},
{
module: "MMM-ProfileCarousel",
disabled: false,
config: {
profiles: ["L_CALENDAR","L_FORECAST","L_NOTES"],
carouselDelay: 10000, //10 seconds
carouselResumeDelay: 1 * 30 * 1000, //30 seconds
useScreensaver: true,
screensaverProfile: "L_WORDCLOCK",
screensaverTimeout: 1.25 * 60 * 1000,
screensaverBlackoutPeriod: {
start: 11,
end: 12
}
}
},
And every module has one or more class names applied that indicate which profile the module should be visible for:
The clock module is visible for all profiles, so it looks like this:
{
module: "clock",
position: "top_left",
classes: "L_CALENDAR L_FORECAST L_NOTES",
config: {
timeFormat: 12,
showPeriod: true,
displaySeconds: false
}
},
While my weather module is only available on one page, so it looks like this:
{
module: "MMM-OpenWeatherForecast",
position: "top_right",
header: "Forecast",
classes: "L_FORECAST",
disabled: false,
config: {
In your case, you’ll need to work with one of the Voice modules to provide input to Profile Switcher. You can explicitly set the current profile using the sendNotification
function:
this.sendNotification("CURRENT_PROFILE", "profile name");