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.

    Made a birthday module

    Scheduled Pinned Locked Moved Entertainment
    39 Posts 4 Posters 11.6k 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.
    • C Offline
      cgillinger @plainbroke
      last edited by

      @plainbroke said in Made a birthday module:

      @cgillinger
      Works on the fireworks, but not on the MESSAGE part, It stays on the screen.
      The fireworks came and went with the page it was supposed to.

      This annoys the hell out of me, if I get the time, I’ll try to set up a MM with MMM-Pages to test it here.

      But to be clear:

      The fireworks (and confetti?) works
      But the message a) doesn’t show or b) shows, but does not get removed when MMM-Pages initiate page change?

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @cgillinger
        last edited by

        @cgillinger b

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          cgillinger @sdetweil
          last edited by

          @sdetweil said in Made a birthday module:

          @cgillinger b

          Huh?

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @cgillinger
            last edited by

            @cgillinger you said a or b

            I responded he said b

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            plainbrokeP 1 Reply Last reply Reply Quote 1
            • plainbrokeP Offline
              plainbroke @sdetweil
              last edited by

              @cgillinger
              As Sam said b it stays on the screen always. Just the message though.
              Sorry it annoys you so.
              Take your time I am not in a hurry, never am.
              Just thought I would let you know. I am sure others are watching this to add to their pages too…

              Slow learner. But trying anyways.
              MM is on Raspberry Pi 4B w/8gb ram loaded on a 128gb nvme drive.
              Running Trixie and the latest MM version.

              1 Reply Last reply Reply Quote 1
              • X Offline
                xIExodusIx
                last edited by

                Unfortunately I have a few problems with your MMM-Birthday module. When I start the MM and there is a birthday, it is immediately displayed in the
                middle (middle_center) on all pages without taking the position from config.js into account. The display is not yet dimmed on all pages.
                Confetti is displayed in the correct position (lower_third) on the specified page as specified in the config.js, fireworks only sometimes but the
                icons are missing!
                On the 2nd and all subsequent runs of the pages, the birthday is also displayed in the correct position (lower_third) but without a name (undefined!)
                with confetti (always) and fireworks (only sometimes) but still without icons. The display now will be dimmed on all pages.
                If I start the MM and there is no birthday, everything is fine, nothing is displayed.
                If a birthday is coming up from 00:00, it will be displayed as described above in the correct position (lower_third) with confetti but without a
                name (undefiend!), without fireworks and without icons. The display is darkened on all pages so that it is barely legible.

                See Pictures!

                Hardware:
                Raspberry Pi4 4GB RAM RaspiOS: Bookworm
                Software:
                MM 2.30 with MMM-Pages
                MM2.30_Birthday-1_First_Run.jpg MM2.30_Birthday-2_All_other_Runs.jpg MM2.30_Birthday-3.jpg

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  cgillinger @xIExodusIx
                  last edited by

                  @xIExodusIx Yes, there is an issue with it working alongside MMM-Pages. It seems that the methods I use to make it display interfere with MMM-Pages. MMM-Birthday doesn’t play well with others and tends to do its own thing, which doesn’t work with MMM-Pages. I’m working on a solution, but I haven’t had much time to spare lately.

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @cgillinger
                    last edited by

                    @cgillinger

                    see the

                    suspend() and resume() functions you can add to be notified when being hidden (suspend) and shown (resume)

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    plainbrokeP 1 Reply Last reply Reply Quote 2
                    • plainbrokeP Offline
                      plainbroke @sdetweil
                      last edited by

                      @cgillinger
                      I was going to ask if you had found a work around for pages and MMM-Birthdays. I also tried it with pages and just one other module. MMM-Birthdays takes over even MMM-MPlayer and it is a bully too.
                      Always wanting to be on top… You idea is awesome, but the deployment needs a little work…
                      I am trying a few different setups now that I have a “test setup”.
                      I really want to make MPLayer and Birthdays to play nice on one of my displays. So far no bueno…

                      Slow learner. But trying anyways.
                      MM is on Raspberry Pi 4B w/8gb ram loaded on a 128gb nvme drive.
                      Running Trixie and the latest MM version.

                      S C 2 Replies Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @plainbroke
                        last edited by

                        @plainbroke they cannot be on same page

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          cgillinger @plainbroke
                          last edited by

                          @plainbroke Working on it! The plain and simple truth is I took a few shortcuts with the behaviour of the module, and that came back to bite me. I’m working on it, but its in my spare time and right now I have precious little of it. But as soon as I get it fixed, I’ll post here.

                          plainbrokeP 1 Reply Last reply Reply Quote 0
                          • plainbrokeP Offline
                            plainbroke @cgillinger
                            last edited by

                            @cgillinger
                            Sounds good. I will watch this form post for the update.

                            Slow learner. But trying anyways.
                            MM is on Raspberry Pi 4B w/8gb ram loaded on a 128gb nvme drive.
                            Running Trixie and the latest MM version.

                            C 1 Reply Last reply Reply Quote 0
                            • C Offline
                              cgillinger @plainbroke
                              last edited by cgillinger

                              I THINK I’ve solved it. At least, it works on my test installation MagicMirror running on Linux Mint. I’ve tested it with MMM-Pages and MMM-Carousel, and now the transitions are working. However, there are a few things to note:

                              It looks really weird when you first start MagicMirror. The reason is that the system starts up, immediately detects that a birthday is happening, and then triggers an untimed startup where the module isn’t fully initialized yet. It sorts itself out after the first transition, and since it’s somewhat of an edge case to start from scratch, I haven’t spent time fine-tuning it. A more reasonable scenario is that MagicMirror runs continuously, the day changes, and then the birthday event occurs—where everything works as expected.

                              I wasn’t able to make the module overlay existing modules while dimming them slightly, as it did in my first version. This is due to the fact that my initial solution aggressively took control over the display. To make it work with Pages and Carousel while respecting their handling of module visibility, I had to take a different approach. This means that the module now displays on its own. Im going to look into how this might be solved next, I’d really like for it to show above the other modules of that page. Because of this, I had to rename it and treat it as a completely separate module, now called “MMM-Birthday-Paged”. I’ll also mark the original module so that users who rely on module switchers don’t accidentally pick the wrong one.

                              As a bonus, after all my tweaking, I ended up with several different fireworks effects, so I left them in a separate subfolder. If you want to test them, just copy the existing “fireworks.js” from the root directory.

                              Give it a try, and I hope it works for you too!

                              URL:
                              https://github.com/cgillinger/MMM-Birthday-Paged

                              S 1 Reply Last reply Reply Quote 0
                              • S Do not disturb
                                sdetweil @cgillinger
                                last edited by

                                @cgillinger instead of using the start function directly

                                Use the ALL_MODULES_STARTED notification
                                Then call your renamed startup() function

                                See https://docs.magicmirror.builders/development/notifications.html#system-notifications

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 1
                                • X Offline
                                  xIExodusIx
                                  last edited by

                                  Hi cgillinger,

                                  I tested your new modul, MMM-Birthday-Paged, sadly it does not work for me, it should shown up on my MagicMirror on Page 1 with a lot of more informations, it does, firework and confetti work well, but it kills all of my other Informations on that page and the icons in front and back of the “gratulation text” will not be displayed, exactly as mentioned in my post some Days earlier.
                                  For me this version of yor Modul must have its own Page.

                                  C 1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    cgillinger @xIExodusIx
                                    last edited by

                                    @xIExodusIx On the first issue, that is, currently, by design as I outline in my previous post. I’m looking into if there is a method to fix it, but Im not there yet.

                                    On the second issue that sounds like a font problem. What system are you on?

                                    1 Reply Last reply Reply Quote 0
                                    • X Offline
                                      xIExodusIx
                                      last edited by

                                      @cgillinger Hi cglinger,

                                      I’m using a Raspberry Pi 4B 4GB with RaspiOS Bookworm
                                      MM Version is 2.30,
                                      npm Version is 10.9.2,
                                      node Version is 23.6.1.

                                      I hope this would help.

                                      C 1 Reply Last reply Reply Quote 0
                                      • C Offline
                                        cgillinger @xIExodusIx
                                        last edited by

                                        @xIExodusIx said in Made a birthday module:

                                        I’m using a Raspberry Pi 4B 4GB with RaspiOS Bookworm
                                        MM Version is 2.30,
                                        npm Version is 10.9.2,
                                        node Version is 23.6.1.

                                        I think RaspiOS is missing the font. It might be solved by issuing:

                                        sudo apt update
                                        sudo apt upgrade -y
                                        sudo apt install -y fonts-noto-color-emoji fonts-symbola ttf-ancient-fonts
                                        

                                        and then rebuild font cache

                                        sudo fc-cache -f -v
                                        

                                        Then restarting Magic Mirror and/or Pi.

                                        And if I get the time, Ill look into a more elegant solution.

                                        X 1 Reply Last reply Reply Quote 0
                                        • X Offline
                                          xIExodusIx @cgillinger
                                          last edited by

                                          @cgillinger said in Made a birthday module:

                                          @xIExodusIx said in Made a birthday module:

                                          I’m using a Raspberry Pi 4B 4GB with RaspiOS Bookworm
                                          MM Version is 2.30,
                                          npm Version is 10.9.2,
                                          node Version is 23.6.1.

                                          I think RaspiOS is missing the font. It might be solved by issuing:

                                          sudo apt update
                                          sudo apt upgrade -y
                                          sudo apt install -y fonts-noto-color-emoji fonts-symbola ttf-ancient-fonts
                                          

                                          and then rebuild font cache

                                          sudo fc-cache -f -v
                                          

                                          Then restarting Magic Mirror and/or Pi.

                                          And if I get the time, Ill look into a more elegant solution.

                                          Thank you :-) , this solved my problem with the funny Icons in front and then end of the text.

                                          Now the last problem(s) is to tell your Module not to hijack the whole page for itself and not to ignore the position where to be displayd on the mirror.
                                          Your Module is really great, because there is a little bit of (funny) action on the mirror :-)
                                          I’m sure you will solve the two Problems too an I’m looking forward for that. :-)

                                          C 1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            cgillinger @xIExodusIx
                                            last edited by cgillinger

                                            @xIExodusIx I believe I’ve solved the issue where MMM-Birthday-Pages was taking over the entire screen when active. There’s now a new toggle, immersiveMode, which can be set to either “true” or “false”.

                                            "false" allows the birthday celebration to overlay existing modules while keeping them visible.
                                            "true" means only the birthday celebration is displayed, hiding everything else.
                                            

                                            This also means you can have different behaviors on different Pages.

                                            That said, I’ve only had time for a quick test, and it worked as expected on my Linux Mint installation. To be safe, I’ve uploaded it to a separate test repository. If it proves to be stable, I’ll merge it into the main one (I’m sure there are easier ways to do this, but I suck at Git). Repo URL:
                                            https://github.com/cgillinger/mmm-Birthday-paged-test (and please note that you need to rename the folder to “mmm-Birthday-paged” after cloning)

                                            So, give it a try and let me know how it goes!

                                            X 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
                                            • 2
                                            • 2 / 2
                                            • 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