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.

    MMM-GroveGestures

    Scheduled Pinned Locked Moved System
    51 Posts 8 Posters 17.8k Views 12 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.
    • ? Offline
      A Former User @bolish
      last edited by

      @bolish
      I answered on github.
      Currently it couldn’t. Sorry. I’ve never imagined that situation.

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

        Thanks for the answer and the additional “sequence” tip. Let’s follow up on GitHub post if needed.

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

          Hello World,

          I love your module!
          I use MMM-page-selector to switch between 2 pages. I wanted to use grove gesture to change pages, but I can not adapt the script.
          I can see my gestures in the Magic Mirror when I pass my hand in front of the grove gesture; after, i do not know what to put in config.js
          Can you help me?
          For information, my english is bad, and I do not know anything about programming!

          Thank you

          BenH

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

            @Benjaminh86
            Let’s assume You have page 1 and 2.

            You can assign gesture LEFT to 1, RIGHT to 2.
            At that case, you can add this to your command set(default or any other you want).

            "LEFT": {
              notificationExec: {
                notification: "PAGE_SELECT",
                payload: "1",
              }
            },
            "RIGHT": {
              notificationExec: {
                notification: "PAGE_SELECT",
                payload: "2",
              }
            },
            

            The problem is, MMM-page-selector has no feature of “NEXT PAGE” or “PREVIOUS PAGE”. so when there be more than 2 pages, you should assign gestures per each page.

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              Benjaminh86 @Guest
              last edited by

              @Sean as I said, I’m a beginner, and I do not understand everything in programming.
              In addition, I have a synthaxe error on the line “exec: (module, gestures) => {”
              it indicates a problem with the symbol =>.
              Can you help me?

              ? 2 Replies Last reply Reply Quote 0
              • ? Offline
                A Former User @Benjaminh86
                last edited by

                @Benjaminh86
                Show me your configuration.

                B 1 Reply Last reply Reply Quote 0
                • B Offline
                  Benjaminh86 @Guest
                  last edited by

                  @Sean

                  here is my configuration for your module :

                  {
                  module: “MMM-GroveGestures”,
                  position: “top_right”,
                  pages: {‘all’: ‘top_right’},
                  config: {
                  autoStart: true, //When Mirror starts, recognition will start.
                  verbose:false, // If set as true, useful messages will be logged.
                  recognitionTimeout: 1000, //Gesture sequence will be ended after this time from last recognized gesture.
                  cancelGesture: “WAVE”, //If set, You can cancel gesture sequence with this gesture.
                  visible: true, //Recognized gesture sequence will be displayed on position

                  idleTimer: 1000*60*30, // `0` for disable, After this time from last gesture, onIdle will be executed.
                  onIdle: { // See command section
                    moduleExec: {
                      module: [],
                      exec: (module, gestures) => {
                        module.hide(1000, null, {lockstring:"GESTURE"})
                  	}
                       }
                        },
                  onDetected: {
                    notificationExec: {
                      notification: "GESTURE_DETECTED",
                    },
                    /* You can make Mirror to wake up the modules which were hidden by onIdle with any gestures.
                    moduleExec: {
                      module: [],
                      exec: (module) => {
                        module.show(1000, null, {lockstring:"GESTURE"})
                      }
                    }
                    */
                  },
                  
                  gestureMapFromTo: { //When your sensor is installed with rotated direction, you can calibrate with this.
                    "Up": "UP",
                    "Down": "DOWN",
                    "Left": "LEFT",
                    "Right": "RIGHT",
                    "Forward": "FORWARD",
                    "Backward": "BACKWARD",
                    "Clockwise": "CLOCKWISE",
                    "anti-clockwise": "ANTICLOCKWISE",
                    "wave": "WAVE"
                  },
                  commandSet: {
                       "LEFT": {
                  	notificationExec: {
                  		notification: "PAGE_SELECT",
                  		payload: "main",
                  	}
                       },
                        "RIGHT": {
                  	notificationExec: {
                  		notification: "PAGE_SELECT",
                  		payload: "2",
                        }
                      },
                    },
                  },
                  

                  }
                  },

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

                    @Benjaminh86
                    Your configuration about commandSet has something wrong.

                    commandSet: {
                      "default" : {
                        "LEFT": {
                          notificationExec: {
                            notification: "PAGE_SELECT",
                            payload: "main",
                          }
                        },
                        "RIGHT": {
                          notificationExec: {
                            notification: "PAGE_SELECT",
                            payload: "2",
                          }
                        },
                      },
                    },
                    
                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @Benjaminh86
                      last edited by

                      @Benjaminh86
                      And Have you syntax error? How did you know? Have you used npm check:config? That knows old-fashioned style javascript grammar. So it might not understand new trendy ES6 style grammar.
                      Try this to check your javascript syntax.
                      http://esprima.org/demo/validate.html

                      B 2 Replies Last reply Reply Quote 0
                      • B Offline
                        Benjaminh86 @Guest
                        last edited by

                        @Sean

                        I used the command “npm run config: check”

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