MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    • Profile
    • Following 0
    • Followers 1
    • Topics 29
    • Posts 447
    • Groups 1
    R Offline
    1. Home
    2. rkorell
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Posts

    Recent Best Controversial
    • RE: MMM-NowPlayingOnSpotify: surviving Spotify's 6-month refresh-token expiry (a maintained fork)

      @motdog Good afternoon.
      Sorry for late response - was heavily busy.

      Spotify recently changed again something in their API and their handling of tokens.

      That’s the reason why I changed to Tidal recently and created a new module for my purposes (show what’s playing on my Volumio (which recently WAS Spotify - so used the given (and even forked) Spotify Module)).

      But I gave up. Spotify is not longer a use-case for me - neither for my Volumio nor for My MagicMirror.
      I’m really sorry for that - I do not have time to step after every bad idea from spotify.
      If they lock their environment that massive - I’m out.

      At least from my (older) experience the “Application” handshake “should” work - it was an error in the callback-URL in most cases I have in mind …

      Sorry again for not being that helpful!

      Warmest regards and good luck!
      Ralf

      posted in Showcase
      R
      rkorell
    • RE: MMM-NowPlayingOnVolumio — a fresh "now playing" module for Volumio

      @KristjanESPERANTO Cool. Neverthelss, I stay at current setting.
      Thanks!

      Ralf

      posted in Entertainment
      R
      rkorell
    • RE: PIR / MQTT - Presence sensor(s) revived

      @papinist Thanks, dear Stefano for your confirmation!

      in addition Stefano introduced another idea which pumps addional value to the module.
      Following Stefano’s idea the module now announces the raw PIR-Motion data as well as the presence-information to MQTT Broker - so HA is able to trigger additinal actions (e.g. switching a light on) .

      Happy mirroring!

      Warmest regards,
      Ralf

      posted in System
      R
      rkorell
    • RE: PIR / MQTT - Presence sensor(s) revived

      Good evening to all.
      Today was an interesting day - caused by an issue posted by Stefano ( papinist )

      He opened issue # 10 . with a friendly, well-argued suggestion: expose the mirror screen to Home Assistant as a proper switch — something you can both see (is the screen on?) and control (turn it on/off) as a native HA entity.

      The nice realisation while designing it was that this needs almost nothing new. PSC already speaks MQTT — it already subscribes to a presence topic so that MQTT occupancy sensors can drive the screen. So Home Assistant is simply another presence source, exactly like a radar or mmWave sensor publishing occupancy. The only piece genuinely missing was the reverse direction: a topic the mirror writes, carrying its own screen state. No extra module, no shell scripts, no IPC — just publish one more thing and let HA subscribe to it.

      The design

      The result is an optional homeAssistant config block. Enable it and PSC opens a dedicated MQTT connection (independent of mode, so it works even in pure PIR setups), reusing the broker and credentials you already configured:

      homeAssistant: {
        enabled: false,                  // opt-in, default off → no surprise
        discovery: true,                 // publish the HA auto-discovery config
        discoveryPrefix: "homeassistant",// must match your HA MQTT discovery prefix
        objectId: "magicmirror_screen",  // technical id → topic paths + HA unique_id
        name: "MagicMirror Screen"       // friendly name shown in HA
      }
      

      A few decisions worth flagging, because each is a small opinion:

      It’s a switch, not a button — so ON latches. ON sets a held presence signal: the screen stays on for as long as the switch is on. OFF releases it, and the mirror returns to standby through your normal counterTimeout — the same graceful countdown a PIR walk-away uses. There’s deliberately no separate “instant off”; if you want a snappy off, lower counterTimeout.

      It never reaches into the module’s own logic. The integration adds exactly one OR-term to the presence evaluation — haPresence alongside the existing PIR / MQTT / touch sources — and it sits below the cron windows in precedence. The scheduler still wins: an ON during a cronIgnoreWindows is swallowed, an OFF during a cronAlwaysOnWindows is overridden. Timer, dimming and window logic are untouched.

      The switch is a strict mirror of the real screen. The state topic always publishes the actual screen state, whatever caused the change — PIR, schedule, touch or HA — and it re-publishes after every command. So when the schedule rejects or overrides a command, the switch snaps back to reality rather than lying: HA can never show “on” while the screen is off, or vice versa. A command is a request; the fact is whatever the mirror actually does.

      Auto-discovery + availability, so setup is effortless. On connect PSC publishes a retained Home Assistant MQTT-Discovery config and an availability topic backed by a Last-Will. HA creates the entity automatically and marks it unavailable if the mirror drops off the broker.

      The topics, all derived from objectId:

      homeassistant/switch/magicmirror_screen/config   (retained)  → discovery
      magicmirror/magicmirror_screen/set                           → command  (HA → mirror: ON/OFF)
      magicmirror/magicmirror_screen/state             (retained)  → state     (mirror → HA: ON/OFF)
      magicmirror/magicmirror_screen/availability      (retained)  → online/offline (LWT)
      

      How the auto-creation works

      The mirror and Home Assistant never talk to each other directly — the broker is the only meeting point, and the discoveryPrefix (homeassistant) is the agreed channel. HA’s MQTT integration subscribes to homeassistant/# and listens for anyone announcing themselves there. Because our config is published retained, the broker hands it to HA the instant HA connects — even if HA boots hours later. HA reads the topic path plus the JSON body and builds switch.magicmirror_screen, wired to the command/state/availability topics. It’s the same mechanism Tasmota, Zigbee2MQTT and ESPHome use — the mirror just follows the convention, so it’s picked up like any other device.

      An example automation (doorbell → wake → graceful standby)

      automation:
        - alias: "Doorbell wakes the MagicMirror"
          trigger:
            - platform: state
              entity_id: binary_sensor.video_doorbell
              to: "on"
          action:
            - service: switch.turn_on
              target: { entity_id: switch.magicmirror_screen }
            - delay: "00:00:30"        # keep the camera visible while you look
            - service: switch.turn_off
              target: { entity_id: switch.magicmirror_screen }
      

      Turn it on when the doorbell rings, keep it visible for half a minute, then hand back to PSC’s timer for the standby — or drop the delay/off and turn it off from another trigger, whatever fits your flow.

      A note on testing

      I don’t run Home Assistant here, so I verified the whole MQTT surface with MQTT Explorer playing HA’s role — publishing ON/OFF to the command topic and watching the discovery, state and availability topics. The entire round-trip is observable that way: ON holds, OFF starts the countdown, the state tracks the real screen (including snapping back when the schedule overrides a command), the discovery config is well-formed, availability goes online on start. The one thing that needs a real instance — does HA actually auto-create the entity from that config — is being confirmed by papinist, who has the setup for it.

      Update / install

      If you’re already on the module:

      cd ~/MagicMirror/modules/MMM-PresenceScreenControl
      git pull
      

      No dependency changes this time, so no npm install is needed — just restart MagicMirror. Everything is backwards-compatible and opt-in: homeAssistant.enabled defaults to false, and the rest is additive, so an update touches nothing in your existing setup until you switch it on.

      A genuine thank-you to papinist for the friendly, well-reasoned suggestion and the pleasantconversation that shaped it. Exactly the kind of exchange that makes maintaining a module worthwhile.

      Hope you find it useful.

      Warmest regards,
      Ralf

      posted in System
      R
      rkorell
    • RE: MMM-NowPlayingOnVolumio — a fresh "now playing" module for Volumio

      @KristjanESPERANTO ,
      Ahh… OK.
      Seems acceptable to me (I’m not a friend of “getting all” - but in this special case…).
      Have switched to “all activities” for all important public modules.

      Thanks again for your hint and kind guidance!
      Ralf

      posted in Entertainment
      R
      rkorell
    • RE: MMM-NowPlayingOnVolumio — a fresh "now playing" module for Volumio

      @KristjanESPERANTO

      Dear Kristjan,
      thanks for this hint.
      I’ve recently seen the “hint for devs” (not recognized before…) and have double checked these hints and corrected some of them, indeed (especially the “license” mistakes I wasn’t aware of).

      But in this hint your check seems to fail - I’ve activated in section “watch” in all of my modules a “custom” event subscription on issues and pull request - for example here in MMM-PSC:

      Screenshot 2026-08-18 185636.png

      Is there another place to do so that your deamon can identify this correctly?

      Thanks a lot for stepping in!
      Warm regards,
      Ralf

      posted in Entertainment
      R
      rkorell
    • MMM-NowPlayingOnVolumio — a fresh "now playing" module for Volumio

      Good evening!

      After a lot of on-and-off wrestling with Spotify on my mirror, I finally sat down and built something new — and I’m genuinely happy with how it turned out: MMM-NowPlayingOnVolumio.

      The backstory (some of you will feel this pain 🙂)

      I’ve run Spotify through librespot for long time now, and it kept breaking in ever-new and creative ways. The latest one — the login5 change — finally finished it off for me: hard to fix, only community support and no chances that things will become better.
      So I decided finally to jump ship to Tidal.

      That meant my beloved (forked) MMM-NowPlayingOnSpotify was suddenly out of a job — Tidal doesn’t expose a “currently playing” API the way Spotify does. The existing Volumio modules would have been the obvious fallback… but they’re pretty old (8 and 9 years) and simply too old for a current Trixie / Node 22 setup (ancient socket.io and friends). So: a new module, written from scratch against current Volumio (4.x) and current Node.

      The silver lining

      Moving to Tidal pushed me onto Volumio’s Premium tier — and that turned unexpectedly even into a
      real win. (I’m not THAT big fan of “payment-plans” at all - but: I get noticeably better sound quality (Spotify via Volumio is quality-limited by intent), and (that’s the surprise) the Premium plan unlocks Volumio’s Music Metadata, so the module can show a proper artist biography right on the mirror. More info and better sound — I’ll happily take that trade.

      What it does

      • Shows what Volumio is playing — cover, title, artist, progress bar and
        elapsed/total time.
      • Optional artist biography from Volumio’s Music Metadata (Premium), Between Artists’s Name and progreess bar - shown page by page with a gentle cross-fade — no jittery scrolling.- Because Volumio is the source of truth, it works with any source: Tidal, Spotify, Qobuz, web radio, local files — no changes when you switch services.
      • When nothing is playing it quietly fades to the Volumio logo.
      • Clean split: the backend holds a persistent socket.io connection and does the work, the frontend just displays. It reconnects on its own and survives browser reloads.

      NPOV_on.png

      Config

      Basically just your Volumio host:
      (some options more available - see documentaion on github)

      {
        module: "MMM-NowPlayingOnVolumio",
        position: "bottom_left",
        // header: "Volumio",
        config: {
          volumioHost: "volumio.local",
          showArtistBio: true
        }
      }
      

      One dev note for the curious: current Volumio runs a socket.io 2.x server, so socket.io-client is pinned to exactly 2.4.0 — 2.5.0 and the 4.x line won’t connect. That one cost a moment to figure out. 🙂

      GitHub (MIT): https://github.com/rkorell/MMM-NowPlayingOnVolumio

      Feedback, issues and PRs are very welcome — especially from fellow Volumionists.

      Happy mirroring!

      Warmest regards,
      Ralf

      (module is included in 3rd-party-module-list)

      posted in Entertainment
      R
      rkorell
    • RE: MMM-Bring v2 — a maintained, zero-dependency fork with app-identical category sorting

      Dear @S374n ,
      I assume that your question is targeting YOUR config-file with your mail-address/password.

      In this case: I’m pretty sure that this is absolutely NO risk - because your config file config.js is 100% local to you.

      There are tons of modules “in the wild” which are using those informations.

      The only risk I can see is: You are asking somewhere in this forum for help and paste parts of your config.js in this posting without blanking your own, sensitive information…

      HTH & Warm regards,
      I’m happy, that you like my refresh.

      Ralf

      posted in Showcase
      R
      rkorell
    • RE: MMM-Bring v2 — a maintained, zero-dependency fork with app-identical category sorting

      Dear Kristjan, @KristjanESPERANTO ,
      Thanks for this hint!
      Wasn’t aware that forks obviously need this.
      For sure enabled right now for all of my module forks.

      Warm regards,
      Ralf

      posted in Showcase
      R
      rkorell
    • RE: Family Command Center – Pi 5 Touch Mirror with 19 Pages, AI Comics & Presence Control

      Dear @soldatino,
      very (!) impressive!
      Not really MY usecase because of my explicite approach to use my mirror as a viewing port but really nice.

      To my big surprise I found your fifth screen with Bring! integration and was therefore inspired to try this again (longer time ago for some strange reasons the module didn’t work on my installation and i stopped trials around that, assuming that +six years old code doesn’t work at all).

      With your awesome setup I gave it a second try - and it worked.
      But: It throws severe security issues and in addition it doesn’t work exactly as desired (by me).

      That’s the reason why I forked & refactured the original module.
      You can check the whole story behind my approach in this post - if you like.

      I would like to say “thanks” to you for this “kick” and inspiration.

      Warm regards,
      Ralf

      posted in Show your Mirror
      R
      rkorell
    • MMM-Bring v2 — a maintained, zero-dependency fork with app-identical category sorting

      Hi everyone,

      I’ve tried a longer time ago without success - recently I gave it a second try and surprisingly it’s “working” right now: David Werth’s MMM-Bring.
      It is a lovely little module and I want to be clear up front that all the original credit goes to him. The trouble is that it has not seen any maintenance in roughly six years (the original dates back to 2019), and my recent npm install started throwing security warnings at me.
      Rather than let it bit-rot, I reworked it fairly thoroughly and published the result as a fork: https://github.com/rkorell/MMM-Bring.

      I thought it might be useful to others here, so here is what changed and, more importantly, why.

      1. The original has been unmaintained for ~6 years

      The original module goes back to 2019 and has effectively been dormant since. That is not a criticism — it simply did its job and life moved on. But six years is a long time in Node land: it was written against an older dependency and rendering style, and nobody was around to react when its dependencies started aging out. If you install it today on a current MagicMirror / Node setup, you feel that age immediately (see the next point). My goal with the fork was not to reinvent it, but to bring it back to a state where it installs cleanly, runs on current Node, and can be maintained going forward.

      2. The npm security issues — now zero runtime dependencies

      This is what actually pushed me to act. Installing the original pulls in axios ^0.21.2 (released back in 2021) and data-store. On that axios line, npm audit reports two high-severity advisories — credential leakage across an HTTP-to-HTTPS redirect, and a prototype-pollution issue — plus a transitive follow-redirects advisory. For a module that authenticates with your Bring! account, shipping a known-vulnerable HTTP client is not great.

      Instead of merely bumping versions, I removed both dependencies entirely. The fork now has zero runtime dependencies. All HTTP goes through Node’s built-in fetch (Node 18+), and the auth-token cache is a tiny fs-based JSON file that replaces data-store. The upshot: npm audit is clean, there is nothing to compile, and there is no npm install step at all anymore — you just clone it. Fewer moving parts, no native build, and nothing that can rot silently in the background.

      3. The headline feature: app-identical category sorting

      This is the part I am most happy with. The original shows the list in whatever raw order the API returns. The Bring! app, however, groups items into categories (Fruits & Vegetables, Milk & Cheese, Meat & Fish, …) and sorts those categories in an order you can customise per list. I worked out how the app reconstructs that and reproduced it faithfully.

      There is a new option, useSections, with three modes:

      • "off" — the classic flat list in raw API order (the old behaviour).
      • "on" (the default) — items sorted into your list’s category order as one continuous list, without visible headers. Same layout footprint as before, just in the right order.
      • "show" — the same sorting, plus a text header per category, exactly like the app.

      The grouping is genuinely app-identical rather than a guess: it follows your list’s own saved section order (listSectionOrder), honours the sections you have hidden, and shows the localized category names and item names for your list’s language. Items you typed that are not in Bring!'s catalog land in an “own items” section — and even that fallback label is localized (13 language files covering all 20 Bring! locales). Under the hood the canonical item id is kept separate from the translated display name, so marking things bought and adding items keeps working regardless of language. There are screenshots of all three modes in the README if you want to see the difference.

      Other improvements worth mentioning

      • Backend-driven polling with a cached last-good state. The node helper owns the refresh cycle, so a browser reload shows data instantly and a transient network blip never blanks the list.
      • Modern auth. The access token is refreshed via its refresh token, with a full password re-login only as a fallback.
      • showCount. An optional count in the title line when the list is longer than maxItems, so you can see there is more than what is shown.
      • Font licensing tidied up. The bundled paid “Museo Sans 300” weight was removed; the free 500 weight stays with proper exljbris attribution, and the spec label falls back to the MagicMirror default font.
      • Touch support retained. You can still mark items bought and add items via MMM-Keyboard.

      Install

      cd ~/MagicMirror/modules
      git clone https://github.com/rkorell/MMM-Bring.git
      

      That is it — no npm install. Then add the module block to your config.js (there is a full options table in the README). If you already run the original module, you can simply replace the folder; your config.js entry stays the same. Step-by-step migration notes are in the README.

      Credits and the usual caveat

      All credit for the original module goes to David Werth (https://github.com/werthdavid/MMM-Bring). The API-interaction design was inspired by miaucl/bring-api (https://github.com/miaucl/bring-api), the well-maintained Python client, as a reference for a current, state-of-the-art Bring! implementation.

      Standard caveat: Bring! offers no official public API, so this — like every Bring! integration — talks to the same private endpoints the app uses. They could change at any time. It has been stable for years, but be aware of that.

      Repo, README and changelog: https://github.com/rkorell/MMM-Bring. Feedback, issues and pull requests are very welcome.

      Hope you will find it useful.
      Warmest regards,
      Ralf

      posted in Showcase
      R
      rkorell
    • RE: NewsFeed - how to adjust the description text size?

      @thartley cool.
      Happy that it works.
      Have fun!
      Warm regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: NewsFeed - how to adjust the description text size?

      @thartley
      The text size of the newsfeed description is controlled via the global CSS class .small which the template assigns to the element.
      Defined in ~/MagicMirror/css/main.css:

      .small { font-size: var(--font-size-small); }
      

      If I see it right::

      • default/newsfeed/newsfeed.css does not contain a font-size for the description — only list and layout rules.
      • The description-specific class .newsfeed-desc does exist, but it does not set a font size.

      If you want to change the description size independently of other .small elements , the cleanest approach would be an override in css/custom.css:

      .newsfeed  .newsfeed-desc { font-size: your_desired_font_size_as_number)
      

      (do not alter the global .small).

      HTH.
      Warm regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: MMM-NowPlayingOnSpotify: surviving Spotify's 6-month refresh-token expiry (a maintained fork)

      Dear @KristjanESPERANTO ,
      thanks :-)
      Good idea - I’ve added a screenshot right now.
      (closed a documentation error regarding first / re-authorization in parallel).

      Warm regards,
      Ralf

      posted in Showcase
      R
      rkorell
    • MMM-NowPlayingOnSpotify: surviving Spotify's 6-month refresh-token expiry (a maintained fork)

      Hi all,

      if you use MMM-NowPlayingOnSpotify (raywo’s lovely “now playing” module), there’s a
      change coming from Spotify that will quietly break it — and I wanted to share both the
      problem and a fix.

      The problem

      Spotify announced that, starting 20 July 2026, user refresh tokens will expire after 6
      months (blog (https://developer.spotify.com/blog/2026-06-18-refresh-token-expiration)).
      Until now those tokens were effectively permanent, so the module just stored one and
      kept minting access tokens forever. Once a refresh token expires, Spotify returns an
      invalid_grant error, and the app is expected to discard it and send the user through
      the sign-in flow again.

      The original module doesn’t handle that case: it logs the error and silently falls back
      to the “nothing is playing” logo. So one day your mirror would just… stop showing
      songs, with no hint why — while hammering the API once per second with a dead token.

      First attempt: the polite way

      I opened an issue on the original repo to flag it. Unfortunately the project has been
      unmaintained for ~6 years, and there was no response. So rather than let everyone’s
      module quietly die this summer, I forked it and did the work.

      The fix: a fork with proper token handling

      👉 https://github.com/rkorell/MMM-NowPlayingOnSpotify (v2.0.0)

      What it does now:

      • Detects invalid_grant, stops retrying, and shows a clear red re-authorization banner
        on the mirror instead of pretending nothing’s playing.
      • Proactive warning ~2 weeks before the hard expiry (a smaller banner above the cover
        art) — the music keeps playing, so it’s never a surprise outage.
      • Self-managed token store (tokens.json, git-ignored) instead of tokens in config.js,
        so rotated/renewed tokens are actually persisted. You only keep clientID, clientSecret
        and redirectURI in your config now.
      • Integrated re-authorization: the module runs a tiny local auth server; you
        re-authorize from a browser and it recovers in-process, no restart.
      • Under the hood: a full refactor to native fetch/http — the deprecated request/express
        dependencies are gone, so it’s now zero runtime dependencies — plus a proper backend
        poll loop and English/German translations.

      One wrinkle worth knowing (loopback + SSH tunnel)

      Spotify only accepts http redirect URIs for loopback addresses now — a LAN IP or
      hostname over http is rejected at runtime as insecure, and localhost isn’t allowed
      either. So the redirect URI is http://127.0.0.1:8888/callback. Since a mirror is
      headless, the easiest way to re-authorize from your laptop is a one-line SSH tunnel:

      ssh -L 8888:127.0.0.1:8888 pi@<mirror-ip>
      

      …then open http://127.0.0.1:8888 in your laptop’s browser. Full details are in the
      README.

      Happy to help anyone getting it running, and a big thank-you to raywo for the original
      module that many of us have enjoyed for years.

      posted in Showcase
      R
      rkorell
    • RE: electronSwitches in config.js — am I reading the code wrong, or does it not actually work?

      @sdetweil , @kristjanesperanto ,
      I’ve decided to resolve it by myself - with Sam’s hint/advice/helper-file.
      It seems to work - will double check my cache size in a few days.

      Thanks again for your great support.
      Migration is a bigger task and wihout any need currently too much - even cache-growth wouldn’t change this.

      • never touch a running system :-)

      Warm regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: electronSwitches in config.js — am I reading the code wrong, or does it not actually work?

      @sdetweil OK, thanks!
      Still doesn’t sound THAT safe …

      regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: electronSwitches in config.js — am I reading the code wrong, or does it not actually work?

      @sdetweil , yes.
      I’ve really thought about this.

      How do you see the update?
      I’m currently on 2.34.
      Switch to 2.35 is SUBSTANCIAL !

      • changes of standard-module location, changes of location for custom.css, electron new …

      Will this break my system?
      Or am I fine with just using your great update-script?
      Thanks for any advice (I KNOW that you cannot provide any guarantee. I’m just interested in gut-feeling…)

      (and: if it brake: is there a way back??? )

      Warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: electronSwitches in config.js — am I reading the code wrong, or does it not actually work?

      Dear Sam, @sdetweil,
      thanks to you as well!

      As mentioned above: A little bit shy …

      Warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • 1 / 1