Skip to content

Instantly share code, notes, and snippets.

@exKAjFASH
Created April 27, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exKAjFASH/2cf338e5ba7c99431909accf7df8a815 to your computer and use it in GitHub Desktop.
Save exKAjFASH/2cf338e5ba7c99431909accf7df8a815 to your computer and use it in GitHub Desktop.
MagicMirror config sample
{
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: 1200, //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: false, //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",
},
},
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": {
notificationExec: {
notification: "SHELLYDIMMER_OFF",
payload: null
}
},
"CLOCKWISE": {
moduleExec: {
module: [],
exec: (module, gestures) => {
module.hide(1000, null, {lockstring:"GESTURE"})
}
},
notificationExec: {
notification: "SHELLYDIMMER_OFF",
payload:null
}
},
"ANTICLOCKWISE": {
moduleExec: {
module: [],
exec: (module, gestures) => {
module.show(1000, null, {lockstring:"GESTURE"})
}
},
notificationExec: {
notification: "SHELLYDIMMER_ON",
payload:null
}
},
"DOWN": {
notificationExec: {
notification: "SHELLYDIMMER_L_4",
payload: null
}
},
"UP": {
notificationExec: {
notification: "SHELLYDIMMER_L_1",
payload: null
}
},
"LEFT": {
notificationExec: {
notification: "SHELLYDIMMER_L_X",
payload: null
}
},
"RIGHT": {
notificationExec: {
notification: "SHELLYDIMMER_L_Y",
payload: null
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment