Skip to main content

Unofficial package for Airthings Wave communication.

Project description

Build Status codecov PyPI version PyPI downloads

Wave Reader Utilities

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. The library wouldn't be possible without the existing efforts from Airthings and the community. See documentation for more information.

Features

  • Using bleak as a dependency for platform cross-compatibility and support for asynchronous operation.
  • Support for major models: Wave+, Wave, Wave (Version 2) and Wave Mini devices. View Plus is not supported, as it sends data over WiFi, not BTLE.
  • Code testing, coverage reporting, linting, type hinting, and formatting.
  • Provide a more comprehensive programming interface for a developer audience.
  • Auxillary module that provides a web client for Airthings API and OAuth2 authentication.

Requirements

In Ubuntu/Debian, make sure you have libglib2.0-dev and bluez installed:

sudo apt-get install libglib2.0-dev bluez -y

Other 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.

Installation

You can install the library by running:

pip install wave-reader

Example Usage

There 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 ...

Web API Client Module

The wave_reader/web module in this library provides a client for the Airthings web API. See this page for more details.

Contribution

If you identify a bug, please open a ticket. Pull requests are always welcome.

Testing

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wave-reader-1.0.2.tar.gz (44.4 kB view details)

Uploaded Source

Built Distribution

wave_reader-1.0.2-py3-none-any.whl (100.5 kB view details)

Uploaded Python 3

File details

Details for the file wave-reader-1.0.2.tar.gz.

File metadata

  • Download URL: wave-reader-1.0.2.tar.gz
  • Upload date:
  • Size: 44.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for wave-reader-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a63de99ec1c78e71aadc5825429d3fef942692c68a65ebc0586a4b62d7f2b28a
MD5 93ef3f88491d4b7014e4916d207541de
BLAKE2b-256 d864af83e287343143dd73bc786dae3a89066ab7300afa798b0dfe4a1c8f1961

See more details on using hashes here.

File details

Details for the file wave_reader-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: wave_reader-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 100.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for wave_reader-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5e3c70f2cf164e2d4c59550f1784f4bfcbc13fc7c83065f1ba1a5eb78603ad1
MD5 ac59c5ced0ed0772f74aea88bbfe420c
BLAKE2b-256 f44389a0c6fa337879029047b65cce5362256762c137b6c0c21c446cdf49ab4d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page