Skip to main content

Python driver for Omega iTHX-W and iBTHX-W transmitters.

Project description

omega-tx

NOTE: This is in very early stages of development.

Python ≥3.8 driver and command-line tool for Omega ITHX and IBTHX transmitters.

Installation

python3 pip install omega-tx

Usage

Command Line

omega-tx <MODEL> 192.178.6.12 --port 2000 --timeout 1.0 --unit_system metric

where MODEL is either ibthx or ithx

Python

This driver uses Python ≥3.8's async/await syntax to asynchronously communicate with the transmitter. For example:

import asyncio
from omega_tx import Barometer

async def read_once():
    async with Barometer('the-tx-ip-address', 'the-tx-port') as tx:
        print(await tx.get())

asyncio.run(read_once())

Returns:

{
    "Dewpoint in °C": 10.9,
    "Humidity in %": 35.9,
    "Pressure in mbar/hPa": 996.0,
    "Pressure in mmHg": 747.1,
    "Temperature in °C": 27.3,
}

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

omega-tx-0.2.1.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

omega_tx-0.2.1-py3-none-any.whl (14.4 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