WeatherLink Live Local Python API
Python library to read weather data from a Davis WeatherLink Live station + connected sensors (e.g. Vantage Vue). Features:
- discover WeatherLink Live stations in the local network
- read sensor values (called conditions) using the local API - no internet connection required
Although the WeatherLink Live stations are tighly coupled with the web service weatherlink.com, it can be used in offline situations aswell. The well designed HTTP interface makes it easy to read the current weather data via the local network - perfect for IoT / SmartHome applications. In fact, I couldn't find any other commercial weather station with an open ethernet-based protocol (please correct me if I'm wrong).
To set up the WeatherLink Live stations, you need the Davis WeatherLink app (Android, iOS) and a weatherlink.com account. Further sensors can be connected to the station. Afterwards, the weather data is accessible via weatherlink.com (if online) and the local API.
Documentation
Python library: https://weatherlink-live-local-python.rtfd.io/
API specification: https://weatherlink.github.io/weatherlink-live-local-api/
Install
pip install weatherlink-live-local
Example
import weatherlink_live_local as wlll
devices = wlll.discover()
print(devices)
# select first device, get IP address
ip_first_device = devices[0].ip_addresses[0]
# specify units
units = wlll.Units(
temperature=wlll.TemperatureUnit.CELSIUS,
pressure=wlll.PressureUnit.HECTOPASCAL,
rain=wlll.RainUnit.MILLIMETER,
wind_speed=wlll.WindSpeedUnit.METER_PER_SECOND,
)
# poll sensor data / conditions
while True:
conditions = wlll.get_conditions(ip_first_device, units=units)
print(f"Inside temperature: {conditions.inside.temp:.2f} °C")
print(f"Outside temperature: {conditions.integrated_sensor_suites[0].temp:.2f} °C")
time.sleep(10)
Release files for weatherlink-live-local 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| weatherlink_live_local-0.4.0.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| weatherlink_live_local-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.4 kB
Release files / weatherlink_live_local-0.4.0.tar.gz
| Download URL | weatherlink_live_local-0.4.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56b7da37f74cdc34ea29deca80a677837d7de5d9f6200acd138d9744ffbacb23
|
|
BLAKE2b-256 checksum How to use checksums |
4bb217db00f925706cea14a4dd764bbe78e12b0085381c5a5cc27d6f1fa914fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.2
|
Release files / weatherlink_live_local-0.4.0-py3-none-any.whl
| Download URL | weatherlink_live_local-0.4.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d543d4c43a20020d0aab5320cfeb4d58eb81bf73517d9f9da75fd4202b2f87a
|
|
BLAKE2b-256 checksum How to use checksums |
cd4f8fe392d0803152f6cd9cf75c4566febd4b4b67e6cfafed5987ceb3587602
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.2
|