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:
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"]
To select an end date:
[ipa 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"]
The ipa
shortcode supports a number of parameters as described in the following sections.
Global options are valid for the entire page.
url="http://some.where/ipa/view/ipa.php"
ipa.php
file on the IP anemometer server. This must be specified for the first shortcode on the page.spinner=0
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"
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
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
wind_speed
wind_histogram
temp_hum
door
pilots
adc channel="<channel no.>" label="<channel label>"
lag
cpu_temp
signal
network
traffic
status