Read the statement by Michael Teeuw here.
MMM-Touch
-
@sdetweil Yes that is the same module. Sean changed the ownership when he left: Seans modules
The onNotification function seems important to me. if I change to page two for example, the gestures can be defined in another way compared to page one.
My problem is, when I add the code and restart my mirror everthing stays black. usually if there is a bug in the config.js an error is mentioned. but in this case it just stays black.
If I uncomment the code everthing is fine again.
This even happens when i use the example code. Knowing that it wont do anything on my magic mirror, it should start anyway.
So i am wondering if there is a bug or if i am doing something wrong?
Do you use the module? -
@MrCoffee no… never seen it before…
how do you start MM
npm start
or pm2?if npm start , keyboard alt-spacebar, n to minimize
if pm2,
pm2 logs --lines=100if still nothing obvious, open the developers window, ctrl-shoft-i on the mirror keyboard,
select the tab labeled console and scroll up… errors are usually in red text -
-
@MrCoffee yeh, skip docker til you get it working…
-
@sdetweil I just tried ctrl-shift-i with a working mirror. On the tab console I could see a css error, but everything works.
Then i added the onNotification code. Still the same. no mirror starting, and on the console tab there is no error. it ends with “initializing MagicMirror”.
But nothing happens. -
@MrCoffee ok, then it must be back on the terminal window where i started MM
either there is a module missing
a syntax error
or some fatal problem in the front end (mmm-touch.js) -
@sdetweil Ok. The module MMM-Touch can create a detailed log (says the config). But it is not written where I can find it:-) Is there a common place for it?
-
@MrCoffee no idea… either in the module folder or MM folder…
but if there is a fatal error, it probably cant write the logs
-
@sdetweil Ok. I see. So I will have to ask gfischershaw.
Thx -
can someone provide me with an example of Executing methods of module?
i’d like to create a swipe up and swipe down to hide and unhide a module. thank you.
-
@3squaremirror can u be more specific, execute methods of a module?
-
@3squaremirror
I have not tested yet, but you can get a concept. (I’ll assume you are using default configuration and mode)gestureCommands: { "default": { "SWIPE_UP_1" : (commander) => { commander.getModules().forEach((m) => {m.show()}) }, "SWIPE_DOWN_1" : (commander) => { commander.getModules().forEach((m) => {m.hide()}) } } },Swiping up with one finger would reveal modules.
Swiping down with one finger would hide modules.
But in the real world, some modules are protected with lock string from hiding/showing, -
@MMRIZE I saw that in the example in the GitHub page. I’m confused on where to specify which module to hide/show. Thanks.
-
@sdetweil to hide and show a specific module.
-
@3squaremirror i understood that part…
I think @MMRIZE answered
-
@sdetweil I’m not clear on where to specify the module I want to hide/show. Can you help me understand? Thank you.
-
@3squaremirror i believe @MMRIZE provided code to hide all, and you could have a list (or only one) module name to match for hiding/showing
-
"SWIPE_UP_1" : (commander) => { let clock = commander.getModule('clock') clock.hide() },https://github.com/gfischershaw/MMM-Touch/wiki/Manual#command
-
@MMRIZE THANK YOU! much appreciated.
-
one other question. I’m trying to make use of the onIdle function to activate a screensaver page in my MMM-pages.
from Pages’s github
SHOW_HIDDEN_PAGE String MMM-pages will switch to the provided hidden page name.from Touch’s github
// will send a TOUCH_IDLE_TRIGGERED notification onIdle: "TOUCH_IDLE_TRIGGERED",I’ve successfully got the Touch module to send a notification based on the onIdle timer. I just don’t know how to specify my Page’s screensaver page along with the payload.
"SHOW_HIDDEN_PAGE", 'screenSaver'my code for each module
{ module: 'MMM-pages', disabled: false, classes: 'default everyone', config: { modules: [[ "MMM-DateOnly", "clock2" ], [ "MMM-OpenWeatherMapForecast", "clock" ], [ "calendar", "clock" ], [ "clock", "MMM-Wallpaper" ] ], fixed: [ "weather", "MMM-page-indicator", "MMM-SimpleLogo" ], hiddenPages: { "screenSaver": [ "MMM-Wallpaper", "MMM-FlipClock" ], "admin": [ "MMM-ShowMeSystemStatsModule", "MMM-AnOnScreenMenuModule" ], }, } },{ module: "MMM-Touch", position: "top_bar", disabled: false, config: { debug: false, useDisplay: false, autoMode: false, defaultMode: "default", threshold: { idle_ms: 3000, // Idle time (in milliseconds) after which the defined "onIdle" notification / callback function should be triggered }, onIdle: ("SHOW_HIDDEN_PAGE", 'screenSaver'), gestureCommands: { default: { TAP_1: (commander) => { commander.sendNotification("USER_PRESENCE", true); }, PRESS_1: (commander) => { commander.sendNotification("USER_PRESENCE", true); }, TAP_2: (commander) => { commander.sendNotification("LOAD_NEXT_WALLPAPER", true); }, "SWIPE_UP_1" : (commander) => { let clock = commander.getModule('MMM-OpenWeatherMapForecast') clock.show() }, "SWIPE_DOWN_1" : (commander) => { let clock = commander.getModule('MMM-OpenWeatherMapForecast') clock.hide() }, SWIPE_UP_2: (commander) => { commander.sendNotification("SHOW_HIDDEN_PAGE", "screenSaver"); }, SWIPE_DOWN_2: (commander) => { commander.sendNotification("LEAVE_HIDDEN_PAGE"); }, SWIPE_LEFT_1: (commander) => { commander.sendNotification("PAGE_INCREMENT", null); }, SWIPE_RIGHT_1: (commander) => { commander.sendNotification("PAGE_DECREMENT", null); } }, } } },
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login