https://github.com/lukasberbuer/weatherlink-live-local-python
Read current weather data from Davis® WeatherLink Live units + connected sensors
https://github.com/lukasberbuer/weatherlink-live-local-python
davis python weatherlink weatherstation
Last synced: 11 days ago
JSON representation
Read current weather data from Davis® WeatherLink Live units + connected sensors
- Host: GitHub
- URL: https://github.com/lukasberbuer/weatherlink-live-local-python
- Owner: lukasberbuer
- License: mit
- Created: 2020-12-23T00:25:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-06T08:31:09.000Z (3 months ago)
- Last Synced: 2025-05-07T03:45:33.394Z (11 days ago)
- Topics: davis, python, weatherlink, weatherstation
- Language: Python
- Homepage: https://weatherlink-live-local-python.rtfd.io
- Size: 122 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# WeatherLink Live Local Python API
[](https://github.com/lukasberbuer/weatherlink-live-local-python/actions)
[](https://weatherlink-live-local-python.readthedocs.io/en/latest/?badge=latest)
[](https://coveralls.io/github/lukasberbuer/weatherlink-live-local-python?branch=master)
[](https://opensource.org/licenses/MIT)
[](https://pypi.org/project/weatherlink_live_local)
[](https://pypi.org/project/weatherlink_live_local)
[](https://github.com/charliermarsh/ruff)Python library to read weather data from a [Davis WeatherLink Live station](https://www.davisinstruments.com/weatherlinklive/) + connected sensors (e.g. [Vantage Vue](https://www.davisinstruments.com/vantage-vue/)). Features:
- discover WeatherLink Live stations in the local network
- read sensor values (called conditions) using the **local** API - no internet connection requiredAlthough the WeatherLink Live stations are tighly coupled with the web service [weatherlink.com](https://www.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](https://play.google.com/store/apps/details?id=com.davisinstruments.weatherlink), [iOS](https://apps.apple.com/us/app/weatherlink/id1304504954)) 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
```python
import weatherlink_live_local as wllldevices = 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)
```