github poblabs/weewx-belchertown weewx-belchertown-3.0.0
Belchertown 3.0.0

3 hours ago

Belchertown 3.0: the original skin, rebuilt

Belchertown has been quiet since 2023. Version 3.0 is the original skin brought back, refactored from the ground up for weewx 5, with a handful of features that didn't exist anywhere before. It's running on BelchertownWeather.com right now.

Why 3.0 and not 2.0? While this skin was quiet, New Belchertown kept it alive as a separate fork with its own 2.x versions. The two are different skins now, so this one jumps straight to 3.0 to keep the version numbers apart. Both are free; use whichever suits you.

Belchertown 3 needs weewx 5.0 or newer. On weewx 3 or 4, stay on 1.3.1.

What's new

The chart builder. Adding a chart used to mean writing graphs.conf by hand and waiting for the next report to see if you got it right. Now open chart-builder/ on your own site, pick what to plot, the time range, the detail and the colors, and watch the chart draw itself from your station's data as you go. When it looks right, press Copy and paste the text into graphs.conf; the page tells you exactly where. It's read-only, needs no password, and isn't in the menu, so bookmark it. (How to use it)

Forecasts and alerts with no setup. Install the skin and you get a forecast, air quality and (in the US) weather alerts from Open-Meteo and the National Weather Service, free, no account or key. Xweather still works if you have a key.

A °F / °C button in the header. One press and the whole site switches units, in place, without reloading: temperatures, wind, rain, pressure, the forecast, the records, live updates and every chart. The button shows which unit you're in.

Home page layouts. A layout button offers Dashboard, Forecast first, Radar first and Charts first; the choice is remembered. Storm mode switches visitors to Radar first on its own while it's raining or a storm, flood or snow alert is in effect, and back afterwards.

A new Records page, and "On this day" on the home page: today's date in every year since your station started, with the coldest and warmest on record, the average, and today so far, plus a note when today sets a record.

Smaller things: a sticky header that slims down as you scroll; the kiosk (wall display) is now ?view=kiosk on the home page instead of a separate page; a French translation (thanks trollix); a radar_overlay option for the windy.com map (thanks WernerKr); Highcharts 13 with the accessibility module (thanks dtalens); charts follow the skin's light or dark theme rather than the phone's setting.

Under the hood

Most of the work was taking things out. jQuery, Bootstrap's JavaScript and stylesheet, moment.js, the separate dark stylesheet and the kiosk and Raspberry Pi pages are gone. The skin's own script is split into one file per job, the stylesheet is one file, and the layouts use CSS grid and flexbox. Two language files (Catalan and Italian) that had never loaded are fixed, the consecutive-rain-days record is right (#1001), and sensors weewx has no unit for are no longer rounded to zero on charts (#935).

By the numbers

Home page of the same station, 1.3.1 against 3.0:

1.3.1 3.0
JavaScript downloaded 1,301 KB 822 KB (−37%)
Stylesheets 361 KB in 6 files 149 KB in 4 (−59%)
Everything the page downloads 2,773 KB 1,959 KB (−29%)
... over a compressed connection 796 KB 687 KB
The skin's own code 665 KB 543 KB (−18%)

Six files removed, and page templates went from 2,936 lines to 2,107.

Upgrading from 1.3.1: what to know

Take a copy of your skins/Belchertown folder first (your graphs.conf, about.inc, custom.css and other .inc files live there), then install the new version with weectl extension install weewx-belchertown-3.0.0.tar.gz and restart weewx. Your own files carry over. Then:

  1. Your custom .inc files keep working. If one uses jQuery, the skin notices and loads jQuery just for it (and says so in the weewx log). You can leave it that way, or update the file for a lighter page; the README shows how.
  2. The forecast is on by default and uses Open-Meteo unless you have an Xweather key. Set forecast_enabled = 0 if you don't want one.
  3. json/forecast.json has a new format. If something else reads that file (a Home Assistant sensor, a script), it needs updating. The format is described at the top of bin/user/belchertown_forecast.py.
  4. Kiosk and Pi pages are now ?view=kiosk on the home page. The old radar_*_kiosk, forecast_interval_hours_kiosk, aqi_enabled_kiosk, pi_theme and pi_kiosk_bold options are gone; the MQTT *_kiosk options still work.
  5. Removed: the Twitter share button (twitter_enabled), the static Xweather map (aeris_map), belchertown-dark.min.css (dark mode lives in style.css now), and js/belchertown.js.tmpl (settings reach the browser through belchertown-config.js instead). Leftover settings are ignored.
  6. Dates use Day.js instead of moment.js. The format codes are the same; if your own files call moment(), change it to dayjs().
  7. Gauges: if graphs.conf gives a gauge radius or innerRadius as a plain number, Highcharts 13 reads it as pixels. Add % to keep percentages.

The full list is in the changelog.

Thanks

dtalens (#1004), trollix (#1008), WernerKr (#1009), bonjour81 (#1001) and earlthesquirrel (#935), and uajqq and the New Belchertown contributors for keeping Belchertown going between 2024 and 2026; fixes from that fork are credited in the changelog.

Found something? Open an issue; the template asks for what's needed to help.

Don't miss a new weewx-belchertown release

NewReleases is sending notifications on new releases.