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.
davis_weatherlink — set this as the device driver when adding the account in
Devices.
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
- Sign in at weatherlink.com and confirm the station is online and reporting.
- Go to Account → API and generate a v2 API Key and API Secret. Copy both — the Secret is shown once.
- In GEM open Devices → Add Device and choose the Davis WeatherLink driver.
- Enter the API Key (
api_key) and API Secret (api_secret). Both are stored encrypted. - Save. Within ~10 seconds the device should show connected.
- Run get_stations to list every station on the account with its numeric
station_id. - 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
| Attribute | Required | Type | Purpose |
|---|---|---|---|
api_key | yes | string (secure) | v2 API Key. Sent as ?api-key=. |
api_secret | yes | string (secure) | v2 API Secret. Sent in X-Api-Secret. |
api_base | no | string | Override the cloud root. Default https://api.weatherlink.com/v2. |
units_system | no | enum | imperial, metric, or both (default). Which unit copies to publish. |
status_interval | no | int | Observation poll interval in ms. Default 60000. |
request_timeout | no | int | HTTP timeout in ms. Default 15000. |
Zone attributes (published by the poll loop)
| Attribute | Type | Units |
|---|---|---|
temperature_f / temperature_c | float | °F / °C |
humidity | float | % |
dew_point_f / heat_index_f / wind_chill_f | float | °F |
wind_speed_mph / wind_speed_kph | float | mph / kph |
wind_direction_deg | int | degrees |
wind_gust_mph | float | mph (10-min high) |
rain_rate_in_hr | float | in/hr |
rain_day_in / rain_day_mm | float | inches / mm today |
pressure_in_hg / pressure_mb | float | inHg / mb (sea level) |
pressure_absolute_in_hg | float | inHg (station pressure) |
solar_radiation_wm2 | int | W/m² |
uv_index | float | UV index |
observation_timestamp | int | unix 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
| Command | Args | Notes |
|---|---|---|
get_stations / get_devices | — | Discovery: list stations + ids. |
get_status / get_observation | address | Read current conditions and refresh the zone. |
refresh | address (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
/currentis 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_sizecode 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
| Symptom | Likely cause / fix |
|---|---|
| Connect error: login HTTP 401 / 403 | API 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 empty | The 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 now | The 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 wrong | See the rainfall limitation above — compare against the dashboard and note the station model for a follow-up mapping. |
| Occasional HTTP 429 | The free tier rate-limits to about one request per station per minute. Raise status_interval to 60 s or more. |