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

    Posts

    Recent Best Controversial
    • Combining MMM-GroveGestures and MMM-Page-Selector

      Hi there! I’m on my third update of my Magic Mirror after the previous OS revision of Raspbian busted my RPi (I wasn’t able to generate a taskbar until Bookworm came out??) and am trying to restore some of the functionality I had in rev 1 of my build, where I could use MMM-GroveGestures to swap between pages of modules. I tested and the sensor works, and I am able to get recognition of the gesture movement when I move my hand in front of the sensor in the MM app, but I think there must be an issue in the notification being sent to MMM-Page-Selector and I am stumped. I tried using this.SendNotification and continually got errors as well (I’ll leave the commented versions in in case that was my issue).

      A lightly redacted version of my config file is below:

      /* Config Sample
       *
       * For more information on how you can configure this file
       * see https://docs.magicmirror.builders/configuration/introduction.html
       * and https://docs.magicmirror.builders/modules/configuration.html
       *
       * You can use environment variables using a `config.js.template` file instead of `config.js`
       * which will be converted to `config.js` while starting. For more information
       * see https://docs.magicmirror.builders/configuration/introduction.html#enviromnent-variables
       */
      let config = {
      address: "localhost", // Address to listen on, can be:
      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
      // - another specific IPv4/6 to listen on a specific interface
      // - "0.0.0.0", "::" to listen on any interface
      // Default, when address config is left out or empty, is "localhost"
      port: 8080,
      basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
      // you must set the sub path here. basePath must end with a /
      ipWhitelist: [redacted], // Set [] to allow all IP addresses
      // or add a specific IPv4 of 192.168.1.5 :
      // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
      // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
      // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
      useHttps: false, // Support HTTPS or not, default "false" will use HTTP
      httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
      httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
      
      language: "en",
      locale: "en-CA",   // this variable is provided as a consistent location
        // it is currently only used by 3rd party modules. no MagicMirror code uses this value
        // as we have no usage, we  have no constraints on what this field holds
        // see https://en.wikipedia.org/wiki/Locale_(computer_software) for the possibilities
      
      logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
      timeFormat: 12,
      units: "metric",
      
      modules: [
      {
      module: "MMM-Page-Selector",
      position: "top_center",
      config: {
      defaultPage: "mainPage",
      displayTitle: false,
      selectPageNotif: ["PAGE_SELECT"],
      incrementPageNotif: ["PAGE_UP"],
      decrementPageNotif: ["PAGE_DOWN"],
      persistentPages: true,
      }
      },
      {
      module: "MMM-GroveGestures",
      //position: "top_right",
      pages: {"all": "top_right"},
      config: {
      autoStart: true,
      verbose: false,
      recognitionTimeout: 1000,
      idleTimer: 0,
      },
      defaultNotification: "GESTURE",
      pythonPath: "/usr/bin/python",
      
      defaultCommandSet: "default",
      commandSet: {
      "default": {
      "FORWARD": {
      notificationExec: {
      notification: "PAGE_SELECT",
      payload: "mainPage",
      },
      //this.sendNotification: ("PAGE_SELECT", "mainPage");
      },
      "BACKWARD": {
      notificationExec: {
      notification: "PAGE_SELECT",
      payload: "work",
      },
      //this.sendNotification("PAGE_SELECT", "work"),
      },
      "UP": {
      },
      },
      },
      },
      {
      module: "alert",
      // pages: {"all": "top_bar"},
      },
      {
      module: "updatenotification",
      //position: "top_bar"
      // pages: {"all": "top_bar"},
      },
      {
      module: "clock",
      //position: "top_left"
      pages: {"mainPage": "top_left"},
      },
      {
      module: "calendar",
      header: "Calendar",
      //position: "top_left",
      pages: {"mainPage": "top_left"},
      config: {
      calendars: [
      {
      fetchInterval: 7 * 24 * 60 * 60 * 1000,
      symbol: "calendar-check",
      url: "redacted.ics",
      }
      ]
      }
      },
      {
      module: "calendar",
      header: "Upcoming Birthdays",
      //position: "top_left",
      pages: {"mainPage": "top_left"},
      config: {
      calendars: [
      {
      fetchInterval: 7 * 24 * 60 * 60 * 1000,
      symbol: "calendar-check",
      url: "redacted.ics"
      }
      ]
      }
      },
      {
      module: 'MMM-Block',
      //position: 'top_right',
      pages: {"mainPage": "top_right"},
      config: {
      height: 132,
      }
      },
      {
      module: 'MMM-EnvCanada',
      //position: 'top_right',
      pages: {"mainPage": "top_right"},
      header: "Environment Canada",
      config:{
      siteCode: "redacted",
      provCode: "ON",
      updateInterval: 10 * 60 * 1000,
      language: "e",
      textForecasts: 2,
      showAlerts: true,
      showForecastDays: 5,
      }
      {
      module: 'MMM-Todoist',
      //position: 'bottom_bar',
      pages: {"mainPage": "bottom_bar"},
      header: 'Todoist',
      config: {
      hideWhenEmpty: false,
      accessToken: 'redacted',
      maximumEntries: 10,
      updateInterval: 10 * 60 * 1000,
      fade: false,
      //projects: [],
      labels: ['MagicMirror'],
      }
      },
      
      // Work!
      
      {
      module: "MMM-SpaceLaunch",
      pages: {"work": "top_right"},
      config: {
      showMission: true,
      showLaunchDate: true,
      showRocket: true,
      showLaunchSite: true,
      showLocation: false,
      showPayload: true,
      showOrbit: true,
      showDetails: false,
      }
      },
      ]
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") { module.exports = config; }
      

      Thanks in advance!

      posted in Troubleshooting
      C
      ChanceTime
    • 1 / 1