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.

    Default Weather Broke After Update

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 4 Posters 1.1k Views 4 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.
    • D Offline
      DarrenHill
      last edited by DarrenHill

      I’ve just updated from 2.28 to 2.30 using the script, and it looks to have broken the default weather module.
      I run it twice on my display, and one (top-left) is now giving “invalid date” for the date and NaN for the temperature.
      The other (top-right) is not showing up at all.

      This is the config snippet for their config (api key redacted):

              {
                  module: "weather",
                  position: "top_left",
                  config: {
                      type: "current",
                      location: "Crawley",
                      locationID: "2652053", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                      apiKey: "redacted",
                      units: "metric",
                      degreeLabel: true,
                      showHumidity: true,
                      tableClass: "medium"
                      }
              },
              {
                  module: "weather",
                  position: "top_right",
                  config: {
                      type: "forecast",
                      appendLocationNameToHeader: false,
                      location: "Crawley",
                      locationID: "2652053", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
                      apiKey: "redacted",
                      units: "metric",
                      degreeLabel: true,
                      fade: false,
                      colored: true,
                      tableClass: "forecast"
                      }
              },
      
      

      MagicMirror-error.log shows this:

      [2025-01-05 12:50:19.350] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:51:17.281] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:52:17.295] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:53:16.885] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:54:16.947] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:55:16.976] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:56:16.907] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      [2025-01-05 12:57:16.889] ^[[31m[ERROR]^[[39m ^[[31mError fetching feed: Error fetching feed: 401^[[39m
      

      That’s after stopping the mirror and clearing the log. But looking in the old (massive) log, that error has been there for months.

      Is this a known issue, or anything else I can provide to help fix it?

      It’s running on a Pi3 (fully updated with apt), and the Mirror upgrade was done using the recommended script.
      Rebooting and restarting doesn’t help either, to eliminate a basic…

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @DarrenHill
        last edited by

        @DarrenHill we changed the module code to match the new api. (which is why it stopped working) nothing new coming.

        other providers are available. see the doc. i don’t know which ones work in which geography, or their requirements. (apikey…)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Away
          sdetweil @DarrenHill
          last edited by

          @DarrenHill yes, openweather (the default provider if you dont change it) has changed their business business model

          they shut down their old free api and switched to their new (3yr old) api, which requires a credit card backing, and a free number of api calls (1000/day), so effectively free.

          but this required changes to our code

          so, you have to get a new apikey
          and location/locationID no longer work, have to use lat/lon
          and the custom module title doesnt work , as they don’t return the location name anymore

          so much fun

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            DarrenHill @sdetweil
            last edited by DarrenHill

            @sdetweil Thanks Sam - I recall they were changing but wasn’t sure if that was the root cause here, given it worked prior to the 2.30 upgrade (ie this morning).

            Is it worth doing anything for the moment (getting the new api key etc), or is the module code going to change and so maybe better to wait?

            Or I see the module can do other providers - is there a recommended one for the UK (as I think the met office here are also screwing around with their API if I remember well)?

            S 2 Replies Last reply Reply Quote 0
            • S Away
              sdetweil @DarrenHill
              last edited by

              @DarrenHill we changed the module code to match the new api. (which is why it stopped working) nothing new coming.

              other providers are available. see the doc. i don’t know which ones work in which geography, or their requirements. (apikey…)

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil @DarrenHill
                last edited by

                @DarrenHill said in Default Weather Broke After Update:

                given it worked prior to the 2.30 upgrade (ie this morning).

                they told us in no uncertain terms the old api was dead(stopped working) in January, June and October…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  DarrenHill @sdetweil
                  last edited by DarrenHill

                  @sdetweil OK thanks - clear.

                  I’ll have a quick play with the other providers, although the met office are also changing their API in September so probably one to also avoid if future-proofing is desirable.

                  As you say, so much fun…

                  Edited to add - swapped to the met office data hub one (not the main one, as that’s the one that’s expiring soonish) and was a fairly painless changeover after getting a new account and API key there. All good now.

                  1 Reply Last reply Reply Quote 1
                  • D DarrenHill has marked this topic as solved on
                  • A Offline
                    AndyHazz Project Sponsor
                    last edited by

                    The same happened to me, my fix was a bit simpler but maybe only temporary …

                    It seems the default endpoint has changed - the documentation still says that the default for weatherEndpoint should be ‘/weather’, but I think in the latest update that changed to ‘/onecall’. For those of us with old api keys I think it’s still ok to use the /weather endpoint, you just need to specify that in the config now that it’s no longer the default.

                    weatherEndpoint: '/weather',
                    
                    S 1 Reply Last reply Reply Quote 0
                    • S Away
                      sdetweil @AndyHazz
                      last edited by

                      @AndyHazz did you also change the apiKey back to 2.5?

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      J A 2 Replies Last reply Reply Quote 0
                      • J Offline
                        joey @sdetweil
                        last edited by

                        @sdetweil I just re-set up my MagicMirror, and I had to change it back to 2.5. I was trying to change to the 3.0 API, but I did not want to give my credit card number. I tried to use two different pre-paid gift cards (two different types from two different sources), but OpenWeather’s system would not accept either. (Both said “this credit card cannot be used for this purchase” or something similar.) It makes me wonder if maybe OpenWeather had too much push-back on the 3.0 API (either the API change itself or issues or complaints about billing).

                        I do expect the 2.5 API to stop working at some point. Do you know if there is a way for the default weather module to detect an API failure and have it display an error, as opposed to the eternal “Loading…” message? It might help jog the memory for people like me, and give a better toehold for others when they come to the forums seeking help.

                        S 1 Reply Last reply Reply Quote 0
                        • S Away
                          sdetweil @joey
                          last edited by

                          @joey no. almost none of the modules present good ui
                          messages.

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

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