MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Location and temp problems with Weather

    Troubleshooting
    1
    2
    93
    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.
    • Tippon
      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'
      				}
      		},
      
      1 Reply Last reply Reply Quote 0
      • Tippon
        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.

        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