Skip to main content

Client for Ruuvi Gateway

Project description

Ruuvi Gateway Client

Client for communicating with Ruuvi Gateway.

Install

Install latest released version

$ python -m pip install ruuvi-gateway-client

Install letest development version from local sources

python -m venv .venv
source .venv/bin/activate
python -m pip install -e .

Example

import asyncio
from ruuvi_gateway_client import gateway
from ruuvi_gateway_client.types import ParsedDatas

STATION_IP = "10.0.0.21"
USERNAME = "username"
PASSWORD = "password"


def print_data(data: ParsedDatas):
    for mac, sensor_data in data.items():
        print(f'{mac}: {sensor_data}')


async def main():
    fetch_result = await gateway.fetch_data(STATION_IP, USERNAME, PASSWORD)
    if fetch_result.is_ok():
        print_data(fetch_result.value)
    else:
        print(f'Fetch failed: {fetch_result.value}')

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

Changelog

Changelog

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Licensed under the MIT License.

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

ruuvi-gateway-client-0.1.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

ruuvi_gateway_client-0.1.0-py3-none-any.whl (5.3 kB view hashes)

Uploaded 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