This package is currently in maintenance mode. Please use airthings-ble for new projects.
The Airthings Wave is a series of devices that track Radon levels in the home. Radon is a radioactive
gas that comes from the breakdown of uranium in soil and rock. It's invisible, odourless and tasteless.
This is an unofficial Airthings Wave community library designed to provide utilities for device and web communication.
bleak as a dependency for platform cross-compatibility and support for asynchronous operation.In Ubuntu/Debian, make sure you have libglib2.0-dev and bluez installed:
sudo apt-get install libglib2.0-dev bluez -yOther Linux distributions should have equivalent packages. In theory, other platforms
(Windows, Mac) are supported by using bleak as a dependency, but open a ticket
if you run into any issues.
You can install the library by running:
pip install wave-readerThere are various concrete examples available in the examples directory. That includes
CLI interaction and other interesting scenarios that demonstrate API usage.
import asyncio
from wave_reader import wave
if __name__ == "__main__":
# Scan for BTLE Wave devices.
devices = wave.scan()
# Event loop to run asynchronous tasks.
loop = asyncio.new_event_loop()
# Get sensor readings from available wave devices.
for d in devices:
sensor_readings = loop.run_until_complete(d.get_sensor_values())
print(sensor_readings)
# >>> DeviceSensors (humidity: 32.5, radon_sta: 116, radon_lta: 113 ...The wave_reader/web module in this library provides a client for the Airthings
web API. See this page for more details.
If you identify a bug, please open a ticket. Pull requests are always welcome.
You can run the entire test suite by running tox. It will run flake8, isort and pytest.
If you'd like to just run unit tests, running pytest ./tests is sufficient.