• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 Parsing error: Parenthesized pattern

Scheduled Pinned Locked Moved System
3 Posts 2 Posters 458 Views 2 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.
  • J Offline
    jerry11D
    last edited by jerry11D Apr 13, 2021, 10:07 AM Apr 13, 2021, 10:06 AM

    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,
              }
            },
          },
        },
      }
    },
    
    S 1 Reply Last reply Apr 13, 2021, 12:05 PM Reply Quote 0
    • S Offline
      sdetweil @jerry11D
      last edited by Apr 13, 2021, 12:05 PM

      @jerry11d don’t do that.

      why are u copying this code?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      J 1 Reply Last reply Apr 13, 2021, 12:10 PM Reply Quote 0
      • J Offline
        jerry11D @sdetweil
        last edited by Apr 13, 2021, 12:10 PM

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

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