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-ModuleToggle

    Scheduled Pinned Locked Moved Utilities
    7 Posts 3 Posters 4.5k 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.
    • T Offline
      trekky
      last edited by trekky

      Description:
      MMM-ModuleToggle can show or hide specific modules by sending a notification to the module. You can also define to toggle between show and hide and hide module on startup.
      It can be easily combined with MMM-Buttons to hide or show modules with the press of a button.

      Download:
      https://github.com/Trekky12/MMM-ModuleToggle

      P 1 Reply Last reply Reply Quote 1
      • P Offline
        pepemujica @trekky
        last edited by

        @trekky So… how do you send the notification?

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          trekky @pepemujica
          last edited by trekky

          @pepemujica I described it in the readme. With the MMM-Buttons module you can for example send the following notification to hide the calendar and clock module:

          notification: "MODULE_TOGGLE",
          payload: {hide: ["calendar", "clock"], show: [], toggle:[]}
          
          P 1 Reply Last reply Reply Quote 0
          • P Offline
            pepemujica @trekky
            last edited by

            @trekky Thanks

            1 Reply Last reply Reply Quote 0
            • SnilleS Offline
              Snille Module Developer
              last edited by Snille

              Great idea! :)
              If i have multiple instances of a module, for example MMM-WunderGround (for different locations) or as in my case I have 6 MMM-MotionEye modules. :)
              Can I specify what “instans” of that module I want to toggle?

              If you cant find it, make it and share it!
              Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

              T 1 Reply Last reply Reply Quote 0
              • T Offline
                trekky @Snille
                last edited by

                @Snille I am using .withClass(classnames) to identify the modules. (see).

                Since I am not using more than one instance of a module I don’t know if the classname differs in individual instances or if you can define the classname manually. Can you check if they have different classes?

                1 Reply Last reply Reply Quote 0
                • SnilleS Offline
                  Snille Module Developer
                  last edited by

                  I think the class is the same but the “id” is different. I’m using the ID in my MMM-Modulebar. But I’ll have to test it when I have some time. :)

                  If you cant find it, make it and share it!
                  Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    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