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:
last
: int : Get last n entriesstart
: datetime : Get entries after specified timeend
: datetime : Get entries before specified timetemp
: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aranet4-2.0.3.tar.gz
(10.2 kB
view hashes)