Skip to main content

Davis WeatherLink

Read live weather from Davis Instruments stations — Vantage Pro2, Vantage Vue, and WeatherLink Live gateways — through the WeatherLink v2 cloud REST API. One GEM device represents a WeatherLink account (an API Key + Secret pair); each station on the account becomes a zone whose observation fields are published as attributes.

Davis is the premium choice for agriculture, vineyards, facilities, and high-end residential, so this driver is aimed at installs that already run a Vantage station and want wind, rain, and temperature to drive automations — close shades on high wind, skip irrigation after rain, log conditions to History.

Driver name

davis_weatherlink — set this as the device driver when adding the account in Devices.

Read-only

Davis stations report; they do not accept control commands. This driver's command surface is discovery + status reads only. There is no on/off/setpoint here.

Prerequisites

  • A Davis WeatherLink account with the station already commissioned and uploading. Confirm live data appears at weatherlink.com.
  • A WeatherLink v2 API Key + API Secret pair. Generate them at weatherlink.com → Account → API (the v2 / developer section). Use a per-deployment pair so it can be revoked without disturbing other integrations.
  • Outbound HTTPS from the GEM controller to api.weatherlink.com.

Setup steps

  1. Sign in at weatherlink.com and confirm the station is online and reporting.
  2. Go to Account → API and generate a v2 API Key and API Secret. Copy both — the Secret is shown once.
  3. In GEM open DevicesAdd Device and choose the Davis WeatherLink driver.
  4. Enter the API Key (api_key) and API Secret (api_secret). Both are stored encrypted.
  5. Save. Within ~10 seconds the device should show connected.
  6. Run get_stations to list every station on the account with its numeric station_id.
  7. Create one zone per station; set the zone address to that station_id.

Authentication

WeatherLink v2 authenticates with the API Key as a query parameter and the API Secret in an X-Api-Secret header — the driver handles both. The Secret is never placed in the URL. (The older HMAC api-signature scheme is deprecated by Davis and is not implemented here.)

Attribute reference

Device attributes

AttributeRequiredTypePurpose
api_keyyesstring (secure)v2 API Key. Sent as ?api-key=.
api_secretyesstring (secure)v2 API Secret. Sent in X-Api-Secret.
api_basenostringOverride the cloud root. Default https://api.weatherlink.com/v2.
units_systemnoenumimperial, metric, or both (default). Which unit copies to publish.
status_intervalnointObservation poll interval in ms. Default 60000.
request_timeoutnointHTTP timeout in ms. Default 15000.

Zone attributes (published by the poll loop)

AttributeTypeUnits
temperature_f / temperature_cfloat°F / °C
humidityfloat%
dew_point_f / heat_index_f / wind_chill_ffloat°F
wind_speed_mph / wind_speed_kphfloatmph / kph
wind_direction_degintdegrees
wind_gust_mphfloatmph (10-min high)
rain_rate_in_hrfloatin/hr
rain_day_in / rain_day_mmfloatinches / mm today
pressure_in_hg / pressure_mbfloatinHg / mb (sea level)
pressure_absolute_in_hgfloatinHg (station pressure)
solar_radiation_wm2intW/m²
uv_indexfloatUV index
observation_timestampintunix seconds of the newest sensor reading

The metric copies are only published when units_system is metric or both.

Zone address format

zone.address is the numeric station_id from get_stations. Most accounts have one station; its id is the integer at the top of the response.

Commands

CommandArgsNotes
get_stations / get_devicesDiscovery: list stations + ids.
get_status / get_observationaddressRead current conditions and refresh the zone.
refreshaddress (optional)Force an immediate poll for one station, or all zones if omitted.

Known limitations / what we don't yet support

  • Read-only. No control — Davis stations don't take commands.
  • Historic and archive endpoints are not wired. Only /current is polled. The v2 /historic/{station-id} endpoint (for backfilling History) is a future add.
  • Rainfall is model-dependent. When the payload exposes inch fields the driver uses them directly; when it only exposes rain "counts" plus a rain_size code it converts counts → inches (0.01 in / 0.2 mm / 0.1 mm / 0.001 in per tip). Verify rain totals against the WeatherLink dashboard on first install — collector size varies by region and this conversion should be confirmed on real hardware.
  • Field availability varies by station model. The current payload is a heterogeneous sensors[] array (ISS block, barometer block, sometimes leaf/soil or extra-temp). The driver merges every block and reads well-known Davis keys; a field a given station doesn't have simply won't appear.
  • Extra/auxiliary sensors (soil moisture, leaf wetness, additional temp/hum transmitters) are not individually mapped yet — only the headline ISS + barometer fields are surfaced.

Troubleshooting

SymptomLikely cause / fix
Connect error: login HTTP 401 / 403API Key or Secret wrong. Regenerate the pair at weatherlink.com → Account → API and update both attributes. Don't paste the Secret into the key field — the driver puts it in the header for you.
get_stations returns emptyThe key pair belongs to a different account, or the station isn't on this account. Confirm it appears on your weatherlink.com dashboard.
observation_timestamp far behind nowThe station stopped uploading (power/Wi-Fi/gateway down). Check station status in the WeatherLink app; the driver holds the last observation until the cloud catches up.
Rain totals look wrongSee the rainfall limitation above — compare against the dashboard and note the station model for a follow-up mapping.
Occasional HTTP 429The free tier rate-limits to about one request per station per minute. Raise status_interval to 60 s or more.