MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Need help understanding "sendNotification"

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    9 Posts 3 Posters 3.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Do not disturb
      sdetweil @sdetweil
      last edited by sdetweil

      @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).

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      ? 1 Reply Last reply Reply Quote 1
      • ? Offline
        A Former User @sdetweil
        last edited by A Former User

        @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"
                  }
                ]
              }
            ]
          }
        }
        
        S 1 Reply Last reply Reply Quote 3
        • S Do not disturb
          sdetweil @Guest
          last edited by

          @sean thanks for that !.. great info… amazing the contribution around this platform…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • M Offline
            MWel1977
            last edited by

            @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?

            ? 1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User @MWel1977
              last edited by

              @mwel1977
              NotificationTrigger also has payload translator, sender filter, etc.

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                MWel1977 @Guest
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MWel1977
                  last edited by

                  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:

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy