Understanding Ecowitt LAN Wi Fi Gateway API radiation fields - gjr80/weewx-gw1000 GitHub Wiki

Understanding Ecowitt LAN/Wi-Fi Gateway API radiation fields

Gateway device operation

When associated with a suitable station/sensor the gateway device makes available three radiation related fields. The API documentation identifies these fields as:

  • Light. Light is measured in lux. This field would appear to be the equivalent of the WeeWX field luminosity used in the extended schema.

  • UV. UV is measured in μW/m2. Whilst no further detail is provided by Ecowitt the UV field appears to be an absolute UV radiation flux value. There is no direct equivalent field in the WeeWX legacy or extended schema.

Note: The Ecowitt UV field is not equivalent to the WeeWX radiation field. The Ecowitt UV field is expressed in μW/m2 with the maximum value being 65 535μW/m2. The WeeWX radiation field is commonly accepted to represent a solar insolation value and is typically measured in hundreds of W/m2.

  • UVI. UVI is an index from 0 to 15 inclusive. Whist Ecowitt provides no detail of the standard applied or means of calculation of UVI, this field appears to be the equivalent of the WeeWX field UV used in both the legacy and extended schemas.

When a gateway device associated with a suitable station/sensor is set to upload Ecowitt.net, WeatherUnderground (WU) or to a remote server in either Ecowitt or WU format the uploaded data will include a radiation or solar insolation field. This radiation value is not measured directly by a solar insolation sensor, rather it is derived by the gateway device from the previously mentioned Light value in lux by dividing by 126.7.

WeeWX Gateway Device driver operation

If a suitable station/sensor is associated with the Ecowitt gateway device the Ecowitt gateway driver can decode and make available via loop packets each of the above three radiation related fields. By convention the above fields are stored internally in the Ecowitt gateway driver as light, uv and uvi. When the Ecowitt gateway driver is used with the default field map these fields are mapped to WeeWX loop packet fields as follows:

  • light is mapped to the WeeWX field luminosity;

  • uv is mapped to the WeeWX field uvradiation to prevent confusion with the WeeWX UV field and as the uv field has no equivalent field in the WeeWX legacy or extended schemas; and

Note: The uvradiation field emitted by the Ecowitt gateway driver using the default field map is not equivalent to the WeeWX radiation field.

  • uvi is mapped to the WeeWX field UV.

This mapping is summarised in the following table"

Ecowitt LAN/Wi-Fi Gateway API

field

Ecowitt Gateway driver

field

WeeWX field

(default map)

Comments
Light light luminosity Value in lux.
UV uvradiation uvradiation No direct equivalent in the WeeWX legacy or extended schemas. Value in μW/m2.
UVI uv UV Index 0-15.

Adding a calculated radiation field to WeeWX loop packets

Just as the Ecowitt gateway device derives a radiation value from the light field, the WeeWX StdCalibrate service can be used to similarly derive a radiation value for insertion into WeeWX loop packets. To set the StdCalibrate service to derive radiation:

  1. edit weewx.conf and locate the [StdCalibrate] [[Corrections]] stanza

  2. add the following entry to the [[Corrections]] stanza:

    radiation = luminosity/126.7 if luminosity is not None else None

  3. save weewx.conf

  4. restart WeeWX

WeeWX should now calculate a radiation value based on the luminosity field value in each loop packet. The calculated value is then added to the loop packet as WeeWX field radiation. If the luminosity field is missing from the loop packet, for example you do not have a station/sensor that provides the light value, the radiation value is not calculated and nothing is added to the loop packet. If the luminosity field has a value of None then radiation will be calculated as None and field radiation will be added to the loop packet with a value of None.

Note: The above instructions assume the light value is mapped to the WeeWX field luminosity. If the field mapping has been altered and the light value is mapped to a different WeeWX field then that field name must be used in place of luminosity in the entry added to the [[Corrections]] stanza.

⚠️ **GitHub.com Fallback** ⚠️