Davis WeatherLink
The Davis WeatherLink integration lets Cloud Studio IoT read Davis Instruments weather stations from the WeatherLink cloud, through its v2 API. The stations keep reporting to WeatherLink as they do today. The station owner creates the keys in their own account and can revoke them at any time.
Requirements
- A weatherlink.com account with the stations.
- The station ID of each station (see below for how to get it).
- Access to Gear Manager with permissions on the client.
- A device model for Davis stations, with code
AWS-WEATHERLINK, whose parser script maps the API fields to endpoints.
It works with any hardware that reports to the WeatherLink cloud, such as a WeatherLink Live, a Vantage Pro2 or Vantage Vue with a data logger, or an EnviroMonitor node.
1. Generate the v2 key on weatherlink.com
Sign in to weatherlink.com, open the Account page and click Generate v2 Key. You get an API Key and an API Secret. Keep the secret private: the platform sends it in the X-Api-Secret header and never in the URL, so it is not written to any log. Davis explains it in its v2 API tutorial.
2. Get the station ID
Each station has a numeric station ID. The API returns it in GET https://api.weatherlink.com/v2/stations?api-key=<your API Key>, with the API Secret in the X-Api-Secret header. Write down the station_id of each station you want to connect.
3. Set up the integration in Gear Manager
Open the client in Gear Manager and go to the Integrations tab. Under Davis WeatherLink Weather Stations, fill in:
- API v2 Key: the key you generated.
- API v2 Secret: that key's secret.
- Polling interval (minutes): how often the stations are read. 5 by default.
4. Register the stations
Create one device per station with:
- Model: the device model for Davis stations (code
AWS-WEATHERLINK). - Address: the station ID.
The model's parser script receives the current conditions JSON. The response comes in sensor blocks, each identified by its sensor_type, and its shape depends on the hardware behind the account. The script assigns each value to its endpoint and converts the units, because the v2 API always answers in US customary units: °F to °C, inHg to hPa, inches to mm and mph to m/s.
API limits
Davis caps usage at two calls per second and 300 per hour per key. The platform polls the stations one at a time, with a pause between them, and makes one call per station on each pass. With the 5-minute interval that is 12 calls per hour per station, so one key covers about 25 stations. If you have more, raise the interval.
History
This integration reads current conditions. It does not import history: WeatherLink only serves it to stations with a Pro plan, 24 hours per call.
Check that it works
After the polling interval, the device shows its latest reading.
Last updated on