Module Developers

Private

You have developed a module for the MagicMirror? Join the group and get a “Module Developer” badge!

Posts

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

    Dear @raazalghul ,

    first of all: sorry for the delay - I’m pretty busy these times.
    As you can see above I’ve stopped to use ths module but
    your detailed report made it easy to spot.

    The culprit is the placement of updatesEvery in your config. It sits outside the config: {} block
    (next to module, position, classes), so MagicMirror never passes it to the module. The value is
    silently ignored and the module falls back to its default of 1 second — so despite updatesEvery: 5
    it’s actually polling the Spotify API once per second (~3,600 calls/hour), which is what
    eventually trips Spotify’s rate limit.

    Move the line one level down, into config:

    {
        module: "MMM-NowPlayingOnSpotify",
        position: "top_right",
        classes: "page1",
        config: {
            updatesEvery: 5,
            showCoverArt: true,
            clientID: "...",
            clientSecret: "...",
            redirectURI: "http://127.0.0.1:8888/callback"
        }
    },
    

    At 5 s that’s ~720 calls/hour, well within limits. Each poll cycle makes exactly one API request,
    so the interval maps directly to your API rate. No update or code change needed.

    This should resolve your problem.
    Have fun!

    Warm regards,
    Ralf

  • RE: MMM-PublicTransportHafas

    I work in IT, but programming is mainly a hobby - I rarely code at work. I enjoy contributing to open-source projects and figuring out code-related issues. I actually got active here through MMM-PublicTransportHafas; the module had stopped working, and the original developer was no longer responding, so I forked it and implemented a fix. That’s what sent me down the rabbit hole :)

    Your STM32 project sounds interesting, but I’m not really on good terms with C++. So, I can’t really help you with that - sorry.

  • RE: MMM-PublicTransportHafas

    @Mati_93 Nice that you solved the umlaut problem out! I just made a bigger change for the query part (in MMM-PublicTransportHub). So I recommend to update the module and test node --run query :) Feedback would be nice.

  • RE: MMM-WorldClockMap – world clocks with a day/night map

    @bwente Looks nice! Don’t forget to add it to the module list: https://github.com/MagicMirrorOrg/MagicMirror/wiki/3rd-party-modules :)

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

    @eddiebrok OK, seen that you’ve edited your posting and empasizes the “free brat generator”.
    Overseen this but this is far away from my use case :-)

    Warm regards,
    Ralf

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

    @eddiebrok Yes, you’re absolutely right.
    That’s the reason why I’ve used a module like that from the beginning of my implementation.
    As stated above my use case at home is mainly a Volumio instance and for whatever reason this collides with Spotify’s “ideas” of Digital Rights Management.
    So I switched to Tidal (which is supported by Volumio in another path)

    This results in another way gathering information on “what is played currently” and for now I’m even able to display some artist background information (which currently IS implemented) and (currently only on Volumio’s screen) - lyrics and additional cover-views.

    Warm regards,
    Ralf

  • RE: MMM-PublicTransportHafas

    There, HAFAS displayed important delays for each departure.

    The module supports this, but Transitous apparently does not receive real-time data for your station. The open-source community is doing impressive work trying to collect real-time data wherever possible, but this is unfortunately difficult in some regions.

    HAFAS interfaces were never really intended for the kind of free use we make of them, and access is becoming more and more restricted. You could contact your local transport association and ask why they do not provide real-time data through an open API, preferably GTFS-RT. This would allow projects like Transitous, and therefore MMM-PublicTransportHub, to use it.

    The train and clock icons in the timetable looked very nice.

    That was already on my to-do list. I have now added a similar header to MMM-PublicTransportHub, so you only need to update the module.

    Station IDs were easier to find with the HAFAS module.

    Those IDs come from the provider, so there is not much I can change about their format. I actually prefer the Transitous IDs because they are real DHIDs and work globally.

    The display problem with umlauts is still a bit mysterious. The query scripts of both modules are not fundamentally very different, so I currently do not have a reliable explanation for why it only happens on your machine with the new query tool.

  • RE: MMM-PublicTransportHafas

    @Mati_93 Great, I’m glad you got the carousel setup working!

    I don’t have a hot tip for the umlaut problem at the moment since I can’t reproduce it on my system.

    You mentioned that you liked the design of the old HAFAS module more. What exactly do you prefer about it, and what is missing or different for you in MMM-PublicTransportHub? Maybe we can improve that :)

  • RE: MMM-PublicTransportHafas

    @Mati_93 Wow, that a bunch of separate issues. These three minimal configurations work for me with the Gotha stop. Please test them one at a time first. I had to play with timeInFutureMinutes a bit to get departures.

    MMM-PublicTransportHub with HAFAS

    {
      module: "MMM-PublicTransportHub",
      position: "top_left",
      header: "Gotha, 18.-März-Straße",
      config: {
        provider: "hafas",
        hafasProfile: "vmt",
        stationId: "167050",
        timeInFutureMinutes: 720
      }
    },
    

    Older MMM-PublicTransportHafas

    {
      module: "MMM-PublicTransportHafas",
      position: "top_right",
      header: "Gotha, 18.-März-Straße",
      config: {
        hafasProfile: "vmt",
        stationID: "167050",
        timeInFuture: 720
      }
    },
    

    MMM-PublicTransportHub with Transitous

    {
      module: "MMM-PublicTransportHub",
      position: "top_center",
      header: "Gotha, 18.-März-Straße",
      config: {
        provider: "transitous",
        stationId: "de-DELFI_de:16067:167050::16705000",
        contact: "@Mati_93",
        timeInFutureMinutes: 720
      }
    },
    

    Please note that vmt is a HAFAS profile, not a provider. Therefore the Hub needs provider: "hafas" together with hafasProfile: "vmt".

    The garbled German characters look like a UTF-8/locale problem on Raspberry Pi OS. Please check:

    locale
    locale charmap
    

    The result should contain UTF-8. You can configure this with:

    sudo raspi-config
    

    I think you have to select Localization Options → Locale and enable de_DE.UTF-8 UTF-8. Log in again or reboot afterwards.

    As a quick test, you can search without special characters:

    18 Maerz Strasse Gotha
    

    OPS_BLOCKED usually comes from a blocked DB endpoint. For Gotha, please use the regional vmt profile instead of a DB profile.

  • RE: MMM-PublicTransportHafas

    @Mati_93 Have you managed to figure it out yet? :) If not, please describe again what you’re trying to do and what’s not working. And most importantly, which module you’re using.

Member List

P paviro Group Owner
402 Posts 152 Reputation
MichMichM MichMich Group Owner
614 Posts 419 Reputation
Y yawns Group Owner
1,004 Posts 455 Reputation
morozgrafixM morozgrafix Group Owner
144 Posts 85 Reputation
J Jopyth Group Owner
305 Posts 170 Reputation
KristjanESPERANTOK KristjanESPERANTO Group Owner
457 Posts 132 Reputation
Dentrass 0D Dentrass 0 Group Owner
19 Posts 8 Reputation
TAGinsideT TAGinside Group Owner
13 Posts 7 Reputation
R rkorell Group Owner
450 Posts 99 Reputation
J Jacopo1891 Group Owner
0 Posts 0 Reputation
F FrostByte Group Owner
9 Posts 3 Reputation
K kcs897 Group Owner
0 Posts 0 Reputation
B Bocah4d Group Owner
0 Posts 0 Reputation
I idproslotpay4d Group Owner
0 Posts 0 Reputation
L liquortheka Group Owner
0 Posts 0 Reputation
S staceyhughes271 Group Owner
0 Posts 0 Reputation
P preeti25 Group Owner
0 Posts 0 Reputation
A alexmann Group Owner
10 Posts 1 Reputation
A abigailuna Group Owner
0 Posts 0 Reputation
2 2hdlockness Group Owner
12 Posts 2 Reputation