MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.


  • The ‘MMM-TPG’ is a module for users of the TPG (Transport publics de Genève) on Magic Mirror 2.
    It’s using data from (link to opendata section)

    Preview of MMM-TPG

  • I just got my token and tried out the module, unfortunately it does not return any data but does not crash the app either. There seems to be a dicrippency between the module config file as example and the app itself. does the module need to be referd as MMM-tpg or tpg. Trien both without success. I did have to remove the updateInterval and maxDepartures for the modules to be read.
    Any Ideas ?

  • Moderator

    It needs to be ‘MMM-tpg’

    Please post your config file for this, but replace your key with some rubbish 🙂

  • Thank you for coming back to me so quickly. Here is the config bit for MMM-tpg:
    I should mention that I tried most of the combinations possible with commas etc. I have lots of modules running, but as soon as I uncomment this one the screen loads but I have no module. A strange side-effect is that
    MMM-remote-control returns No Module loaded… module should be loaded before MMM-sonos-
    Hope this helps

    		module: 'MMM-tpg', 
    		position: 'top_right',
    		header: 'TPG - Cornavin',
    		config: {
    			params: {
    			stopCode: 'CVIN',  // Which stop would you like to have displayed?
    			key: 'xxxMyTokenxxx'  // Add your tpg opendata key

    Connecting socket for: MMM-horoscope
    Starting NodeHelper for MMM-horoscopemodule.

    MMM-tpg sould start here in the config.js file

    Connecting socket for: MMM-Sonos
    Sonos helper started …
    Connecting socket for: newsfeed
    Starting module: newsfeed
    Connecting socket for: MMM-Remote-Control
    Starting node helper for: MMM-Remote-Control

  • I should add that when I uncomment the module I get the following two lines on the console after the
    Launching application line.
    ERROR! Could not find main module js file.
    ERROR! Could not find main module js file.

  • Project Sponsor Module Developer

    @Maxzovirax Sounds like your module is not installed in ~/MagicMirror/modules/MMM-tpg. Did you probably installed it in ~/MagicMirror/modules/default/MMM-tpg?

  • @strawberry-3.141
    Funny you should be the one replying to me, I have the same issue (as for MMM-tpg) with MMM-soccer that I looked at for a friend, I see you are involved in that too, I was planning on looking into that after this one. …
    I will look at you suggestion this evening if possible. cheers

  • Hello again, just checked and the module is in the modules directory under MMM-tpg, so it is in the correct place…

  • Hello,

    How do you get your key & your stop code ? because i can’t find it on tpg website :

    any ideas ?