Skip to content

Latest commit

 

History

History
60 lines (49 loc) · 2.09 KB

README.md

File metadata and controls

60 lines (49 loc) · 2.09 KB

MMM-trafficmate

This is a traffic module for the MagicMirror. It is able to print estimated travel time in minutes from origin to destination.

Route duration

Used technolgies/tools

Installation

Clone this repository in your modules folder, and install dependencies:

cd ~/MagicMirror/modules # adapt directory if you are using a different one
git clone https://github.com/markfodor/MMM-trafficmate.git
cd MMM-trafficmate
npm install

Add the module to your config/config.js file.

{
    module: 'MMM-trafficmate',
    position: 'top_right',
    config: {
        apiKey: '<YOUR_API_KEY>',
        origin: '<ROUTE_ORIGIN>',
        destination: '<ROUTE_DESTINATION>'
    }
},

The apiKey, origin and destination fields are mandatory.

Optional config properties

Name Options Default value
defaultText - "Route duration: "
travleMode "DRIVING" / "WALKING" / "BICYCLING" / "TRANSIT" "DRIVING"

Running tests

Run the test npm script

npm test

Current Tests:

If it is possible it will also automatically fix some issues.

Contribution

If you have any suggest, please let me know by an issue.

License

The MIT License (MIT)