MMM-SNCF was developped from the MMM-Transilien module (https://github.com/lgmorand/MMM-Transilien)
A law was voted to force public companies to open some of their data to the public.
VERY IMPORTANT They sucks at SNCF and they force you to ask for a key to use the API. For that, you need to ask them a key by email (see link above), once you write a mail, you MAY receive a key after several days or weeks (because they really really suck...). It may change in the future but for now they clearly do that to prevent user to easily access to their API.
Clone the git in the /modules folder of Magic Mirror and run the "npm install" command which will installed the required node modules
1- You need to find your train station and find the UIC of the train station (not the uic7 column, the UIC). You can look here
2- Specify missing values in the configuration. You need the UIC of your train station and the UIC of the arrival station.
{
module: 'MMM-SNCF',
position: 'top_right',
header:'Lille-Flandres to Orchies',
config:{
departUIC:"stop_area:OCE:SA:87286005",
arriveeUIC:"stop_area:OCE:SA:87286583",
trainsdisplayed:'5',
language:"fr",
login:"", // You must add your API login and password
password:""
}
},
3- Don't forget to add login/password, which are the credentials to access the API. You can try them in your browser by trying to open the url https://api.sncf.com/v1
Please use the forum of magic mirror² https://forum.magicmirror.builders/