Code Monkey home page Code Monkey logo

python_awair's Introduction

python_awair

Latest PyPI version CI codecov Documentation Status

This is an async library which accesses portions of the Awair REST API. It exists primarily to support the Home Assistant integration, but is considered active and supported by its author. PRs welcome!

Features:

  • Object-oriented approach to querying and handling data
  • Supports the "user" portion of the API.
  • Possible to list devices, user information, and to query for a variety of sensor data over various timeframes.

Not yet supported:

  • Device API usage
  • Organization API
  • Device management (such as changing the display of a device)

Dive into our documentation to get started!

Development

  • We manage dependencies and builds via poetry
  • We use pytest and tox to test
  • A variety of linters are available and CI enforces them

After installing and configuring poetry:

  • Run poetry install to install dev dependencies
  • Run poetry shell to drop into a virtualenv
  • Run poetry run tox (or just tox if you're in a virtualenv) to test
    • Run poetry run tox -e lint (or just tox -e lint if you're in a virtualenv) to run linters.

python_awair's People

Contributors

ahayworth avatar bpowers avatar deanlyoung avatar dependabot[bot] avatar fabaff avatar michaing avatar zachberger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python_awair's Issues

"Local sensors" support

Apparently Awair is starting to support reading the sensor data from the devices directly, via LAN, rather than only through their cloud. See this document (linked from the API documentation) for details.

It roughly looks like this, though not every attribute is returned for all devices:

GET http://192.168.1.1/air-data/latest


{"timestamp":"2020-06-30T23:30:19.577Z","score":95,"temp":26.04,"humid":46.4,"co2":487,"voc":88,"pm25":8,"lux":27.9,"spl_a":52.4}

It's currently in beta for consumer devices, and supported in their enterprise deployments. I'm not expecting it to be added to the library immediately, but wanted to capture the details.

Requirement is pinned for python-awair 0.1.1 - 0.2.0: aiohttp>=3.6.1,<3.7.0

Home Assistant currently depends on python-awair 0.1.1. When a new release is done where this is addressed it would be good to also bump the version used in Home Assistant.

Thanks for your support of Home Assistant!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.