Skip to content

Available Config Options

gary edited this page Feb 7, 2024 · 12 revisions

Available Config options

The operation of Ecowitt Gateway driver is controlled by the use of config options in the [GW1000] stanza in weewx.conf. The Ecowitt Gateway driver has been designed to operate with a number of sane defaults and hence only a minimal number of config options need be specified (when operated as a driver the only essential config option is the driver option and there are no essential config options when operated as a WeeWX service). Most of the config options apply whether the Ecowitt Gateway driver is operated as a driver or as a service, but some apply only when the Ecowitt Gateway driver is operated as a driver or as a WeeWX service.

The available config options that may be used within the [GW1000] stanza in weewx.conf are outlined below.

When operated as a driver

The Ecowitt Gateway driver supports the following config option in the [GW1000] stanza in weewx.conf when operated as a driver only:

driver. The location of the Ecowitt Gateway driver file. Mandatory, string. Example usage:

driver = user.gw1000

Note: The Ecowitt Gateway driver ignores the driver config option when run as a WeeWX service. Consequently, if it already exists, the driver option may be safely left in the [GW1000] stanza in weewx.conf when the Ecowitt Gateway driver is run as a WeeWX service.

When operated as a driver or as a WeeWX service

The Ecowitt Gateway driver supports the following configuration options in the [GW1000] stanza in weewx.conf when operated as a driver or as a WeeWX service:

ip_address. IP address of the gateway device. There is no default, if ip_address is not specified the Ecowitt Gateway driver will attempt to locate gateway devices on the local network and use the first device found. Optional, string. Example usage:

ip_address = 192.168.0.100

port. Port number used when communicating with the gateway device. Optional, number. Default is 45000. Example usage:

port = 45000

poll_interval. Interval in seconds used to poll the gateway device for data. Optional, number. Default is 60. Example usage:

poll_interval = 60 

broadcast_address. The IP address to be used when sending a UDP broadcast to identify gateway devices on the network. Optional, string. Default is 255.255.255.255. Example usage:

broadcast_address = 255.255.255.255  

broadcast_port. The port number to be used when sending a UDP broadcast to identify gateway devices on the network. Optional, number. Default is 46000. Example usage:

broadcast_port = 46000

broadcast_timeout. Timeout period in seconds used when sending a UDP to identify gateway devices on the network. Optional, number. Default is 5. Example usage:

broadcast_timeout = 2

socket_timeout. Timeout period in seconds used when sending a UDP broadcast or sending a command to the gateway device. Optional, number. Default is 2. Example usage:

socket_timeout = 2

max_tries. Number of times a command will be issued to the gateway device before aborting if no valid response is received. Optional, number. Default is 3. Example usage:

max_tries = 3 

retry_wait. Wait time in seconds between attempts to obtain a response from the gateway device. Optional, number. Default is 10. Example usage:

retry_wait = 10 

field_map. The mapping of gateway device fields to WeeWX fields. This setting overrides the default Ecowitt Gateway driver field map. Optional. Example usage:

[[field_map]]
    outTemp = temp1
    outHumidity = humid1

would map gateway device field temp1 (WH31 channel 1) to WeeWX field outTemp and gateway device field humid1 (WH31 channel 1) to WeeWX field outHumidity. The field map used by the driver will consist of these entries only and consequently the only gateway device provided observations included in the emitted loop packet will be outTemp and outHumidity.

Note: As the [[field_map]] option overrides the entire default field map it may be easier to use the [[field_map_extensions]] option if there is a need to change only a few field map entries.

field_map_extensions. Changes to the default Ecowitt Gateway driver field map. Rather than using the field_map option to override the entire default Ecowitt Gateway driver field map, the field_map_extensions option can be used to alter one or more default field map entries. A default field map entry can be altered by simply redefining it. Optional. Example usage:

[[field_map_extensions]]
    outTemp = temp8

would override the default mapping of GW1000 field temp8 (WH31 channel 8) to WeeWX field extraTemp8 and instead map gateway device field temp8 to WeeWX field outTemp. The previous default mapping of gateway device field temp8 to WeeWX field extraTemp8 will be removed from the field map but all other field map entries will remain as is.

wh32. Whether a WH32 sensor is used for outdoor temperature and humidity. This setting is used to control the field names used for battery and signal state reporting for any connected dedicated outdoor temperature and humidity sensor. Setting to True will cause any dedicated connected dedicated outdoor temperature and humidity sensor and it's battery and signal state fields to be labelled as a WH32, setting to False will cause them to be labelled WH26. The Gateway driver will always display outdoor temperature and humidity data correctly irrespective of this setting or the sensor being used for outdoor temperature and humidity. Optional, boolean. Default is True. Example usage:

wh32 = False

ignore_legacy_wh40_battery. Whether to ignore battery state data from legacy WH40 sensors that do not report valid battery state data. Early WH40 sensor did not report battery state data but API versions up to and including v1.6.4 reported WH40 battery state data via a single bit. API v1.6.5 reports WH40 battery state as a constant value of 1.6V. Later WH40 return battery state voltage in 10mV increments (not 100mV as stated in the API) and consequently later model WH40 report a battery state voltage 10 times the actual value. Based on this WH40 that report 1.6V are considered legacy WH40 reporting bogus battery state data. Optional, boolean. Default is True. Example usage:

ignore_legacy_wh40_battery = False

show_all_batt. Whether to show battery and signal state data for all sensors irrespective of signal state value or to only show battery and signal state data for sensors with a signal state value > 0. Sometimes sensors with a signal state value of 0 (ie no successful connections in the last four attempts) contain battery state data. Optional, boolean. Default is False. Example usage:

show_all_batt = False

log_unknown_fields. Whether unknown fields in certain gateway device API command responses are logged at the info or debug level. Setting to True will cause unknown fields to be logged at the info level, setting to False will cause unknown fields to be logged at the debug level. Optional, boolean. Default is False. Example usage:

log_unknown_fields = True

debug_rain. Includes additional rain related information in the log to assist in the debugging of rain related issues. This config option is independent of the WeeWX debug config option and is useful for obtaining just gateway device rain related debug output. Optional, boolean. Default is False. Example usage:

debug_rain = True

debug_wind. Includes additional wind related information in the log to assist in the debugging of wind related issues. This config option is independent of the WeeWX debug config option and is useful for obtaining just gateway device wind related debug output. Optional, boolean. Default is False. Example usage:

debug_wind = True

debug_loop. Includes additional information in the log to assist in the debugging of loop packet data related issues. This config option is independent of the WeeWX debug config option and is useful for obtaining just gateway device debug output. Optional, boolean. Default is False. Example usage:

debug_loop = True

debug_sensors. Includes additional information in the log to assist in the debugging of sensor identification and connection issues. This config option is independent of the WeeWX debug config option and is useful for obtaining just gateway device debug output. Optional, boolean. Default is False. Example usage:

debug_sensors = True

firmware_update_check_interval. Interval in seconds between checks for available gateway device firmware updates. Optional, number. Default is 86400 (24 hours). Example usage:

firmware_update_check_interval = 604800

log_firmware_update_avail. Whether to log that a gateway device firmware update is available. Setting to False disable firmware update checks. Optional, boolean. Default is False. Example usage:

log_firmware_update_avail = True

When operated as a service

The Ecowitt Gateway driver supports the following config option in the [GW1000] stanza in weewx.conf when operated as a WeeWX service only:

max_age. Maximum age of gateway device data in seconds before the data is considered stale and discarded. Optional, number. Default is 60. Example usage:

max_age = 60

Note: The Ecowitt Gateway driver ignores the max_age config option when run as a driver. Consequently, if it already exists, the max_age option may be safely left in the [GW1000] stanza in weewx.conf when the Ecowitt Gateway driver is run as a driver.

lost_contact_log_period. Minimum period in seconds between 'lost contact' log entries during an extended lost contact period with the gateway device. This setting prevents the log being filled with entries every poll interval indicating the gateway device cannot be contacted during, for example, network outages. Set to 0 to log all lost contact events. Optional, number. Default is 21600 (6 hours). Example usage:

lost_contact_log_period = 3600

Note: The Ecowitt Gateway driver ignores the lost_contact_log_period config option when run as a driver. Consequently, if it already exists, the lost_contact_log_period option may be safely left in the [GW1000] stanza in weewx.conf when the Ecowitt Gateway driver is run as a driver.