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.

    MMM-OpenWeatherForecast showing incorrect weather for my location

    Scheduled Pinned Locked Moved Solved Troubleshooting
    12 Posts 2 Posters 1.1k 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
      kasperb
      last edited by

      Hello - I’ve been using MMM-OpenWeatherForecast successfully for a while, but noticed the temperature is significantly different from the actual temp in my location. I’ve used latlong.net to get the right Latitude and Longitude, but it’s still not right. When I navigate to openweathermap.org, I see the correct temperature for my location (New Jersey, USA).

      Any idea what could cause this? I don’t think the config allows anything other than lat/long to determine the location (e.g., no zip code, or location ID).

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

        @sdetweil Good suggestion… that worked.

        Next, I put back the original config and changed the lat/long from a number into a string which fixed it while using my original/customized config as well.

        Thanks for your help troubleshooting @sdetweil ! Much appreciated

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

          @kasperb did you out them in config as numbers or quoted strings? need numbers

          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
            kasperb @sdetweil
            last edited by

            @sdetweil Hi - just regular numbers e.g,

            40.712776,
            -74.005974,

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

              @kasperb can you show the module config?

              which source for the module?
              in the module folder do

              git remote -v
              

              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
                kasperb @sdetweil
                last edited by sdetweil

                @sdetweil

                Here is the config:

                {
                    module: "MMM-OpenWeatherForecast",
                    position: "top_left",
                    disabled: false,
                    header: "",
                    config: {
                      apikey: "_DELETED_", //SUPER SECRET
                      latitude: <RM FOR PRIVACY>,
                      longitude: <RM FOR PRIVACY,
                      units: "imperial",
                      debug: true,
                      apiBaseURL: "https://api.openweathermap.org/data/3.0/onecall?",
                      iconset: "3m",
                      colored: false,
                      concise: true,
                      requestDelay: "2000",
                      showFeelsLikeTemp: true,
                
                      showCurrentConditions: true,
                      showSummary: true,
                      showExtraCurrentConditions: true,
                      extraCurrentConditions: {
                        highLowTemp: true,
                        precipitation: true,
                        sunrise: false,
                        sunset: false,
                        wind: true,
                        barometricPressure: false,
                        humidity: true,
                        dewPoint: false,
                        uvIndex: true,
                        visibility: false
                      },
                
                      forecastLayout: "table",
                      forecastHeaderText: "",
                
                      hourlyForecastTableHeaderText: "Hourly",
                      showHourlyForecast: true,
                      showHourlyTableHeaderRow: true,
                      hourlyForecastInterval: 3,
                      maxHourliesToShow: 3,
                      hourlyExtras: {
                        precipitation: true,
                        wind: true,
                        barometricPressure: false,
                        humidity: false,
                        dewPoint: false,
                        uvIndex: false,
                        visibility: false
                      },
                
                      dailyForecastTableHeaderText: "Weekly",
                      showDailyForecast: true,
                      showDailyTableHeaderRow: true,
                      maxDailiesToShow: 5,
                      dailyExtras: {
                        precipitation: true,
                        sunrise: false,
                        sunset: false,
                        wind: true,
                        barometricPressure: false,
                        humidity: false,
                        dewPoint: false,
                        uvIndex: false
                      },
                
                    }
                  },
                

                This is the output of the command:

                origin https://github.com/Tom-Hirschberger/MMM-OpenWeatherForecast (fetch)
                origin https://github.com/Tom-Hirschberger/MMM-OpenWeatherForecast (push)

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

                  @kasperb ok, his doc says

                  At a minimum you need to supply the following required configuration parameters:
                  
                  apikey
                  latitude
                  longitude
                  apikey needs to be specified as a String, while latitude and longitude can be specified as either a String or a Number. Both work fine.
                  
                  By default the module uses the OpenWeater One Call API in version 3.0 now cause version 2.5 has been shut down in June 2024. If you know what you are doing you can use the config option apiBaseURL to specify the URL you like.
                  

                  SO, you don’t need the apiBase property

                  and you DID get a new 3.0 apikey, (which is backed by a credit card), right?

                  the old (2.5) apiKey will not work with the 3.0 /onecall endpoint

                  also, for future… all config and log info in a code block please here on the forum

                  to do

                  paste text into editor, blank line above and below
                  select text just pasted
                  hit </> button above editor

                  the code block markers will be added… they MUST start a new line by themselves(why the blank line above/below)

                  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
                    kasperb @sdetweil
                    last edited by

                    @sdetweil Yes, I’m using the 3.0 apikey, backed by a CC. Can you clarify what you mean with removing the ApiBase property?

                    I’m going to play around using some lat/long from neighboring towns and see if that could help.

                    Also, thanks for the guidance on posting config & log info.

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

                      @kasperb if you don’t set the apiBaseURL, then the module uses what it has defined

                      this is one of the critical pieces of data to get the api to work. the less you specify the less chance of that trouble

                      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
                        kasperb @sdetweil
                        last edited by

                        @sdetweil Removed the URL, app is loading but the same issue:

                        • 10F in the app
                        • 15F on OpenWeather.org

                        I even double-checked the lat/long, and aligned them (‘geo coords’) exactly with what’s listed for my location on the OpenWeather.org site.

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

                          @kasperb and if you start w his example config and your lat/lon and apikey?

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          K 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