• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Weather Module not showing with weather.gov api

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 3 Posters 2.1k Views 4 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.
  • C Offline
    CloakingTorin
    last edited by Mar 22, 2021, 2:09 AM

    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',
    	}
    
    C 1 Reply Last reply Mar 23, 2021, 10:46 AM Reply Quote 0
    • C Offline
      cowboysdude Module Developer @CloakingTorin
      last edited by cowboysdude Mar 23, 2021, 10:48 AM Mar 23, 2021, 10:46 AM

      @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 Mar 26, 2021, 12:33 PM Reply Quote 0
      • C Offline
        CloakingTorin @cowboysdude
        last edited by CloakingTorin Mar 26, 2021, 12:34 PM Mar 26, 2021, 12:33 PM

        @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 Mar 26, 2021, 12:53 PM Reply Quote 0
        • S Offline
          sdetweil @CloakingTorin
          last edited by Mar 26, 2021, 12:53 PM

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

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

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Mar 26, 2021, 1:35 PM Reply Quote 0
          • S Offline
            sdetweil @sdetweil
            last edited by sdetweil Mar 26, 2021, 6:32 PM Mar 26, 2021, 1:35 PM

            @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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              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