Skip to main content

Python wrapper for getting air quality data from Nettigo Air Monitor devices.

Project description

GitHub Release PyPI PyPI - Downloads Buy me a coffee PayPal_Me

nettigo-air-monitor

Python wrapper for getting air quality data from Nettigo Air Monitor devices.

How to use package

import asyncio
import logging

import async_timeout
from aiohttp import ClientError, ClientSession

from nettigo_air_monitor import ApiError, InvalidSensorData, NettigoAirMonitor

HOST = "192.168.172.12"

logging.basicConfig(level=logging.DEBUG)


async def main():
    try:
        async with ClientSession() as websession, async_timeout.timeout(30):
            nam = NettigoAirMonitor(websession, HOST)
            
            data = await nam.async_update()
            mac = await nam.async_get_mac_address()
    except (
        asyncio.exceptions.TimeoutError,
        ApiError,
        ClientError,
        InvalidSensorData,
    ) as error:
        print(f"Error: {error}")
    else:
        print(f"Firmware: {nam.software_version}")
        print(f"MAC address: {mac}")
        print(f"Data: {data}")


loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

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

nettigo_air_monitor-1.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

nettigo_air_monitor-1.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file nettigo_air_monitor-1.1.0.tar.gz.

File metadata

  • Download URL: nettigo_air_monitor-1.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nettigo_air_monitor-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8cebf932ae0462840896b7c4d9d622222209fc73cfebe6ced70340441bd59152
MD5 8e5ae3de524ec0db89e30e796d7e1386
BLAKE2b-256 db3a6fc7730536fb1c8e6ba8ae2a7f02f7d89e559a05765c736694e7ed8506e5

See more details on using hashes here.

File details

Details for the file nettigo_air_monitor-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: nettigo_air_monitor-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nettigo_air_monitor-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 203edc55a5a5f712ffdcf5e8f4a7e3931bdcad3838efce2535b7a8999a02bb16
MD5 398124faa575cab92b04edf086278e45
BLAKE2b-256 2405db37cc611edb354c2b66256c93b765569689032a04dbb74d2030e0fa6764

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