• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

How to run two instances of one module?

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 4 Posters 2.1k Views 5 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.
  • A Offline
    AndrewEscobar
    last edited by AndrewEscobar Aug 20, 2019, 2:38 PM Aug 17, 2019, 9:28 AM

    eya guys,

    So I found a perfect module to manage my hue-lights: Crypto Casino

    But since I have my rooms spread out across two hue bridges I cant display all my rooms.

    This is going to sound so stupid, but I tried renaming all the instances of the modules name in order to make another bridge config possible.
    It did work, kinda - but the renamed module acts weird and prompts the HUE API until it gives up after a couple of minutes. It also causes a memory leak which leads MM to crash after a couple of minutes.

    Help would be very much appreciated!

    S 1 Reply Last reply Aug 17, 2019, 11:14 AM Reply Quote 0
    • S Away
      sdetweil @AndrewEscobar
      last edited by Aug 17, 2019, 11:14 AM

      @AndrewEscobar typically, you copy the module to another folder name, mmm-hue-lights1,
      then edit the mmm-hue-lights.js and chaneg the name there to mmm-hue-lights1, then rename that file to mmm-hue-lights1.js

      then in the config use the module: ‘mmm-hue-lights1’

      but, some modules think there will be only one instance, and find and edit the single copy of the html
      and of course the api usage may have limits too…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      Q 1 Reply Last reply Aug 17, 2019, 2:26 PM Reply Quote 0
      • Q Offline
        qu1que Project Sponsor @sdetweil
        last edited by Aug 17, 2019, 2:26 PM

        @sdetweil

        Hi, the same happens to me with https://github.com/lavolp3/MMM-DailyDilbert module. I’ve tried to use two instances of the same module, one with Dilbert, and another with Garfield comic. For that, I’ve git cloned one time the module, change name to MMM-DailyDilbert_Dilbert, git clone again and rename MMM-DailyDilbert_Garfield. Added two tricky-modules to config.js, each one with its own configuration, but doesn’t work, does not show any module or just show only one…

        M 1 Reply Last reply Aug 18, 2019, 12:30 AM Reply Quote 0
        • M Offline
          Mykle1 Project Sponsor Module Developer @qu1que
          last edited by Mykle1 Aug 18, 2019, 12:31 AM Aug 18, 2019, 12:30 AM

          @qu1que

          Clone https://github.com/lavolp3/MMM-ComicStrips into modules folder.
          Copy and paste that folder, renaming it to MMM-ComicStrips2
          Open MMM-ComicStrips2 folder and rename MMM-ComicStrips.js to MMM-ComicStrips2.js
          Open MMM-ComicStrips2.js file and change line 1 to Module.register("MMM-ComicStrips2", {

          Make config.js entry

          {
              module: 'MMM-ComicStrips',
              position: 'top_center',
              config: {
                comic: "dilbert",         // Choose between  ["dilbert", "xkcd", "garfield", "peanuts", "nichtlustig", "ruthe", "dilbert_de"]
                updateInterval : 1000 * 60 * 30,  // 30 minutes
                coloredImage: false,      //colored or black&white (inverted) image
                comicWidth: 500,
                timeForDaily: [7, 9]    //time frame to show the most recent (or daily) comic.
              }
            },
            {
              module: 'MMM-ComicStrips2',
              position: 'middle_center',
              config: {
                comic: "garfield",         // Choose between  ["dilbert", "xkcd", "garfield", "peanuts", "nichtlustig", "ruthe", "dilbert_de"]
                updateInterval : 1000 * 60 * 30,  // 30 minutes
                coloredImage: false,      //colored or black&white (inverted) image
                comicWidth: 500,
                timeForDaily: [7, 9]    //time frame to show the most recent (or daily) comic.
              }
            },
          

          0_1566088219125_Screenshot from 2019-08-17 20-21-53.png

          Create a working config
          How to add modules

          Q 1 Reply Last reply Aug 18, 2019, 1:09 AM Reply Quote 0
          • Q Offline
            qu1que Project Sponsor @Mykle1
            last edited by Aug 18, 2019, 1:09 AM

            @Mykle1

            Thanks! Now it works perfect!!

            M 1 Reply Last reply Aug 18, 2019, 1:11 AM Reply Quote 0
            • M Offline
              Mykle1 Project Sponsor Module Developer @qu1que
              last edited by Aug 18, 2019, 1:11 AM

              @qu1que said in How to run two instances of one module?:

              Thanks! Now it works perfect!!

              Excellent! :thumbsup:

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                6/6
                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