MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Mycommute is not working for me



  • I got the API from Google. Tested with google link below and was able to see the results in json format.
    (https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood&key=enter_my_api_key)

    When I tried running in MM, I get “Must use an API key to authenticate each request”. Any pointers?

    My config is as follow

        module: "MMM-MyCommute",
        position: "top_center",
        header: "Traffic",
        config: {
           apikey:  [my api key],
           origin: "Disneyland",
           destinations: [
                { destination: "Universal+Studios+Hollywood",
                  label: "Fun",
                  mode: "driving" }
                ]
        }


  • Hi @matelot20,

    I know that MMM-MyCommute was having some issues on my mirror yesterday as well, but fixed itself later in the day without me having to do anything (still not sure why exactly that was happening, but it’s better now). I know that for it to recognize your destinations you have to have the address as it shows in Google Maps, for example: Disneyland Anaheim would be “1313 Disneyland Dr, Anaheim, CA 92802” instead of “Disneyland” as you have it in your config. As for the API message, it could be something different.

    Please let me know if that helps!

    Edit - I just realized that if you are running the latest update of MMM-MyCommute, there was an update that changed the config text “apikey” to “apiKey”, so

    apikey:  [my api key],
    

    would now be

    apiKey:  [my api key],
    

    That could be where your API issue stems from



  • @gwiz you are right on. It was the apiKey that causes the problem. Thanks so much for pointing it out. Would have never guessed it. Have a good day.



  • @matelot20 Awesome, glad I could help!


Log in to reply