TeraTech / MMM-WiFiPassword

Magic Mirror Module that displays your WiFi network, password with QRCode
MIT License
99 stars 19 forks source link

adding support for MMM-Modal module #7

Closed skuethe closed 3 years ago

skuethe commented 3 years ago

Adding support for it to work with the MMM-Modal module by @fewieden

When receiving a WIFIPASSWORD_MODAL notification, it will create a modal and show your wifi code on screen.

An example usecase

  1. Using MMM-Modal with config
    {
      module: 'MMM-Modal',
      position: 'fullscreen_below',
      config: {
        timer: false,
        touch: true,
      }
    },
  2. Using MMM-Touch with touchscreen display with following config:
    {
      // Have this at the bottom of your modules, or else it will "push" down other modules comming after it, even tho it is "hidden"
      module: "MMM-Touch",
      position: "top_right",
      config: {
        useDisplay: false,
        defaultMode: "showWifiQr",
        gestureCommands: {
          "showWifiQr": {
            "DOUBLE_TAP_1": (commander, gesture) => {
              // Show Wifi QR code
              commander.sendNotification("WIFIPASSWORD_MODAL")
            },
          }
        }
      }
    },
  3. And, of course MMM-WifiPassword with your specific config
    {
      module: "MMM-WiFiPassword",
      position: "bottom_right",
      config: {
        qrSize: 300,
        network: "someNetwork",
        password: "mySuperSecretPassword",
        showNetwork: false,
        showPassword: false,
        showAuthType: false,
      }
    },
fewieden commented 3 years ago

@skuethe ouuh nice :heart_eyes: I think this is the first usage of MMM-Modal outside of my modules

TeraTech commented 3 years ago

This is fine, but can you update the Readme file to explain this functionality?

skuethe commented 3 years ago

Updated :)