@crown
Hi,
i use MMM-Touch with my 10 inch touch screen and it is working very well.
BUT i do not use MMM-pages but MMM-ProfileSwitcher with MMM-ProfileControl instead. MMM-ProfileControl provided me more flexability with modules like MMM-CalenderExt2. Nearly all of my modules do provide profile support and display/hide stuff depending of the current profile.
In my case i do have 9 horizontal profiles (which are basically pages) and one vertical profile. I configured MMM-ProfileSwitcher to start at “pageC” (my center page) and can switch 4 pages to the left or right from this point.
The profiles can be selected either by pressing the “bubble” of the profile in MMM-ProfileControl or i can swipe left/right to change to the next one. I configured MMM-Touch to send “USER_PRESENCE” notifications for all other gestures to prevent my screensave module of shutting off the screen.
The following configuration shows my setup. I left the configuration of clock as you can see how modules can be configured to be visible at specific profiles.
{
module: "clock",
position: "top_center",
classes: "pageC pageL1"
},
{
module: "MMM-ProfileControl",
position: "bottom_center",
config: {
profiles: [["pageL4"], ["pageL3"], ["pageL2"], ["pageL1"], ["pageC"], ["pageR1"], ["pageR2_1", "pageR2_2"], ["pageR3"], ["pageR4"]],
zeroVerticalIndexOnHorziontalChange: true,
showSeparator: false,
showVerticalIndicator: false,
sendPresenceNotificationOnAction: true
},
classes: "pageL4 pageL3 pageL2 pageL1 pageC pageR1 pageR2_1 pageR2_2 pageR3 pageR4"
},
{
module: "MMM-ProfileSwitcher",
config: {
defaultClass: "pageC",
ignoreModules: [
"MMM-Touch"
],
leaveMessages: false,
enterMessages: false
}
},
{
module: "MMM-Touch",
position: "bottom_center",
config: {
debug: true,
useDisplay: false,
defaultMode: "default",
gestureCommands: {
default: {
TAP_1: (commander) => {
commander.sendNotification("USER_PRESENCE", true);
},
PRESS_1: (commander) => {
commander.sendNotification("USER_PRESENCE", true);
},
SWIPE_UP_1: (commander) => {
commander.sendNotification("USER_PRESENCE", true);
},
SWIPE_DOWN_1: (commander) => {
commander.sendNotification("USER_PRESENCE", true);
},
SWIPE_LEFT_1: (commander) => {
commander.sendNotification("PROFILE_INCREMENT_HORIZONTAL", null);
},
SWIPE_RIGHT_1: (commander) => {
commander.sendNotification("PROFILE_DECREMENT_HORIZONTAL", null);
}
}
}
}
},
Be aware that CSS z-index is a very powerful weapon if you use touch cause overlapping modules may overlap things you want to press. Sometimes playing around with different z-index settings is necessary to find the right order for the modules.
I ended up configuring a z-index of -1 for all module that is hidden (cause it is not visible in the current profile) in my custom.css:
.module.MMM-Bring.hidden,
.module.MMM-TouchButton.hidden,
.module.MMM-SynologySurveillance.hidden,
.module.MMM-EmbedURL.hidden
{
z-index: -1;
}
and add a “normal” z-index to it if it is visible:
.module.MMM-Bring:not(.hidden),
.module.MMM-TouchButton:not(.hidden),
.module.MMM-SynologySurveillance:not(.hidden),
.module.MMM-EmbedURL:not(.hidden) {
z-index: 500;
}
I also added a very high z-index for the components of MMM-ProfileControl to make sure to be able to control my profiles in all situations:
.MMM-ProfileControl {
z-index: 2000;
}
.MMM-ProfileControl .indicator {
z-index: 2005;
}