Read the statement by Michael Teeuw here.
How to run two instances of one module?
-
@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.jsthen 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… -
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…
-
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 toModule.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. } },
-
Thanks! Now it works perfect!!
-
@qu1que said in How to run two instances of one module?:
Thanks! Now it works perfect!!
Excellent! :thumbsup: