MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    MMM-ModuleToggle

    Utilities
    3
    7
    3185
    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
      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
        pepemujica @trekky last edited by

        @trekky So… how do you send the notification?

        T 1 Reply Last reply Reply Quote 0
        • T
          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
            pepemujica @trekky last edited by

            @trekky Thanks

            1 Reply Last reply Reply Quote 0
            • Snille
              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
                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
                • Snille
                  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
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy