Skip to main content

Aranet4 Python client

Project description

Aranet4 Python client

Functions

get_current_readings(mac_address: str) -> client.CurrentReading

Get from the device the current measurements

Returns CurrentReading object:

class CurrentReading:
    name: str = ""
    version: str = ""
    temperature: float = -1
    humidity: int = -1
    pressure: float = -1
    co2: int = -1
    battery: int = -1
    status: int = -1
    interval: int = -1
    ago: int = -1
    stored: int = -1

get_all_records(mac_address: str, entry_filter: dict) -> client.Record

Get stored datapoints from device. Apply any filters requested

entry_filter is a dictionary that can have the following values:

  • l: int : Get last n entries
  • start: datetime : Get entries after specified time
  • end: datetime : Get entries before specified time
  • temp: bool : Get temperature data points (default = True)
  • humi: bool : Get humidity data points (default = True)
  • pres: bool : Get pressure data points (default = True)
  • co2: bool : Get co2 data points (default = True)

Returns CurrentReading object:

class Record:
    name: str
    version: str
    records_on_device: int
    filter: Filter
    value: List[RecordItem] = field(default_factory=list)

Which includes these objects:

class RecordItem:

    date: datetime
    temperature: float
    humidity: int
    pressure: float
    co2: int

class Filter:
    begin: int
    end: int
    incl_temperature: bool
    incl_humidity: bool
    incl_pressure: bool
    incl_co2: bool

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

aranet4-2.0.0-py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 3

aranet4-2.0.0-py2.py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 2 Python 3

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