MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. jerry11D
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 0

    jerry11D

    @jerry11D

    0
    Reputation
    2
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    jerry11D Unfollow Follow

    Latest posts made by jerry11D

    • RE: MMM-GroveGestures Parsing error: Parenthesized pattern

      @sdetweil to make sure my config contains no errors before I start editing and tweaking, only to be completely baffled whether a syntax error is of my doing or not … case in point.

      posted in System
      jerry11DJ
      jerry11D
    • MMM-GroveGestures Parsing error: Parenthesized pattern

      Re: MMM-GroveGestures

      Copying the default config code into config.js makes “npm run config:check” generate a “Parsing error: Parenthesized pattern” on

      exec: (module, gestures) => {
      module.hide(1000, null, {lockstring:"GESTURE"})}
      

      I’m uncertain how to fix it or proceed and I so much want to incorporate this module into my setup. Can anyone please offer some advice? Thank you. (complete config code is below):

      {
        module: "MMM-GroveGestures",
        position: "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"
          },
      
          defaultNotification: "GESTURE",
          pythonPath: "/usr/bin/python", // your python path
      
          defaultCommandSet: "default",
          commandSet: {
            "default": {
              "FORWARD-BACKWARD": {
                notificationExec: {
                  notification: "ASSISTANT_ACTIVATE",
                  payload: null
                }
              },
              "LEFT-RIGHT": {
                notificationExec: {
                  notification: "ASSISTANT_CLEAR",
                  payload:null,
                }
              },
              "CLOCKWISE": {
                moduleExec: {
                  module: [],
                  exec: (module, gestures) => {
                    module.hide(1000, null, {lockstring:"GESTURE"})
                  }
                }
              },
              "ANTICLOCKWISE": {
                moduleExec: {
                  module: [],
                  exec: (module, gestures) => {
                    module.show(1000, null, {lockstring:"GESTURE"})
                  }
                }
              },
              "LEFT": {
                notificationExec: {
                  notification: "ARTICLE_PREVIOUS",
                  payload: null,
                }
              },
              "RIGHT": {
                notificationExec: {
                  notification: "ARTICLE_NEXT",
                  payload: null,
                }
              },
            },
          },
        }
      },
      
      posted in System
      jerry11DJ
      jerry11D