jclarke0000/MMM-MyCommute

Error for travel time

ryelou opened this issue · 1 comments

I've reviewed all of the previous entries for this issue, or anything close to it and still can't figure it out. I've removed and reinstall the module and reran npm install. My code appears to be correct, and I've verified my Google API works by plugging it into this URL per their developers page: https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood&key={API KEY HERE}

Edit: I should also note, last night when I was trying this it showed 100% error rate from the Google Cloud Console. Today it looks like they're successful (my error rate is down to 82%!) but I'm still getting the error message.

Below is my code, if anyone has any suggestions:

{
module: "MMM-MyCommute",
position: "bottom",
config: {
apikey: "MY API KEY",
origin: "HOME ADDRESS",
travelTimeFormat: "h[h] m[m]",
pollFrequency: "6000000",
startTime: "00:00",
endTime: "23:59",
destinations: [
{
destination: "WORK ADDRESS",
label: "Work Test",
color: "#614bb9"
}
]
}
},

I created a new Google API key and it's working now. My best guess is I did things out of sequence as far as Google is concerned. It wasn't too clear, but once you create an account (NOT A KEY, JUST THE ACCOUNT) you have to set up a billing account. Even if you don't plan on using the API frequently enough to have to pay, Google still requires it. The first time through I created my account, created a key and then went back and created the billing account while troubleshooting. With everything else working fine, I went back and deleted the old API key, created a new project and a new key and it's working fine now.