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"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-0.2.5.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

nettigo_air_monitor-0.2.5-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nettigo_air_monitor-0.2.5.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for nettigo_air_monitor-0.2.5.tar.gz
Algorithm Hash digest
SHA256 e86a95b736710a1ff013f7bd0f8740fc96302161ed5de78297e6a79c8952589d
MD5 2573bff7549ead5968cfe615a4b18edf
BLAKE2b-256 018528741f7571d3a833a3200319fd9a05956439dc55e71e73a6458a4a1045bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nettigo_air_monitor-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for nettigo_air_monitor-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec18b45574b5537a81aae7523917f6748fec32e4525846fd98d99c38228d2d6
MD5 ca0101e64d6e929e013d1de123ee5e88
BLAKE2b-256 f95b2573791a24f6c5c1857be7da2758b7b0a671cba204749fe2c5d3bb129cc6

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