nettigo-air-monitor
Python wrapper for getting air quality data from Nettigo Air Monitor devices.
Sensor.Community firmware is also supported.
How to use package
"""An example of using Nettigo Air Monitor package."""
import asyncio
import logging
from aiohttp import ClientConnectorError, ClientError, ClientSession
from tenacity import RetryError
from nettigo_air_monitor import (
ApiError,
AuthFailedError,
ConnectionOptions,
InvalidSensorDataError,
NettigoAirMonitor,
)
logging.basicConfig(level=logging.DEBUG)
HOST = "nam"
USERNAME = "user"
PASSWORD = "password"
async def main() -> None:
"""Run main function."""
options = ConnectionOptions(host=HOST, username=USERNAME, password=PASSWORD)
async with ClientSession() as websession:
nam = await NettigoAirMonitor.create(websession, options)
try:
data = await nam.async_update()
except (
TimeoutError,
ApiError,
AuthFailedError,
ClientConnectorError,
ClientError,
InvalidSensorDataError,
RetryError,
) as error:
print(f"Error: {error}")
else:
print(f"Firmware: {nam.software_version}")
print(f"MAC address: {nam.mac}")
print(f"Latitude: {nam.latitude}, Longitude: {nam.longitude}")
print(f"Data: {data}")
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
How to create a dev environment
git clone https://github.com/bieniu/nettigo-air-monitor.git
cd nettigo-air-monitor
./scripts/setup-local-env.sh
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nettigo_air_monitor-5.1.0.tar.gz.
File metadata
- Download URL: nettigo_air_monitor-5.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
000ace2c2f4dbb623a0cb28325a197b9684c6b95363bd52e422f2a5398526c20
|
|
| MD5 |
d783c844717554515626117bfd48559f
|
|
| BLAKE2b-256 |
9fabe951ec5b79127805ef7abbba36a246c4ec18e1c9f2d8d2563b8dae9b8697
|
Provenance
The following attestation bundles were made for nettigo_air_monitor-5.1.0.tar.gz:
Publisher:
publish.yml on bieniu/nettigo-air-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nettigo_air_monitor-5.1.0.tar.gz -
Subject digest:
000ace2c2f4dbb623a0cb28325a197b9684c6b95363bd52e422f2a5398526c20 - Sigstore transparency entry: 2571377253
- Sigstore integration time:
-
Permalink:
bieniu/nettigo-air-monitor@364c631cb2031e186b81810d44e6aa78645b875b -
Branch / Tag:
refs/tags/5.1.0 - Owner: https://github.com/bieniu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@364c631cb2031e186b81810d44e6aa78645b875b -
Trigger Event:
release
-
Statement type:
File details
Details for the file nettigo_air_monitor-5.1.0-py3-none-any.whl.
File metadata
- Download URL: nettigo_air_monitor-5.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87b1ccd663218eecd8c79aaeed95e72023e8f0d33cbe97d0cee14a7751307f3a
|
|
| MD5 |
38e99c9b3587835ab60c1682f23273dd
|
|
| BLAKE2b-256 |
b2346e43661edceab97f936c679c8a1c031e9ec1b0063038934916a6e21d6e29
|
Provenance
The following attestation bundles were made for nettigo_air_monitor-5.1.0-py3-none-any.whl:
Publisher:
publish.yml on bieniu/nettigo-air-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nettigo_air_monitor-5.1.0-py3-none-any.whl -
Subject digest:
87b1ccd663218eecd8c79aaeed95e72023e8f0d33cbe97d0cee14a7751307f3a - Sigstore transparency entry: 2571377443
- Sigstore integration time:
-
Permalink:
bieniu/nettigo-air-monitor@364c631cb2031e186b81810d44e6aa78645b875b -
Branch / Tag:
refs/tags/5.1.0 - Owner: https://github.com/bieniu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@364c631cb2031e186b81810d44e6aa78645b875b -
Trigger Event:
release
-
Statement type: