IP Anemometer

WordPress Plugin


ip-anemometer-wp-plugin-0.4.1.zip (2019-02-10)

To install the plugin, copy the ip-anemometer/ directory to wp-content/plugins/ip-anemometer/ and activate the plugin in the WordPress plugins page.


The WordPress plugin allows you to easily embed IP anemometer charts in WordPress content. Simply use a shortcode to specify the server URL and the charts/components to show.

For example, these shortcodes...

[ipa url="http://foo.bar/ipa/view/ipa.php"]
[ipa period_selector default_period="42" id="foo"]
[ipa wind_summary wind_speed period_id="foo"]

... will show a period selector (with a default of 42 minutes) with the ID foo, the wind summary table and the wind speed chart for the period specified:

WP wind chart

Note that the shortcode for wind_summary and wind_speed references the above period selector. The URL parameter must only be specified once. It is valid for the entire page.

To show another chart somewhere else in the page (referencing the same period selector):

[ipa wind_histogram period_id="foo"]

WP wind histogram

To select an end date:

[ipa date_selector]

WP end date selector

The end date will be valid for all charts. It should probably be placed at the top of the page, before the charts and period selectors. If the date selector is omitted, the current date and time (i.e. "now") will be used. The selector defaults to the current date and time, which can be overridden as described below.

To use a fixed duration instead of a period selector:

[ipa cpu_temp period="2h"]

WP cpu temperature


The ipa shortcode supports a number of parameters as described in the following sections.

Global Options

Global options are valid for the entire page.

  • url="http://some.where/ipa/view/ipa.php"
    The URL of the ipa.php file on the IP anemometer server. This must be specified for the first shortcode on the page.
  • spinner=0
    By default a spinner is shown while loading data, i.e. when the page loads initially and when the load button is clicked. This disables the spinner.

These options can be added to a shortcode that produces a chart or a control, but it is easiest to have one shortcode at the top for all globals, e.g.:

[ipa url="http://some.where/ipa/view/ipa.php" spinner=0]


Controls allow the user to specify the period to query and the reference date.

  • period_selector default_period="1h30m" id="foo"
    Shows a period selector with a default of "1h30m". Numbers without suffix are minutes, so this is equivalent to "90". The default for default_period is 60 minutes. The ID can be used in a chart shortcode to specify the desired selector. It is arbitrary, but must be unique.
  • date_selector
    Shows a selector to pick a reference date and time. Defaults to the current date and time, unless otherwise specified. Example: default_date="2018-06-26 13:00". Clicking on the "Now" button refreshes the charts.


Each chart must have one option to either reference a period selector or specify a fixed period. For example, period_id="foo" references a period selector with id="foo", whereas period="1h" sets a fixed period of one hour.

  • wind_summary
    The wind summary table.
  • wind_speed
    Wind speed over time.
  • wind_histogram
    Wind speed histogram.
  • temp_hum
    Temperature and humidity.
  • door
    Door sensor status.
  • pilots
    Pilot count.
  • adc channel="<channel no.>" label="<channel label>"
    A/D converter/voltage sensor readout of the specified channel.
  • lag
    Upload lag.
  • cpu_temp
    CPU temperature.
  • signal
    Signal strength (for a Huawei E303 compatible 3G USB device).
  • network
    Network type (for a Huawei E303 compatible 3G USB device).
  • traffic
    Data transfer volume (for a Huawei E303 compatible 3G USB device).
  • status
    The client's current status.This ignores date and period.