MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.

    weather module just shows loading?

    Troubleshooting
    3
    7
    249
    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.
    • F
      fribse last edited by fribse

      I just noticed that the ‘currentweather’ module I’ve set up a long time ago, is now deprecated, and I should use weather instead.
      So I tried setting it up, but it just shows ‘loading’.
      The config I’ve built looks like this:

      {
        module: 'weather',
        position: 'top_right',
        classes: 'day_schedule',
        config: {
          weatherProvider: 'openweathermap',
          type: "current",
          units: 'metric',
          timeFormat: '24',
          decimalSymbol: ',',
          initialLoadDelay: '0',
          onlyTemp: 'true',
          location: 'Greve',
          locationID: '2621215',
          appid: 'xxx'
        }
      },
      

      I then tried stripping it to the example:

      {
        module: "weather",
        position: "top_right",
        config: {
          // See 'Configuration options' for more information.
          type: 'current'
        }
      },
      

      Still just shows loading…

      S 1 Reply Last reply Reply Quote 0
      • S
        scumbelly @fribse last edited by sdetweil

        @fribse

        Are your single quotes ’ just an accident in your examples?

        {
        			module: "currentweather",
        			position: "top_right",
        			header: "my header",
        			config: {
        				location: "my village",
        //				locationID: "numbers",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
        				appid: "wholelottanumbers",
        				appendLocationNameToHeader: false,
        				degreeLabel: true,
        				useBeaufort: false,
        				useKMPHwind: true,
        				showHumidity: true
        			}
        		},
        

        Hope this helps.

        S F 2 Replies Last reply Reply Quote 0
        • S
          sdetweil @scumbelly last edited by sdetweil

          @scumbelly single or double doesn’t matter as long as they are the same

          please use code markers around config info.
          there is a third kinds of quote mark used by the forum without code blocks. they are word processing type, they are curved, both single and double. they are bad.

          " and ’
          notice the difference

          " and '
          

          Sam

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • S
            scumbelly last edited by

            O.K.

            and… onlyTemp: ‘true’, would not have any quotes.

            S 1 Reply Last reply Reply Quote 1
            • S
              sdetweil @scumbelly last edited by sdetweil

              @scumbelly right…

              general config.js rules

              thing to the left of colon (:) does not need quotes

              if the thing to the right of colon is a number or true/false,
              should NOT have quotes,
              otherwise the thing to the right needs quotes.
              single or double doesn’t matter, as long as both ends are the same

              Sam

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 2
              • S
                scumbelly last edited by

                @sdetweil

                Thanks, I always thought I needed double quotes.

                1 Reply Last reply Reply Quote 0
                • F
                  fribse @scumbelly last edited by

                  Ok, I found out what was wrong, despite the confusion with the ’ or " use.
                  It’s the appid, it’s called apiKey in the weather module.
                  So after changing that (and also changing all ’ to " in the config), removing quotes around numbers, only have the locationID instead of both location and locationID and other cleanup stuff, it is shows properly 🙂

                  So I replaced both my currentweather and YrThen modules with two weather modules:

                  {
                        module: "weather",
                        position: "top_right",
                        classes: "day_schedule",
                        config: {
                          weatherProvider: "openweathermap",
                          type: "current",
                          units: "metric",
                          timeFormat: 24,
                          decimalSymbol: ",",
                          initialLoadDelay: 0,
                          onlyTemp: false,
                          locationID: 2621215,
                          apiKey: "xxx"
                        }
                      },
                      {
                        module: "weather",
                        position: "top_right",
                        classes: "day_schedule",
                        config: {
                          weatherProvider: "openweathermap",
                          type: "forecast",
                          units: "metric",
                          timeFormat: 24,
                          decimalSymbol: ",",
                          initialLoadDelay: 0,
                          onlyTemp: true,
                  		maxNumberOfDays: 7,
                  		colored: true,
                  		appendLocationNameToHeader: false,
                          locationID: 2621215,
                          apiKey: "xxx"
                        }
                      },
                  

                  Looks very nice indeed
                  72f6ceb8-742c-4a07-8b3f-61bb47375ee4-image.png

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy