@joeytuck
Okey first of, when in your terminal typ cd MagicMirror/modules/
this will get you directly to your modules folder.
after that you should type git clone https://github.com/SamLewis0602/MMM-Traffic.git
This command will create a new folder called MMM-Traffic
and copy all files for the module.
When that is done you typ
cd MMM-Traffic
to enter the MMM-Traffic folder.
When you have done that and are in the folder you type npm install
, this will install all dependencies, i e stuff that is needed for the traffic module to work.
Then open your config.js file and find the last ]
Before that ]
you add
{
module: 'MMM-Traffic',
position: 'top_left',
classes: 'dimmed medium', //optional, default is 'bright medium', only applies to commute info not route_name
config: {
api_key: 'your_apikey_here',
mode: 'driving',
origin: '4 Pennsylvania Plaza, New York, NY 10001',
destination: '1 MetLife Stadium Dr, East Rutherford, NJ 07073',
arrival_time: '0800', //optional, but needs to be in 24 hour time if used.
route_name: 'Home to Work',
changeColor: true,
showGreen: false,
limitYellow: 5, //Greater than 5% of journey time due to traffic
limitRed: 20, //Greater than 20% of journey time due to traffic
traffic_model: 'pessimistic',
interval: 120000, //2 minutes
showWeekend: false,
allTime: false
}
},
Now you need to change the api key above where it says api_key: 'your_apikey_here',
replace your_apikey_here
with the needed api key and make sure not to remove the '
around the api key.