Read the statement by Michael Teeuw here.
Weather Module not showing with weather.gov api
-
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', }
-
@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…
-
@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.
-
@cloakingtorin 1st thing, longitude is lon, not long
i debug it and see it get the info, then still says loading…
working -
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 againthen 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