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.

    Interaction between MMM-Pages & MMM-GroveGestures

    Scheduled Pinned Locked Moved Solved Requests
    12 Posts 2 Posters 4.7k 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.
    • B Offline
      bolish
      last edited by

      @Sean agree to avoid dependencies.
      Commands set & runtime is far over my skills level (for now at least, maybe I will dig in javascript in future).
      Anyway, anything you need from me, such as testing, let me know!

      Appreciate your support if you could give some of your time to this idea.

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

        @bolish I’ve updated.

        1 Reply Last reply Reply Quote 0
        • B Offline
          bolish
          last edited by bolish

          @Sean you’re fast.
          I’ve made several trials, everything seems to work perfectly with your new code. You rock.

          Nevertheless, I’m facing an issue…I believe it’s because I’m not able to write the payload thing right…Would you mind having a look :

          commandSetTrigger: {
          					  "TESTESTT": "0",
          					  "DEFAULT_MODE": "DEFAULT_MODE",
            					  "PAGE_NUMBER_IS": (payload) => { // You can use callback function to change set with conditional payload values.
          									    return payload.commandSetName
          											  }
          					},
          

          At one moment in time, I’m receiving “PAGE_NUMBER_IS” with payload=X.
          I’ve a commandset called “X”, but it’s not working…

          I’ve tried to send “PAGE_NUMBER_IS” + payload “X” manually = your code works fine. So no issue there.
          I’ve installed a notification reader = i’m sure I’m receiving the “PAGE_NUMBER_IS” notification. So that’s fine also.

          The only thing I maybe don’t know is what payload “X” (0 or 1 or 2 or 3) is included in the notification I’m receiving. I tried to transform this notification+payload into an alert+payload (through MMM-notification trigger) to check what the “X” payload is…But I also failed to do that because you need to deal with payload/return which I don’t know…
          Nevertheless, I’m quiet convinced X=0 because it’s how the MMM-PAGES works.

          Anyway, I’m stucked and I believe it’s because I’m writting the payload thing wrong.

          Would appreciate your support there.

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

            @bolish
            Try this.

            "PAGE_NUMBER_IS": (payload) => { return payload }
            
            1 Reply Last reply Reply Quote 0
            • B Offline
              bolish
              last edited by

              Thanks. Will try that this evening. Keep you posted.

              1 Reply Last reply Reply Quote 0
              • B Offline
                bolish
                last edited by

                Works like charm!!!
                @Sean = this guys rocks!
                Thank you very much for that.

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 2 / 2
                • 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