Weather Program

After setting up a weather station on my roof, I decided to write a Windows program to monitor the weather conditions. I also added support for it to grab the 6-day forecast from Weather Underground and to display current astronomical conditions (sunrise/sunset, moonrise/moonset, and moon phase). It worked well for me, but I decided to make further enhancements to make it useful for others and release it to the public.

My weather program still works best if you have your own weather station to directly feed it data, but it now can work with other sources of data as well. Supported weather conditions and forecast sources are:

Not all conditions and forecast sources support all data; for example, interior temperature and humidity can only be provided by a custom data source such as my own personal weather station server.

Appearance

With a custom conditions source providing all possible data and Weather Underground as the forecast source, the main window of the program looks like this. With other conditions sources, regions without data are hidden.

A system tray icon is provided, showing the current temperature. Hovering over it shows the humidity, wind speed and direction, solar radiation, and date the conditions were last updated:

     

Clicking the round blue refresh arrows next to the update timestamps will force a refresh of the conditions or the forecast on demand.

The phase of the moon is shown at an angle that should match the moon at lunar noon of the current day. It is reversed for southern hemisphere latitudes.


Download

You may download the Windows executable here (last updated 2020-07-25).


Configuration

Click the system control menu (icon on the left side of the title bar), and then click the Settings menu item near the bottom:

The Settings window will appear:

Be sure to set the latitude and longitude appropriately for your location (use negative for southern and western hemispheres). These values are used for determining sunrise/sunset and moonrise/moonset, and is also used for determining conditions when OpenWeather or Dark Sky is selected and for determining forecasts when OpenWeather, Weather Underground, National Weather Service, or Dark Sky are selected.

The update frequencies are adjustable but should not be set too frequently. Most APIs have rate limits, so leaving them at their defaults should be a good value that doesn't exceed rate limits. Also, there is no need to update much more frequently than the source updates; for example, the National Weather Service only updates forecasts and conditions hourly, and few services update conditions more than once or twice a minute.

Checking the "Closing main window minimizes to tray" checkbox makes it so the program keeps running when the main window is closed, showing up only with the temperature in the system tray next to the clock, rather than quitting the program. To quit, right-click the tray icon and choose Exit.

Checking the "Start hidden" checkbox makes it so the window doesn't appear when the application is started, with the only indication of it running being the temperature icon in the system tray.

By default, US standard units are used. For metric units, check the "Use metric units" checkbox.


Conditions Sources

Multiple sources are supported for conditions. Not all sources provide all data. After selecting a source, additional information may be required to make it work.

Weather Underground

Two fields are required:

Conditions not provided by this source are: interior conditions, rainfall weekly/monthly/yearly totals

Dark Sky

One field is required:

The conditions location is determined based on the latitude and longitude entered on the first tab.

Conditions not provided by this source are: absolute barometric pressure, solar radiation, interior conditions, rainfall (except current rain rate)

OpenWeather

One field is required:

The conditions location is determined based on the latitude and longitude entered on the first tab.

Conditions not provided by this source are: absolute barometric pressure, solar radiation, UV index, wind gust speed, interior conditions, rainfall

National Weather Service

One field is required:

Conditions not provided by this source are: absolute barometric pressure, solar radiation, UV index, wind gust speed, interior conditions, rainfall

Custom

This is to be used when you have your own weather station providing data in JSON format. Typically this will be when you have a small server (such as a Raspberry Pi) collecting data from your weather station and placing it in a file somewhere.

One field is required:

The JSON file may have the following fields with the given units. Any extra fields will be ignored:


Forecast Sources

Multiple sources are supported for forecasts. After selecting a source, additional information may be required to make it work.

Weather Underground

One field is required:

The forecast location is determined based on the latitude and longitude entered on the first tab.

Dark Sky

One field is required:

The forecast location is determined based on the latitude and longitude entered on the first tab.

OpenWeather

One field is required:

The forecast location is determined based on the latitude and longitude entered on the first tab.

Note: Rainfall totals do not appear to follow the API documentation, so until this is corrected, these will be exaggerated.

National Weather Service

The forecast location is determined based on the latitude and longitude entered on the first tab.

Custom

This is to be used when you want your forecast information coming from a custom source in JSON format.

One field is required:

The JSON file may have the following fields with the given units. Any extra fields will be ignored:

Supported icon values are the same used by the Weather Underground API:


Eric Rechlin

Email: my last name at gmail.com

Last update: July 25, 2020