MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Help... I need help installing 3rd party modules to Magic Mirror 2

    Scheduled Pinned Locked Moved Troubleshooting
    26 Posts 4 Posters 17.9k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      Anhalter42
      last edited by

      I suspect the quotation marks not only to be in a different font but to be different signs. This is indeed an issue since javascript defines strings by double (") and single quotes (') only (for reference see: https://www.w3schools.com/jsref/jsref_obj_string.asp).

      So, just to be sure: After removing unnecessary properties you have a config.js that looks something like this minimal example

      var config = {
        port: 8080,
        [...]
        modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		[...]
      		{
      			module: 'MMM-Traffic',
      			position: 'top_left',
      			config: {
      				api_key: 'your_apikey_here',
      				origin: '4 Pennsylvania Plaza, New York, NY 10001',
      				destination: '1 MetLife Stadium Dr, East Rutherford, NJ 07073'
      			}
      		},
        ]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      with some content from the default config.js at the “[…]” places, your API-key instead of " ‘your_apikey_here’ " and possibly some lines commented out by prepending “//”, correct?

      The fact that the MM2 starts without error message about config.js indicates, that the issue is within the properties you set, i.e. the origin/destination or the API key.
      Some suggestions:

      1. Did you try to run it with default properties of the MMM-Traffic module (the ones I copied above)? Of course you have to input your own API key.
      2. Did you check whether your API key is valid?
        2.a Is your API key configured correctly? As far as I know you have to login into google account and there assign the key to a project and get the access restrictions right.
        2.b In case you didn’t copy the key: have you checked for typos?

      If you use default config.js parameters and example parameters from MMM-Traffic module it should run. From there, you can incrementally add your changes and figure out, which property leads to the issue.

      1 Reply Last reply Reply Quote 0
      • J Offline
        joeytuck
        last edited by

        	},
        

        {
        module: ‘MMM-Traffic’,
        position: ‘bottom_right’,
        classes: ‘bright small’,
        config: {
        api_key: ‘api key redacted’,
        mode: ‘driving’,
        origin: ‘origin redacted’,
        destination: ‘destination address redacted’,
        arrival_time: ‘’,
        route_name: ‘Home to Work’,
        changeColor: true,
        showGreen: false,
        limitYellow: 5,
        limitRed: 20,
        traffic_model: ‘pessimistic’,
        interval: 120000,
        showWeekend: true,
        allTime: false
        }
        },
        {
        module: “newsfeed”,
        position: “bottom_bar”,
        config: {
        feeds: [

        I copied my API key from Google directly but Iĺl register for another one and give that a shot.

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          joeytuck @joeytuck
          last edited by

          @joeytuck Tried a new API key and still no luck. Moved the module to a different portion of the config file just to see if there was somehow a limit on the amount of allowed modules that I haven’t been able to find. Still nothing.

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            joeytuck @joeytuck
            last edited by

            @joeytuck Okay, so I deleted the MMM-Traffic folder and files that I had and did a new git clone and npm install for a fresh start. It works!! I’m sure I’m at fault for doing something stupid within the MMM-Traffic config file like changing a comma or something. Really happy about this one and I am very thankful for everyones help! I’ve learned quite a bit more about this than I thought I would need to. Onto wunderground!

            1 Reply Last reply Reply Quote 1
            • J Offline
              joeytuck
              last edited by

              Has anyone run into the issue where you´ve installed MMM-WunderGround with your api key and pws and it just says
              ¨loading¨ on the magic mirror screen?

              Mykle1M 1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer @joeytuck
                last edited by

                @joeytuck

                That usually means one or more of the following:

                Your API key is entered incorrectly.
                Your API key is not valid.
                Your pws is entered incorrectly.
                Your pws is down. Choose another.

                I’ll test your pws on my machine if you tell me which one you are using.

                Create a working config
                How to add modules

                J 1 Reply Last reply Reply Quote 1
                • J Offline
                  joeytuck @Mykle1
                  last edited by

                  @Mykle1 This might sound really ignorant but do I actually need PWS equipment to run this module? Can I not just receive and not transmit? My PWS is KTNMADIS13

                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @joeytuck
                    last edited by Mykle1

                    @joeytuck said in Help... I need help installing 3rd party modules to Magic Mirror 2:

                    This might sound really ignorant but do I actually need PWS equipment to run this module? Can I not just receive and not transmit? My PWS is KTNMADIS13

                    No, you don’t need your own PWS equipment. I meant the pws that you chose from WeatherUnderground. It would be cool to have your own though.

                    The PWS that you gave me (KTNMADIS13) is either down, or not valid. I tested it and it does not work. As soon as I returned mine to my config, it fired right up.
                    You can try mine as a test. This is the whole line from the config:
                    pws: 'pws:KNYNEWYO103',
                    In any case, you’ll have to choose another pws from the WunderMap at WeatherUnderground because yours is not working. If you can’t manage that then I can get one for you and test it. I would need the name of your country, city, town, neighborhood if that is the case. Or the name of your nearest airport. They all have weather stations.

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 1
                    • J Offline
                      joeytuck
                      last edited by

                      I found a pws nearby and everything is working great now. Thanks for the help!!

                      Mykle1M 1 Reply Last reply Reply Quote 0
                      • Mykle1M Offline
                        Mykle1 Project Sponsor Module Developer @joeytuck
                        last edited by

                        @joeytuck said in Help... I need help installing 3rd party modules to Magic Mirror 2:

                        I found a pws nearby and everything is working great now. Thanks for the help!!

                        You’re welcome. :thumbsup:

                        Create a working config
                        How to add modules

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 3
                        • 3 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy