Navigation

    MagicMirror Forum

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

    Weather Module not showing with weather.gov api

    Troubleshooting
    3
    5
    143
    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.
    • C
      CloakingTorin last edited by

      Hi, I’m working on adding the newer “weather” module to my MM and I’m trying to use the weather.gov api with it but I can’t seem to get configured correctly. What is shown below does not show on the MM. Can anyone help me out, thanks?

      	module: "weather",
      	position: "top_right",
      	config: {
      		weatherProvider: "weathergov", 
      		apiBase: 'https://api.weather.gov/points/',
      		weatherEndpoint: '/forecast',
      		lat: '40.7',
      		long: '-74.0', 
      		type: 'forecast',
      	}
      cowboysdude 1 Reply Last reply Reply Quote 0
      • cowboysdude
        cowboysdude Project Sponsor Module Developer @CloakingTorin last edited by cowboysdude

        @cloakingtorin said in Weather Module not showing with weather.gov api:

        long: ‘-74.0’,

        Did you copy the config file and paste it into your config file? Go back through and change all the quotes to double quotes…

                     weatherProvider: "weathergov", 
         	apiBase: 'https://api.weather.gov/points/',
         	weatherEndpoint: '/forecast',
         	lat: '40.7',
         	long: '-74.0', 
         	type: 'forecast',
        

        Copying configs and pasting them into your config can lead to quote issues…

        C 1 Reply Last reply Reply Quote 0
        • C
          CloakingTorin @cowboysdude last edited by CloakingTorin

          @cowboysdude Tried changing everything to double quotes but it still didn’t show up. I know the API works because if you enter https://api.weather.gov/points/40.7,-74/forecast into a browser you get the data.

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

            @cloakingtorin 1st thing, longitude is lon, not long

            i debug it and see it get the info, then still says loading…
            working

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

              @CloakingTorin

              this module has a small design problem…

              it gets the urls for the different data types FROM the api.

              the 1st time the top level calls the provider for the forecast, it doesn’t have the urls yet,
              but can’t tell the top to call again

              then the top level waits 600,000 milliseconds before it calls again , 600 seconds , 10 minutes… so it shows loading for 10 minutes… then it will show the forecast…

              u can change it to 2 minutes, by adding this to the config section… it will still look dead for 2 minutes… AND it will call the api EVERY 2 minutes to get the forecast…

              updateInterval: 2*60*1000,

              I sumitted an issue,
              https://github.com/MichMich/MagicMirror/issues/2505

              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