@Benjaminh86
Here is an extract of mine that should help you to understand. You just have to tweak the notification and pages based on your setup.
{
// 22
module: "MMM-GroveGestures",
position: "top_right",
config: {
autoStart: true, //When Mirror starts, recognition will start.
verbose:true, // If set as `true`, useful messages will be logged.
recognitionTimeout: 1000, //Gesture sequence will be ended after this time from last recognized gesture.
cancelGesture: "WAVE", //If set, You can cancel gesture sequence with this gesture.
visible: true, //Recognized gesture sequence will be displayed on position
idleTimer: "0", // `0` for disable, After this time from last gesture, onIdle will be executed.
defaultCommandSet: "DEFAULT_MODE",
commandSet: {
"DEFAULT_MODE": {
"LEFT": {
notificationExec: {
notification: "PAGE_INCREMENT",
}
},
"RIGHT": {
notificationExec: {
notification: "PAGE_DECREMENT",
}
},
},
"0": { // this corresponds to the page N° sent back by MMM-Pages
"LEFT": {
notificationExec: {
notification: "PAGE_INCREMENT",
}
},
"RIGHT": {
notificationExec: {
notification: "PAGE_DECREMENT",
}
},
"UP": {
notificationExec: {
notification: "CALEXT2_SCENE_NEXT",
payload: null,
}
},
"DOWN": {
notificationExec: {
notification: "CALEXT2_SCENE_PREVIOUS",
payload: null,
}
},
},
"1": {
"LEFT-RIGHT-LEFT": {
notificationExec: {
notification: "REMOTE_ACTION",
payload: {
action: "SHOW",
module: "module_13_MMM-BackgroundSlideshow",
},
}
},
"RIGHT-LEFT-RIGHT": {
notificationExec: {
notification: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_13_MMM-BackgroundSlideshow",
},
}
},
"UP-DOWN-UP": {
notificationExec: {
notification: "REMOTE_ACTION",
payload: {
action: "SHOW",
module: "module_14_MMM-BackgroundSlideshowInfo",
},
}
},
"DOWN-UP-DOWN": {
notificationExec: {
notification: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_14_MMM-BackgroundSlideshowInfo",
},
}
},
"LEFT": {
notificationExec: {
notification: "PAGE_INCREMENT",
}
},
"RIGHT": {
notificationExec: {
notification: "PAGE_DECREMENT",
}
},
"UP": {
notificationExec: {
notification: "ARTICLE_MORE_DETAILS",
}
},
"DOWN": {
notificationExec: {
notification: "ARTICLE_LESS_DETAILS",
}
},
"CLOCKWISE": {
notificationExec: {
notification: "BACKGROUNDSLIDESHOW_NEXT",
}
},
"ANTICLOCKWISE": {
notificationExec: {
notification: "ARTICLE_PREVIOUS",
}
},
},
"2": {
"LEFT": {
notificationExec: {
notification: "PAGE_INCREMENT",
}
},
"RIGHT": {
notificationExec: {
notification: "PAGE_DECREMENT",
}
},
"UP": {
notificationExec: {
notification: "SWD_NEXT",
}
},
"DOWN": {
notificationExec: {
notification: "SWD_PREV",
}
},
"FORWARD-BACKWARD": {
notificationExec: {
notification: "SWD_PAUSE",
}
},
"BACKWARD-FORWARD": {
notificationExec: {
notification: "SWD_PLAY",
}
},
}
},
commandSetTrigger: {
"DEFAULT_MODE": "DEFAULT_MODE",
"PAGE_NUMBER_IS": (payload) => { return payload } // this is what set the right command set based on MMM-Pages feedback "PAGE_NUMBER_IS"
},
}
},
{
//22
module: "MMM-NotificationTrigger",
config: {
useWebhook: false,
triggers: [
{
// Is hiding the compliments module when newsfeed article is toggled fullscreen
trigger: "ARTICLE_MORE_DETAILS",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_6_compliments",
},
}
]
},
{
// Is showing the compliments module again when newsfeed is minimized.
trigger: "ARTICLE_LESS_DETAILS",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "SHOW",
module: "module_6_compliments",
},
}
]
},
{
// Is triggering PAGE NUMBER NOTIFICATION when pages is changing
trigger: "PAGE_DECREMENT",
fires: [
{
fire: "QUERY_PAGE_NUMBER",
}
]
},
{
// Is triggering PAGE NUMBER NOTIFICATION when pages is changing
trigger: "PAGE_INCREMENT",
fires: [
{
fire: "QUERY_PAGE_NUMBER",
}
]
},
{
// Slideshow_Show.
trigger: "SLIDESHOW_SHOW",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "SHOW",
module: "module_13_MMM-BackgroundSlideshow",
},
}
]
},
{
// Slideshow_Hide.
trigger: "SLIDESHOW_HIDE",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_13_MMM-BackgroundSlideshow",
},
}
]
},
{
// SlideshowInfo_Show.
trigger: "SLIDESHOWINFO_SHOW",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "SHOW",
module: "module_14_MMM-BackgroundSlideshowInfo",
},
}
]
},
{
// SlideshowInfo_Hide.
trigger: "SLIDESHOWINFO_HIDE",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_14_MMM-BackgroundSlideshowInfo",
},
}
]
},
{
// Is showing the compliments module again when newsfeed is minimized.
trigger: "ARTICLE_LESS_DETAILS",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "SHOW",
module: "module_6_compliments",
},
}
]
},
{
// AT START - Is hiding MMM-ImageSlideshow at start.
trigger: "ALL_MODULES_STARTED",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_13_MMM-BackgroundSlideshow",
},
},
{
fire: "REMOTE_ACTION",
payload: {
action: "HIDE",
module: "module_14_MMM-BackgroundSlideshowInfo",
},
},
{
fire: "QUERY_PAGE_NUMBER",
},
{
fire: "PAGE_INCREMENT",
},
]
},
{
// SHUTDONW - turns screen off and shutdown pi
trigger: "SCREENOFFSHUTDOWN",
fires: [
{
fire: "REMOTE_ACTION",
payload: {
action: "MONITOROFF",
},
},
{
fire: "REMOTE_ACTION",
payload: {
action: "SHUTDOWN",
},
},
]
}
]
}
},