Read the statement by Michael Teeuw here.
Need help understanding "sendNotification"
-
@sdetweil so.
MMM-Swipe says'Swipe_left'
but MMM-Pages is listening for
'PAGE_CHANGED' - Set the page to the specified payload page. 'PAGE_INCREMENT' - Move to the next page. 'PAGE_DECREMENT' - Move to the previous page.
so, some other module needs to translate. I don’t know of a module that would do this…
receiveNotiication Swipe_Left, and then sendNotification PAGE_DECREMENT (after checking to see if above page 0 I would assume). -
@sdetweil said in Need help understanding "sendNotification":
so, some other module needs to translate. I don’t know of a module that would do this…
MMM-NotificationTrigger
can do that notification translation between modules.receiveNotiication Swipe_Left, and then sendNotification PAGE_DECREMENT (after checking to see if above page 0 I would assume).
{ module: "MMM-NotificationTrigger", config: { triggers:[ { trigger: "Swipe_Left", fires: [ { fire: "PAGE_DECREMENT" } ] } ] } }
-
@sean thanks for that !.. great info… amazing the contribution around this platform…
-
@sdetweil @Sean THANK YOU SOOOOOO MUCH!!!
I’ll get right on it. Just finished my sensor setup with some small pieces of plywood. Now to fire up my pi 3A with the Pi touchscreen…install that notification trigger module and start testing!I do however have a question about the modules listening to the “payload”.
Isn’t it better to have a “translator” build in a module when it can recieve notifications? Or to use a standard string (string01, string02, etc,) it listens to unless the user defines otherwise in the config.js file? -
@mwel1977
NotificationTrigger also has payload translator, sender filter, etc. -
@sean Thanks! :smiling_face_with_open_mouth_smiling_eyes:
I’m just about ready setting the config for the Swipe module.
Then is’t the Notifications turn to be configured. -
Hmmmmmm… Hooked up the wires to the GPIO pins.
configured the Swipe module and hit start to run the MM2.
I know … I forgot to configure the Notification module. But I first wanted to see if the sensors worked by displaying the measured distances on the MM2 screen.BUT…on starting the MM2 it freezes! Ctrl+Q, Alt, Esc … nothing works.
Only pulling the powercord out of the wallsocket! :crying_face: :crying_face: