MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    SOLVED Hourly weather showing up as undefined location

    Troubleshooting
    3
    14
    139
    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.
    • J
      jimmy_382837 last edited by

      I am trying to get both the daily and the hourly forecast to show up via the default weather module. The daily works fine, but the hourly shows up as undefined. Any thoughts? Screen shots and config pasted below.

      I tried the lat / lon with and without quotes and with single quotes, and I get the same undefined result each time.

      I am using the same API key for both, if that makes a difference.

      36e98e01-95a8-4c87-b9bb-625b6992130e-image.png

      
      {
      	module: "weather",
      	position: "top_right",
      	header: "Daily Weather Forecast",
      	config: {
      		weatherProvider: "openweathermap",
      		type: "forecast",
      		location: "XXX",
      		locationID: "XXX", 
      		apiKey: "XXX",
      		roundTemp: true,
      		maxNumberOfDays: 8,
      		appendLocationNameToHeader: false,
      		fade: false
      	}
      },
      
      {
      	module: "weather",
      	position: "top_right",
      	header: "Hourly Weather Forecast",
      	config: {
      		weatherProvider: "openweathermap",
      		weatherEndpoint: "/onecall",
      		type: "hourly",
      		lat: "XX.XXXX",
      		lon: "-XX.XXXX",
      		apiKey: "XXX",
      		initialLoadDelay: 5000,
      		maxEntries: 12,
      		roundTemp: true,
      		fade: false
      	}
      },
      
      
      S 1 Reply Last reply Reply Quote 0
      • J
        jimmy_382837 @sdetweil last edited by

        @sdetweil ah yes, i had to subscribe to the one call 3.0 api and then wait about a half an hour for my api to update. now it works - thanks for helping me troubleshoot!

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

          @jimmy_382837 true/false and numbers do not use quotes.

          so your lat/long values are wrong

          Sam

          Create a working config
          How to add modules

          J 1 Reply Last reply Reply Quote 0
          • J
            jimmy_382837 @sdetweil last edited by

            @sdetweil thank you for the reply - however, when i try to take the quotes out, i still get the undefined issue. any other things i should try?

            6f349ae6-f9e8-42b4-99bd-640f094293af-image.png

            
            {
            	module: "weather",
            	position: "top_right",
            	header: "Hourly Weather Forecast",
            	config: {
            		weatherProvider: "openweathermap",
            		weatherEndpoint: "/onecall",
            		type: "hourly",
            		lat: XX.XXX,
            		lon: -XX.XXX,
            		apiKey: "XXX",
            		initialLoadDelay: 5000,
            		maxEntries: 12,
            		roundTemp: true,
            		fade: false
            	}
            },
            
            
            rejas 1 Reply Last reply Reply Quote 0
            • rejas
              rejas Module Developer @jimmy_382837 last edited by

              @jimmy_382837 Can not reproduce it. What lat/lon and locationID are you using?

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

                @rejas he doesn’t have a locationID specified

                Sam

                Create a working config
                How to add modules

                rejas 1 Reply Last reply Reply Quote 0
                • rejas
                  rejas Module Developer @sdetweil last edited by

                  @sdetweil In his first psot he has, just wanted to make sure I get the whole config related to weather.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jimmy_382837 @rejas last edited by

                    @rejas this is my exact config with the lat / lon below, minus the api key. i pulled the lat / lon off of openweathermap.org’s search for austin, us.

                    i didn’t include the locationID, given i thought the module ignored it when on hourly mode.

                    {
                    	module: "weather",
                    	position: "top_right",
                    	header: "Hourly Weather Forecast",
                    	config: {
                    		weatherProvider: "openweathermap",
                    		weatherEndpoint: "/onecall",
                    		type: "hourly",
                    		lat: 30.267,
                    		lon: -97.743,
                    		apiKey: "xxxxxxxxxx",
                    		initialLoadDelay: 5000,
                    		maxEntries: 12,
                    		roundTemp: true,
                    		fade: false
                    	}
                    },
                    
                    S 1 Reply Last reply Reply Quote 0
                    • S
                      sdetweil @jimmy_382837 last edited by sdetweil

                      @jimmy_382837 openweathermap requires a location or locationID value

                      see the note on the location property

                      Screenshot at 2023-09-17 09-37-22.png

                      Sam

                      Create a working config
                      How to add modules

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        jimmy_382837 @sdetweil last edited by

                        @sdetweil thanks - and sorry this is a pain and probably stupid user error on my part, but even when i put in a locationID, it still gives me the undefined error.

                        
                        {
                        			module: "weather",
                        			position: "top_right",
                        			header: "Hourly Weather Forecast",
                        			config: {
                        				weatherProvider: "openweathermap",
                        				weatherEndpoint: "/onecall",
                        				type: "hourly",
                        				lat: 30.267,
                        				lon: -97.743,
                        				locationID: 4671654,
                        				apiKey: "xxxxxxx",
                        				initialLoadDelay: 5000,
                        				maxEntries: 12,
                        				roundTemp: true,
                        				fade: false
                        			}
                        		},
                        
                        
                        S 1 Reply Last reply Reply Quote 0
                        • S
                          sdetweil @jimmy_382837 last edited by

                          @jimmy_382837 ok, looking thru the doc, as u picked hourly and and /onecall then locationID is not used…

                          so, I would try to make the lat/lon more specific with additional decimal places. the example shows 4, u only have 3. all my code using the onecall api uses 6

                          Sam

                          Create a working config
                          How to add modules

                          J 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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                          This forum is using NodeBB as its core | Contributors
                          Contact | Privacy Policy