<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-Fireworks]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I’ve created a quick module for New Year’s Eve or other events you’d like to highlight on your mirror.</p>
<p dir="auto">The MMM-Fireworks module brings a visually stunning fireworks display to your MagicMirror, designed to celebrate special occasions. The fireworks animation runs best in the fullscreen_above region, creating an immersive experience. The start time and duration of the display are configurable via the config.js file.</p>
<h4><a href="https://github.com/ChrisF1976/MMM-Fireworks" target="_blank" rel="noopener noreferrer nofollow ugc">MMM-Fireworks</a></h4>
<p dir="auto"><img src="https://github.com/ChrisF1976/MMM-Fireworks/blob/main/MMM-Fireworks.png?raw=true" alt="MMM-Fireworks" class=" img-fluid img-markdown" /></p>
<p dir="auto">Have fun and take care :-)<br />
Chris.</p>
]]></description><link>https://forum.magicmirror.builders/topic/19259/mmm-fireworks</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 21:22:02 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19259.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Dec 2024 21:44:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Fireworks on Fri, 01 Aug 2025 23:13:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfr1976" aria-label="Profile: chrisfr1976">@<bdi>chrisfr1976</bdi></a> Thanks for this. I installed it in April when we were selling our house and used it as a welcome sign when people came through. Question for you: would you be able to make it so we can put in just a month and day for a start date? I was hoping to put in a list of birthdays and not have to remember to change the year.</p>
]]></description><link>https://forum.magicmirror.builders/post/127644</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/127644</guid><dc:creator><![CDATA[almightyyoshi]]></dc:creator><pubDate>Fri, 01 Aug 2025 23:13:55 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Sun, 09 Feb 2025 12:44:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I’ve just released an update to solve several requests and problems.</p>
<p dir="auto"><a href="https://github.com/ChrisF1976/MMM-Fireworks" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ChrisF1976/MMM-Fireworks</a></p>
<ul>
<li>Multiple Scheduled Events:
<ul>
<li>The module now accepts an <strong>array of scheduled events</strong> (each with its own start time and text message). At each event time, the fireworks start with the corresponding overlay text.</li>
</ul>
</li>
<li>Two separate notifications have been added:
<ul>
<li><strong>NotificationStart</strong> (e.g. “FireFireFire”) starts the fireworks immediately using either the notification’s payload text or a default (textNotification).</li>
<li><strong>NotificationStop</strong> (e.g. “StopFire”) stops the fireworks immediately if they are running.</li>
<li>When a notification is received, it overrides the scheduled events temporarily without affecting future scheduled shows.</li>
</ul>
</li>
</ul>
<p dir="auto"><strong>See also updated config!</strong></p>
<p dir="auto">You can test the notifications with this simple module. I used it during development. I created a small start and stop button you can use.<br />
If you want to test the notification sender module you need to change the “fullscreen_above” to any other region of the mirror. Otherwise you cannot click on the buttons because they’re “behind” the MMM-Fireworks module…</p>
<p dir="auto">Config:</p>
<pre><code>{
  module: "MMM-NotificationSender",
  position: "top_left",
  config: {
    startNotification: "FireFireFire",
    stopNotification: "StopFire",
    startText: "Test me!", //leave blank to use text from MMM-Fireworks
    stopText: "Stop Fire", //nothing happens currently - maybe not needed
  }
},
</code></pre>
<p dir="auto">Module:</p>
<pre><code>Module.register("MMM-NotificationSender", {
  // Default configuration options. These can be overwritten in config.js.
  defaults: {
    // Notification names to send. Other modules can listen to these names.
    startNotification: "START_NOTIFICATION",
    stopNotification: "STOP_NOTIFICATION",
    // Text payloads for the notifications.
    startText: "This is a start notification.",
    stopText: "This is a stop notification."
  },

  // Called when the module is started
  start: function() {
    Log.info("Starting module: " + this.name);
  },

  // Override the getDom method to create your custom UI.
  getDom: function() {
    // Create a wrapper element to contain the buttons.
    var wrapper = document.createElement("div");
    wrapper.style.textAlign = "center";

    // Create the Start button
    var startBtn = document.createElement("button");
    startBtn.innerHTML = "Start";
    startBtn.style.marginRight = "10px";
    startBtn.addEventListener("click", this.sendStartNotification.bind(this));
    wrapper.appendChild(startBtn);

    // Create the Stop button
    var stopBtn = document.createElement("button");
    stopBtn.innerHTML = "Stop";
    stopBtn.addEventListener("click", this.sendStopNotification.bind(this));
    wrapper.appendChild(stopBtn);

    return wrapper;
  },

  // Function to send the start notification
  sendStartNotification: function() {
    // Log to console and MagicMirror logs to check the button click event.
    console.log("Start button pressed. Sending start notification...");
    Log.info(
      "Sending start notification: " +
        this.config.startNotification +
        " with payload: " +
        JSON.stringify({ text: this.config.startText })
    );

    // Send the notification with the configured name and payload.
    this.sendNotification(this.config.startNotification, { text: this.config.startText });
  },

  // Function to send the stop notification
  sendStopNotification: function() {
    // Log to console and MagicMirror logs to check the button click event.
    console.log("Stop button pressed. Sending stop notification...");
    Log.info(
      "Sending stop notification: " +
        this.config.stopNotification +
        " with payload: " +
        JSON.stringify({ text: this.config.stopText })
    );

    // Send the notification with the configured name and payload.
    this.sendNotification(this.config.stopNotification, { text: this.config.stopText });
  }
});

</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/123879</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/123879</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Sun, 09 Feb 2025 12:44:48 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Fri, 07 Feb 2025 21:32:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfr1976" aria-label="Profile: chrisfr1976">@<bdi>chrisfr1976</bdi></a> Hi,<br />
maybe interesting also for others: There is a canvas opacity parameter set now. So you can can keep all your stuff visible in the background while the fireworks is dancing on your mirror. I didn’t had this feature in mind, but I got this request on GitHub. I like that, too ;-)</p>
<p dir="auto">A picture from my playground to explain what I mean:</p>
<p dir="auto"><img src="/assets/uploads/files/1738963922273-bildschirmfoto-2025-02-07-um-22.30.49.png" alt="Bildschirmfoto 2025-02-07 um 22.30.49.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/123831</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/123831</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Fri, 07 Feb 2025 21:32:11 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Fri, 07 Feb 2025 12:07:33 GMT]]></title><description><![CDATA[<p dir="auto">I have completely reworked the MMM-Fireworks module!</p>
<p dir="auto"><strong>New:</strong></p>
<ul>
<li>It is now using the p5.js library. So it is now faster and I’ve added more config options.</li>
<li>Also the timing problem ist solved. You can define a start date and time. If you need to restart your mm inbetween it continues.</li>
<li>you can install it today and enjoy on next new years eve. (The JavaScript’s setTimeout is solved here (has a maximum delay roughly 2³¹–1 milliseconds - only 24.8 days)</li>
<li>Added a text overlay</li>
<li>runs as before in fullscreen but also “in a box” as every other module</li>
<li><strong>And the best: the explosion effect is now really nice!</strong></li>
</ul>
<p dir="auto"><img src="https://github.com/ChrisF1976/MMM-Fireworks/raw/main/MMM-Fireworks.mov" alt="Bild Text" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://github.com/ChrisF1976/MMM-Fireworks/blob/main/MMM-Fireworks.png?raw=true" alt="Bild Text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/123810</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/123810</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Fri, 07 Feb 2025 12:07:33 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Sun, 12 Jan 2025 02:24:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
worked on my mirror</p>
]]></description><link>https://forum.magicmirror.builders/post/122927</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122927</guid><dc:creator><![CDATA[plainbroke]]></dc:creator><pubDate>Sun, 12 Jan 2025 02:24:24 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Wed, 08 Jan 2025 23:06:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfr1976" aria-label="Profile: chrisfr1976">@<bdi>chrisfr1976</bdi></a> if the start time is in the past and the event time is in the future, then the start time should be now. (however that gets calculated, literal or adjusted offset…)</p>
<p dir="auto">I am not looking at the doc or code</p>
]]></description><link>https://forum.magicmirror.builders/post/122791</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122791</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 08 Jan 2025 23:06:56 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Wed, 08 Jan 2025 23:03:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> no, the start time is relevant. If the start time is in the past and the effect time may be stll okay like 365<em>24</em>60<em>60</em>1000, the effect does not start. This could be the problem here. So you really need to wait for the defined time in the config.<br />
I‘ve spent several minutes with waiting….</p>
]]></description><link>https://forum.magicmirror.builders/post/122790</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122790</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Wed, 08 Jan 2025 23:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Wed, 08 Jan 2025 22:55:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfr1976" aria-label="Profile: chrisfr1976">@<bdi>chrisfr1976</bdi></a> why would you want it in the past?</p>
<p dir="auto">oh, and NOW is impossible to catch</p>
]]></description><link>https://forum.magicmirror.builders/post/122789</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122789</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 08 Jan 2025 22:55:23 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Wed, 08 Jan 2025 22:52:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/com1cedric" aria-label="Profile: com1cedric">@<bdi>com1cedric</bdi></a> see my answer on GitHub. It only starts if the start time is exactly now or in the future.</p>
]]></description><link>https://forum.magicmirror.builders/post/122788</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122788</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Wed, 08 Jan 2025 22:52:41 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Wed, 08 Jan 2025 18:31:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/com1cedric" aria-label="Profile: com1cedric">@<bdi>com1cedric</bdi></a> what position did you set it to?</p>
]]></description><link>https://forum.magicmirror.builders/post/122779</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122779</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 08 Jan 2025 18:31:04 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Wed, 08 Jan 2025 18:16:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfr1976" aria-label="Profile: chrisfr1976">@<bdi>chrisfr1976</bdi></a></p>
<p dir="auto">Hello!</p>
<p dir="auto">great idea, you module !</p>
<p dir="auto">but does it really work ? it does not appear on my mirror, after installing it.</p>
<p dir="auto">Can you please re-check on your side ?</p>
<p dir="auto">Thanks in advance and have a good evening,</p>
<p dir="auto">Cédric</p>
]]></description><link>https://forum.magicmirror.builders/post/122778</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122778</guid><dc:creator><![CDATA[com1cedric]]></dc:creator><pubDate>Wed, 08 Jan 2025 18:16:41 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Tue, 31 Dec 2024 01:18:36 GMT]]></title><description><![CDATA[<p dir="auto">Worked for me earlier when I tested it this afternoon.<br />
Nice module…</p>
]]></description><link>https://forum.magicmirror.builders/post/122341</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122341</guid><dc:creator><![CDATA[plainbroke]]></dc:creator><pubDate>Tue, 31 Dec 2024 01:18:36 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Mon, 30 Dec 2024 22:34:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">unfortunately even more optimizations were necessary. So I update the repository.</p>
<p dir="auto"><strong>New:</strong></p>
<ul>
<li>hides all modules during animation</li>
<li>suspends all modules during animation</li>
</ul>
<p dir="auto"><strong>Reduced effects</strong>:</p>
<pre><code>createExplosion(x, y) {
        const particleCount = 25; // was 50
</code></pre>
<pre><code>this.particles.forEach((p) =&gt; {
            p.x += p.vx;
            p.y += p.vy;
            p.vy += 0.01; // less gravity
            p.alpha -= 0.01;
        });

</code></pre>
<pre><code>    setup() {
        this.canvas.width = this.width*0.95 //reduced width 
        this.canvas.height = this.height*0.95 //reduced height
        window.addEventListener("resize", () =&gt; this.resize());
    }
</code></pre>
<ul>
<li>And updated CSS to be in the middle of the screen again.</li>
</ul>
<p dir="auto">Hopefully you’ll celebrate this, too!</p>
]]></description><link>https://forum.magicmirror.builders/post/122339</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122339</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Mon, 30 Dec 2024 22:34:12 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Mon, 30 Dec 2024 20:35:41 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">a short update since time is running out :)</p>
<p dir="auto">I’ve modified the code a little. In my set up I had some performance problems with the animation.</p>
<p dir="auto">So I put all other modules in the “Hide” during the animation is running. Afterwards everything will come back (so the plan).</p>
<p dir="auto">I don’t know if everybody likes or needs this. So I show the modified code just here.</p>
<p dir="auto">Replace the complete code in “MMM-Fireworks.js” with this:</p>
<pre><code>Module.register("MMM-Fireworks", {
    defaults: {
        startDateTime: "2024-12-31T23:59:00", // ISO format
        duration: 60000, // Duration in milliseconds
    },

    start: function () {
        this.fireworksActive = false;
    },

    getDom: function () {
        const wrapper = document.createElement("div");
        wrapper.id = "fireworksContainer";
        return wrapper;
    },

    notificationReceived: function (notification, payload, sender) {
        if (notification === "DOM_OBJECTS_CREATED") {
            this.scheduleFireworks();
        }
    },

    scheduleFireworks: function () {
        const startTime = new Date(this.config.startDateTime).getTime();
        const currentTime = Date.now();
        const delay = startTime - currentTime;

        if (delay &gt; 0) {
            setTimeout(() =&gt; this.startFireworks(), delay);
        } else {
            console.warn("Fireworks start time has already passed.");
        }
    },

    startFireworks: function () {
        this.fireworksActive = true;
        const container = document.getElementById("fireworksContainer");
        container.classList.add("fullscreen");

        const canvas = document.createElement("canvas");
        canvas.id = "fireworksCanvas";
        container.appendChild(canvas);

        this.sendNotificationToModules("HIDE"); // Module ausblenden

        const fireworks = new Fireworks(canvas);
        fireworks.start();

        setTimeout(() =&gt; {
            this.stopFireworks(fireworks, container);
        }, this.config.duration);
    },

    stopFireworks: function (fireworks, container) {
        fireworks.stop();
        container.innerHTML = ""; // Clear the canvas
        this.fireworksActive = false;
        this.sendNotificationToModules("SHOW"); // Module wieder einblenden
    },

    sendNotificationToModules: function (action) {
        MM.getModules().enumerate((module) =&gt; {
            if (module.name !== "MMM-Fireworks") {
                if (action === "HIDE") {
                    module.hide(500); // Mit Animation ausblenden
                } else if (action === "SHOW") {
                    module.show(500); // Mit Animation einblenden
                }
            }
        });
    },

    getStyles: function () {
        return ["MMM-Fireworks.css"];
    },

    getScripts: function () {
        return ["fireworks.js"];
    }
});

</code></pre>
<p dir="auto">Party on!</p>
<p dir="auto">Cheers Chris.</p>
]]></description><link>https://forum.magicmirror.builders/post/122338</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122338</guid><dc:creator><![CDATA[chrisfr1976]]></dc:creator><pubDate>Mon, 30 Dec 2024 20:35:41 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Fireworks on Sun, 29 Dec 2024 21:48:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chrisfr1976" aria-label="Profile: chrisfr1976">@<bdi>chrisfr1976</bdi></a> awesome</p>
]]></description><link>https://forum.magicmirror.builders/post/122318</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122318</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 29 Dec 2024 21:48:21 GMT</pubDate></item></channel></rss>