-
Notifications
You must be signed in to change notification settings - Fork 5
Available Config Options
The operation of Realtime gauge-data extension is controlled by the use of config options in the [RealtimeGaugeData]
stanza in weewx.conf
. The Realtime gauge-data extension has been designed to operate with a set of sane defaults and hence an initial install should work with no config options specified.
The available config options that may be used within the [RealtimeGaugeData]
stanza in weewx.conf
are:
date_format. Display format used for date-time fields in gauge-data.txt. Optional, string using Python strftime() and strptime() format codes. Default is %Y.%m.%d %H:%M. Example usage:
date_format = %Y.%m.%d %H:%M
rtgd_path. Path used when saving the generated gauge-data.txt file. May be absolute or relative, relative paths are relative to WeeWX HTML_ROOT. Optional, string. Default is /var/tmp. Example usage:
rtgd_path = /home/weewx/public_html
rtgd_file_name. File name only (any included path is ignored) of the file generated by the Realtime gauge-data extension. Optional, string. Default is gauge-data.txt. Example usage:
rtgd_file_name = gauge-data.txt
remote_server_url. URL of remote server to which the gauge-data.txt file will be transferred via HTTP POST. HTTP POST is disabled if remote_server_url is omitted or empty. May be an IP address. If remote_server_url is specified, do not specify a rsync server using rsync_server. Optional, string. Example usage:
remote_server_url = http://remote/address
timeout. Timeout in seconds for remote URL posts. Optional, number. Default is 2. Example usage:
timeout = 1
response_text. Text returned from remote server indicating HTTP POST success. If response_text is not specified the remote server response is not checked. Optional, string. Default is no response text. Example usage:
response_text = success
rsync_server. Remote host to which the gauge-data.txt will be transferred via rsync. Only available if using WeeWX v4.0.0 or later. gauge-data.txt rsync is disabled if rsync_server is omitted or empty. If rsync_server is specified, do not specify a remote server for transfer via HTTP POST using remote_server_url. Optional, string. No default.
rsync_server = my.rsync.server
rsync_user. The user id on the remote rsync server specified at rsync_server that will accept the rsync request. Requires write permission to the directory on the remote rsync server where gauge-data.txt will be copied. Example usage:
rsync_user = user1
rsync_remote_rtgd_dir. The directory on remote rsync server where gauge-data.txt will be copied. Mandatory if rsync_server is set, string. No default value. Example usage:
rsync_remote_rtgd_dir = /home/weewx/data
rsync_compress. Whether to compress gauge-data.txt before copying to a remote rsync server. Optional, boolean. Default is False. Example usage:
rsync_compress = True
rsync_log_success. Whether to log successful rsync operations. Log entry includes time taken to complete rsync operation. Optional, boolean. Default is False. Example usage:
rsync_log_success = True
rsync_ssh_options. SSH option string used during rsync. Recommended that setting be enclosed in single or double quotation marks. Optional, string. Default is '-o ConnectTimeout=1'. Example usage:
rsync_ssh_options = '-o ConnectTimeout=1'
rsync_timeout. Rsync timeout in seconds. Optional, number, Default is 1. Example usage:
rsync_timeout = 2
rsync_skip_if_older_than. Skip rsync if gauge-data.txt is older than specified age in seconds. Optional, number. Default is 4. Example usage:
rsync_skip_if_older_than = 5
windrose_period. Period in seconds over which wind rose data is calculated. Optional, number. Default is 86400 (24 hours). Example usage:
windrose_period = 86400
apptemp_binding. Binding to use for apparent temperature data (field appTemp). Not required if apparent temperature data is stored in the appTemp field in a WeeWX database accessed via the wx_binding database binding, eg if the WeeWX system is using the WeeWX extended schema. Optional, string. Default is wx_binding. Example usage:
apptemp_binding = wx_binding
windrun_loop. Whether to update the windrun value after each loop period (True) or after each archive period (False). Optional, boolean. Default is False. Example usage:
windrun_loop = false
max_cache_age. Stations that provide partial packets (ie each loop packet does not contain all observations) are supported through an internal cache that caches packet data. max_cache_age is the maximum age in seconds for which cached data is retained. Optional, number. Default is 600. Example usage:
max_cache_age = 600
ignore_lost_contact. Whether to ignore the sensor contact state and always set the gauge-data.txt SensorContactLost field to 0 (sensor contact not lost). Otherwise, the SensorContactLost field is set according to the sensor contact state. Not all stations report lost sensor contact. This option should be used with care as it may mask a legitimate sensor lost contact state. Optional, boolean. Default is False. Example usage:
ignore_lost_contact = False
scroller_source. The source for the text displayed by the scrolling text display. The scrolling text display is typically used to display forecast data from the gauge-data.txt forecast field. The Realtime gauge-data extension can populate the forecast field from a number of sources. The available sources are:
- fixed, user specified text
- the first line of a text file
- Weather Underground forecast from the Weather Underground API
- DarkSky forecast from the DarkSky API
- Zambretti forecast from the WeeWX forecast extension
scroller_source should be set to one of the following strings to use the indicated source:
- text - to use user specified text
- file - to use the first line of a text file
- WU - to use a Weather Underground forecast
- DS - to use a DarkSky forecast
- Zambretti - to use a Zambretti forecast
scroller_source is case insensitive. A corresponding second level config section (eg, [[text]]
or [[Darksky]]
) is required for the source to be used. Refer to ??? for details. If scroller_source is omitted or left blank no source is selected and the forecast field will be blank and no scrolling text displayed. Optional, string. Default is blank. Example usage:
scroller_source = DS
[[Text]]
. Config stanza for user specified text source. Only used when source is set to text. Config options available under this stanza are:
-
text. The user specified text to populate the gauge-data.txt forecast field. Optional Python strftime() and strptime() format codes may be included in the text string to display the current date-time. Text may be enclosed in single or double quotation marks if required. Mandatory, case sensitive string. No default. Example usage:
text = Have a nice day
or
text = The time is %H:%M:%S on %d %B %YY
[[File]]
. Config stanza for file source. Only used when source is set to file. Config options available under this stanza are:
-
file. The file, including path, to be used as the file source to populate the gauge-data.txt forecast field. Mandatory, string. No default. Example usage:
text = /var/tmp/myfile.txt
[[WU]]
. Config stanza for user specified WU source. Only used when source is set to WU or WeatherUnderground. Config options available under this stanza are:
-
interval. Interval in seconds between updates of the WU forecast. Optional, number. Default is 1800. Example usage:
interval = 1800
-
max_tries. Maximum number of attempts to obtain the WU forecast before giving up. Optional, number. Default is 3. Example usage:
max_tries = 3
-
api_lockout_period. The minimum period in seconds between WU API calls for the same feature. This prevents an error condition causing multiple rapid API calls and thus possibly breaching the WU API usage conditions. Optional, number. Default is 60. Example usage:
api_lockout_period = 60
-
api_key. The API key to be used when accessing the WU API. Mandatory, string. No default. Example usage:
api_key = abcdefghij123456789
-
forecast_type. WU forecast type to access. Supported forecast types are 3, 5, 7, 10 or 15 day forecasts. Whilst the Realtime gauge-data extension supports all of these forecast types the API key in use may only have access to a limited number of forecast types. If used must be one of '3day', '5day', '7day', '10day' or '15day'. Optional, string. Default is '3day'. Example usage:
forecast_type = 10day
-
forecast_text. Forecast text narrative to use. Supported narratives are day or day-night. If used must be one of 'day' or 'day-night'. Optional, string. Default is 'day-night'. Example usage:
forecast_text = day
-
location. The location to be used for the forecast. Consists of a location method code followed by zero or more optional parameters. A comma is used to separate the location method code from any optional parameters and to separate any optional parameters if there is more than one parameter. The location method code must be one of:
- geocode. Uses latitude/longitude to source the forecast. If used without any parameters station latitude and longitude are used. Otherwise, the optional parameters decimal latitude and decimal longitude must be provided in latitude, longitude order.
- iataCode. Uses and IATA code to source the forecast. IATA code must be included as a parameter.
- icaoCode. Uses an ICAO code to source the forecast. ICAO code must be included as a parameter.
- placeid. Uses a Place ID to source the forecast. Place ID must be included as a parameter.
- postalKey. Uses a post code to source the forecast. A postal code and two character country code in the format postal code:country code must be included as a parameter. Not all countries are supported. Refer to the Supported countries for v3 postalKeys table in the Weather Company API Common Usage Guide for details of supported countries, country codes and postal code formats.
Optional, string. Default is 'geocode'. Example usage:
location = geocode location = geocode, 30.25, 127.56767 location = iataCode, BNE location = icaoCode, YBBN location = placeid, 327145917e06d09373dd2760425a88622a62d248fd97550eb4883737d8d1173b location = postalKey, 4000:AU
-
units. Units to be used in the forecast text. Must be one of the following:
- e. Imperial (English) units
- m. Metric units
- s. Metric SI units
- h. Hybrid UK units
Refer to the Standard units of measure table in the Weather Company API Common Usage Guide for details.
Optional, string. Default is 'm'. Example usage:
units = e
-
language. Language to be used in the forecast text. Must be one of the supported language codes in the Language Translations & Language Codes table in the Weather Company API Common Usage Guide. Optional, string. Default is 'en-GB'. Example usage:
language = en-US
[[DS]]
. Config stanza for user specified DS source. Only used when source is set to DS or DarkSky. Config options available under this stanza are:
-
interval. Interval in seconds between updates of the DS forecast. Optional, number. Default is 1800. Example usage:
interval = 1800
-
max_tries. Maximum number of attempts to obtain the DS forecast before giving up. Optional, number. Default is 3. Example usage:
max_tries = 3
-
api_key. The API key to be used when accessing the DS API. Mandatory, string. No default. Example usage:
api_key = qwertyuiop123456789
-
latitude. Latitude to use for forecast. Decimal degrees, negative for southern hemisphere. Optional, number. Default is station latitude. Example usage:
latitude = 33.456
-
longitude. Longitude to use for forecast. Decimal degrees, negative for western hemisphere. Optional, number. Default is station longitude. Example usage:
longitude = -123.56421
-
block. DarkSky forecast text to use. Must be one of 'minutely', 'hourly' or 'daily'. Refer to DarkSky API documentation. Optional, string. Default is 'hourly'. Example usage:
block = minutely|hourly|daily
-
units. Units to be used in the forecast text. Must be one of the units codes listed in the DarkSky API documentation. Optional, string. Default is 'ca'. Example usage:
units = us
-
language. Language to be used in the forecast text. Must be one of the supported language codes listed in the DarkSky API documentation. Optional, string. Default is 'en'. Example usage:
language = en
[[Zambretti]]
. Config stanza for user specified Zambretti source. Only used when source is set to Zambretti. In order to use the Zambretti forecast block the WeeWX
forecast extension must be installed and the Zambretti forecast enabled. Config options available under this stanza are:
-
interval. Interval in seconds between requests by the Realtime gauge-data extension for the current Zambretti forecast. The Realtime gauge-data extension reads the current Zambretti forecast every interval seconds. The forecast extension controls how often the Zambretti forecast is updated. Optional, number. Default is 1800. Example usage:
-
max_tries. Maximum number of attempts to obtain the Zambretti forecast before giving up. Optional, number. Default is 3. Example usage:
max_tries = 3
-
retry_wait. Time to wait in seconds between attempts to read the Zambretti forecast. Optional, number. Default is 3. Example usage:
retry_wait = 3