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

MMM-Ratp



  • Hello,
    I’ve search on this forum but couldnt find anyone with the issue i’m facing.
    With MMM-Ratp module for French Public Transport:
    I’m using this code to make it work:

    {
    module: ‘MMM-Ratp’,
    position: ‘bottom_left’,
    header: ‘’, // the title that will be displayed on top on the widget
    config:{
    debugging:true,
    apiURL:‘https://api-ratp.pierre-grimaud.fr/v4/schedules/buses/178/Chanzy/A’, // more info about API documentation : https://github.com/pgrimaud/horaires-ratp-api

    }

    },

    I can get the data but doesnt display anything else
    so it look like this

    5 min
    12 min

    Thx a lot



  • @Stef81 doc says you need to specify the header yourself



  • Yeah Sorry for this I messup with my copy / Paste Source

    Even with Header set to XXXX
    XXX doesnt appears on the Magic Mirror…

    DOC says something confusing at the end:

    Troubleshooting
    The first thing to do in to set a debbuging setting in the config file because it will enable more verbose trace. Ensure that any setting is followed by a comma (that’s the common mistake with Magic Mirror²)

    {
    module: ‘MMM-Ratp’,
    position: ‘top_right’,
    header: ‘RATP’ // please leave this value, it will be replaced anyway,
    config:{
    debugging:true,
    apiURL:'https://api-ratp.pierre-grimaud.fr/v3/schedules/bus/163/dumont+d’urville+++belgique/A’,
    }
    }

    Doc says also this:

    Configuration
    To get bus timetable, you’ll need to specify the transport line, the station and the destination. These information will have to be specified in the configuration (https://github.com/lgmorand/MMM-Ratp/blob/master/MMM-Ratp.js#L14-L23)

    I dont understand If I have to setup something in the configuration file of MMM-RATP ? ??



  • Hello

    J’ai semble-t-il le meme soucis … j’ai ajouté 3 fois le module MMM-Ratp pour avoir les infos sur le une ligne de bus, ensuite pour un rer et enfin le metro… Ceci donne :

    {
    		module: 'MMM-Ratp',
    		position: 'top_right',
    		header: 'Bus 113 (vers la gare)', // the title that will be displayed on top on the widget
         		config:{
    		        apiURL:'https://api-ratp.pierre-grimaud.fr/v4/schedules/buses/113/place%2Bde%2Bla%2Bresistance/R',
    	        }
    		},
    		{
    			 module: 'MMM-Ratp',
    			 position: 'top_right',
    			 header: 'RER A (vers Nation)', // the title that will be displayed on top on the widget
    			 config:{
    				 apiURL:'https://api-ratp.pierre-grimaud.fr/v4/schedules/rers/A/neuilly%2Bplaisance/A',
    				}
    		},
    		{
    			 module: 'MMM-Ratp',
    			 position: 'top_right',
    			 header: 'Metro 9 (vers Grands Boulevards)', // the title that will be displayed on top on the widget
    			 config:{
    				 apiURL:'https://api-ratp.pierre-grimaud.fr/v4/schedules/metros/9/nation/R',
    				}
    		},
    

    Tout fonctionne nicke mais les headers ne s’affichent pas … QUand je regarde le code html, je vois undefined en lieu et place de la valeur (avec en plus style=“display:none” … )

    Bref Si qq’un peut m’aider 😉

    Merci :p


Log in to reply