Using Rainmeter to show travel times via Google Maps DistanceMatrix API
I’m going to eventually make a ‘smart mirror’, but in the mean time have been thinking of useful information I could display on it. I was trying to figure out how to have it display transit times to both my work and my wife’s work via Google Maps API, and figure traffic into the calculations. I wanted to use RainMeter to show this data, as it’s better looking than some RPi solutions that others have come up with.
Using the default illustro skin, I added a folder called “GoogleMaps-Work1” and “GoogleMaps-Work2”. One would be for my work, and the other for my wife’s. I’ll focus on just doing one, and you can just edit the other one for whatever address you want. In this example, I’ve made directions from the John Hancock center to the Sears Tower in Chicago.
Download ZIP file containing source: https://dl.dropboxusercontent.com/u/119117/GoogleMatrixDistance.zip
Pastebin Configuration Code: http://pastebin.com/pR1wQekF
- Start= Address of where you want to it to ‘start’ the directions at.
- Finish= Address of destination.
- DownloadFile=json.txt This is where Google Maps API updates the information that Rainmeter reads.
- Text= This is the information that displays (20 Minutes to work). The “%2” variable reads the time in numbers.
- Url= This is where you insert your Google Maps Distance Matrix API key at the end (after &key=)
Below is what it should look like, as well as another design I made that I will probably use for my first smart mirror layout. It will show other information, and I wanted the travel times to blend in with the other data.