jclarke0000/MMM-MyCommute

"Error" showing for the time value

kleems07 opened this issue · 12 comments

Hi thanks much for the hard work on this, but I'm thoroughly stumped. After a few hours of slogging through I am now at a point where I get my header to show up, as well as the name of the name of the location but I'm getting "Error" showing up where the commuted time should be. My config file is shown below. Any thoughts? Thanks.

{
module: 'MMM-MyCommute',
header: "Work Commute",
position: 'top_left',
classes: 'default everyone',
config: {
api_key: 'myapikey',
origin: 'exampleaddress, Chicago, IL 60642',
startTime: '00:00',
endTime: '23:59',
hideDays: [0,6],
destinations: [
{
destination: 'exampleaddress, Rolling Meadows, IL 60008',
label: 'Work',
mode: 'driving',
color: '#82E5AA'
}
]
}

did you figure this out im having the same issue

We're using Google's free API
https://console.cloud.google.com/google/maps-apis/apis/directions-backend.googleapis.com/quotas
### Quota Name --------------------------->Limit
Requests per day----------------------->1
Requests per 100 seconds------------->5,000
Requests per 100 seconds per user--->Unlimited

!!pollFrequency in config!!

Or
NO api_key
Try apikey

Ok so get rid of the underscore ? I'm using Google's free api

now im just showing loading after changing to apikey

I'm also seeing the same thing. Using "apikey" in config. Any ideas?

After I spent some time debugging this issue for my friends MM I found out the issue is that you can only make a single request a day to the API. You can temporarily solve this by adding a billing account to your project in Google and if you’re new you’ll get $300 credit for a year. On top of that credit Google also doesn’t charge for the first $200 a month in API usage. That is 40,000 requests to the API each month.

However you need to be careful of usage because depending on how much it polls the API you can exceed this and be paying roughly $16-$24 a month.

I'm on the paid account and still see the issue 😭

https://maps.googleapis.com/maps/api/directions/json?origin={Where you live}&destination={Where you want to go}&key={Your API Key}&mode=driving&departure_time=now

Update the information in the {}'s with your info then plug that into a browser and see what the result is

I got a permission denied and it turns out I enabled the Distance Matrix API when it should have been the Directions API.

I'm now getting a permanent "Loading.." on the module now. I will review and raise a new issue if need as it's not related to this one.

thank you @c1arkbar for your help.

You might check out this forked version since this one seems to be abandoned
https://github.com/qistoph/MMM-MyCommute

is their a way around starting the free trial?