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.

    Location and temp problems with Weather

    Scheduled Pinned Locked Moved Troubleshooting
    2 Posts 1 Posters 330 Views 1 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.
    • TipponT Offline
      Tippon
      last edited by

      Hi all :)

      I’ve just got everything set up in a virtual machine while I wait for my hardware to arrive, and I’m having some problems with the updated weather module.

      I’ve got it running, and it looks good. I’ve got two copies, one displaying the current weather and one for the hourly forecast, and they’ve got the location above the modules. The problem is, the weather doesn’t match with the Open Weather Map website (showing approx 5c and cloudy, but 1c and clear on the website), and the location is displaying the latitude and longitude rather than the town name. My phone’s weather app uses Open Weather Map too, and it’s matching the site.

      As far as I can see, everything is set up properly, including the /onecall endpoint for the hourly weather. The changes below are in weather.js with the two entries at the bottom in config.js

      Can someone tell me what I’m missing please?

      (P.S. I’m happy with the location being public, as it’s for the nearest town and doesn’t identify me)

      weatherProvider: "openweathermap",
      		roundTemp: false,
      		type: "hourly", // current, forecast, daily (equivalent to forecast), hourly (only with OpenWeatherMap /onecall endpoint)
      		lat: 51.7162,
      		lon: 3.4518,
      		location: 'Aberdare,GB',
      		locationID: 2657835,
      
      {
      		module: "weather",
      		position: "top_right",
      		config: {
      			// See 'Configuration options' for more information.
      			type: 'current'
      				}
      		},
      		{
      		module: "weather",
      		position: "top_right",
      		config: {
      			// See 'Configuration options' for more information.
      			type: 'hourly'
      				}
      		},
      

      Please forgive me if I'm slow to reply, I'm currently experiencing memory issues, and sometimes forget that I've asked a question >.<

      1 Reply Last reply Reply Quote 0
      • TipponT Offline
        Tippon
        last edited by

        In case anyone sees this in the future, I’ve solved it for me setup at least. I found that using locationID along with lat & long and location caused the problem. Changing to just locationID fixed it for me.

        weatherProvider: "openweathermap",
        		roundTemp: false,
        		type: "forecast", // current, forecast, daily (equivalent to forecast), hourly (only with OpenWeatherMap /onecall endpoint)
        		locationID: 2657835,
        
        {
        		module: "weather",
        		position: "top_right",
        		config: {
        			type: 'current'
        				}
        		},
        		{
        		module: "weather",
        		position: "top_right",
        		config: {
        			type: 'forecast'
        				}
        		},
        

        Changing the second weather module to forecast instead of hourly was needed in config.js too.

        Please forgive me if I'm slow to reply, I'm currently experiencing memory issues, and sometimes forget that I've asked a question >.<

        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 Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy