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.

    Weather not working

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    26 Posts 2 Posters 5.4k Views 2 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.
    • K Offline
      KI6UVE
      last edited by

      I’ve got a fresh install of MM, but cannot get my weather working. There seems to be some places that reference the weather modules with different name, i.e. just “weather” and other places name it “currentweather” and “weatherforecast”. Also, some places use the term “apiKey” and others use the term “appid”. What is the best practice? Here is my config file:

      modules: [
        {
      	module: "alert",
        },
        {
      	module: "updatenotification",
      	position: "top_bar"
        },
        {
      	module: "clock",
      	position: "top_left"
        },
        {
      	module: "calendar",
      	header: "US Holidays",
      	position: "top_left",
      	config: {
      	  calendars: [
      		{
      		  symbol: "calendar-check",
      		  url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
      		}
      	  ]
      	}
        },
        {
      	module: "compliments",
      	position: "lower_third"
        },
        {
      	module: "currentweather",
      	position: "top_right",
      	config: {
      	  weatherProvider: "openweathermap",
      	  type: "current",
      	  location: "Poway",
      	  locationID: "5384690", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      	  appid: "c969043fff6dd1f7ef7bfa632f125d5c"
        }
      },
      {
      	module: "weatherforecast",
      	position: "top_right",
      	header: "Weather Forecast",
      	config: {
      	  weatherProvider: "openweathermap",
      	  type: "forecast",
      	  location: "Poway",
      	  locationID: "5384690", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      	  appid: "c969043fff6dd1f7ef7bfa632f125d5c"
      	}
        },
        {
      	module: "newsfeed",
      	position: "bottom_bar",
      	config: {
      	  feeds: [
      		{
      		  title: "New York Times",
      		  url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      		}
      	  ],
      	  showSourceTitle: true,
      	  showPublishDate: true,
      	  broadcastNewsFeeds: true,
      	  broadcastNewsUpdates: true
      	}
        },
      ]
      

      };

      S 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @KI6UVE
        last edited by

        @KI6UVE the doc for openweathermap provider uses a different term for the key

        Screenshot 2022-11-27 8.08.22 PM.png

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @KI6UVE
          last edited by

          @KI6UVE currentweather and weatherforecast have been replaced by weather, with type:‘current’ or type:‘forecast’

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            KI6UVE @sdetweil
            last edited by

            @sdetweil

            I changed it from appid to apiKey and the other module names to just “weather”, but still just black space where it should be in MM. Did I miss anything else?

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @KI6UVE
              last edited by sdetweil

              @KI6UVE looks like weather via openweathermap takes lat/lon, not location

              i recommend reading the doc, linked to from the MM github page

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                KI6UVE @sdetweil
                last edited by KI6UVE

                @sdetweil
                I read that doc and I changed weatherEndpoint to “/onecall” and put in the lat and lon variables, but now I get a parsing error: unexpected token “lat”

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @KI6UVE
                  last edited by

                  @KI6UVE don’t change the endpoint, missing a comma on the line before?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    KI6UVE @sdetweil
                    last edited by

                    @sdetweil
                    I took out the endpoint line and that fixed the parsing error, but still no weather. I rechecked my api key and it is correct. Any other ideas? Thanks!!

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @KI6UVE
                      last edited by sdetweil

                      @KI6UVE open the developers window, ctrl-shift-i, then select the console tab and put weath in the filter field

                      is this an openweather v 3 apikey, that u had to provide a credit card to get?

                      if so, add

                      apiVersion:'3.0',
                      

                      to the weather config section

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      K 1 Reply Last reply Reply Quote 0
                      • K Offline
                        KI6UVE @sdetweil
                        last edited by

                        @sdetweil
                        No luck. I noticed you used ‘ ‘ instead of “ “ for the ‘3.0’. I used “ “ for all my other variables, such as type: “forecast”. Is that correct?

                        The doc file doesn’t have any notation for how the lat/Lon is presented. Should that read…lat: ‘33.3025’ or nothing as it would imply in the doc file, I.e., lat: 33.3025

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 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