Weewx into WordPress

Introduction

This website uses the ByteWeewx Wordpress Plugin to embed Weewx weather data into a WordPress Website.  It relies on the ByteXML Weewx skin to upload key data files that are then processed inside WordPress.

Installation

WordPress

1) Download the plugin from github and upload just the byteweewx folder and its contents to your wordpress plugins folder.

2) It comes with some of my old data so you can test it works – I would recommend this before you continue so you know that this side of things is working.

3) To start afresh delete everything inside the data folder but not the folder itself.

Weewx

1)  Check that you have the weewx forecasting module working (assuming that you want this feature).   I cannot support this module. The ByteXML skin assumes that you will want forecasting and includes the required directive in the Cheetah Generator – comment this out if you don’t want it.

2) Next install the ByteXml skin into your Weewx installation and configure your weewx software to use it.  You will need to update the path inside forecast.xml.tmpl (line 9) so it can find the forecast.inc file.

3) Ensure that the FTP section in weewx.conf is filled in.  I would recommend that you create a new ftp user that only has permission to write to the WordPress / Content / Plugins / ByteWeewx / Data folder.  You might need to update the FTP path to allow this – ask your hosting company if in doubt.

4) Restart Weewx so it uses the new skin.  If you are impatient to wait then run wee_reports from the bin file.

Now you can add shortcodes into your pages and posts anywhere in your wordpress website!

Basic Usage

It uses the weewx shortcode with a element label.  Currently the available elements include:

  • stationinfo – information about the station (demo);
  • location – map showing location (demo);
  • current – table showing most recent observation (demo);
  • day – table showing data from the last 24 hours (demo);
  • week – table showing data from the last week (demo);
  • month – table showing data from the last month (demo);
  • year – table showing data from the last year (demo);
  • almanac – table showing current sun and moon data (demo);
  • archive – a list of the current NOAA archive files (demo);
  • forecast – the current three day summary forecast (demo);

The following elements use both an element and an id to specify specific information.

 

  • image – this can be used to insert any of the default charts produced by image generator e.g:  monthinside, weektempdew, monthpond, weekwind, monthradiation, weekwinddir, monthrain, weekwindvec, daybarometer, monthrx, yearbarometer, dayinside, monthtempchill, yearhilow, daypond, monthtempdew, yearinside, dayradiation, monthwind, yearpond, dayrain, monthwinddir, yearradiation, dayrx, monthwindvec, yearrain, daytempchill, weekbarometer, yearrx, daytempdew, weekinside, yeartempchill, daywind, weekpond, yeartempdew, daywinddir, weekradiation, yearwind, daywindvec, weekrain, yearwinddir, weekrx, yearwindvec, monthbarometer, weektempchill.
  • forecast – if passed with id=’hourly’ then you can access the full hourly forecast (demo);
  • single – this can be used to call up a specific measure e.g. sunrise;  For more details on single see below.

Single Elements

  • [weewx element=”single” id=”version”]

Last Updated: