Grab Weather Data

Ever want to grab weather data for free to use on your dashboard or application? Here’s a quick PowerShell script that can be ran regularly to grab the latest temperature for an area/zip code.

If you want to push the temperature data elsewhere, say to InfluxDB to display with something like Grafana you can send it with Curl. You’d simply add additional code like at the bottom of your script –

It’s worth mentioning that this specific example uses NOAA or OpenWeatherMap, both have limitations on the amount of times you can query data in 24-hours unless you subscribe, so keep that in mind. Typically, weather data doesn’t change much or update that much, so I found 1 request per hour was typically enough and kept my dashboards fairly accurate.

Leave Comment