Skip to main content

An asynchronous Python library for controlling Global Caché iTach hardware devices

Project description

pyitach

Async Python library for discovering and controlling Global Caché iTach IP2IR devices.

pyitach provides low-level access to the Global Caché iTach TCP/IP protocol used by the:

  • Global Caché iTach IP2IR

The library is designed for asyncio-based applications and can be used independently of Home Assistant.


Features

  • Async TCP client
  • UDP multicast device discovery
  • IR command transmission
  • Device capability queries
  • Device identity queries
  • Typed Python package (py.typed)
  • No Home Assistant dependency

Installation

pip install pyitach

Requirements

  • Python 3.11+
  • asyncio-compatible environment

Supported Devices

The library is currently intended for:

  • Global Caché iTach IP2IR

Other Global Caché devices are not currently targeted or officially supported.


Quick Start

Connect to a Device

import asyncio

from pyitach import ItachClient


async def main() -> None:
    client = ItachClient("192.168.1.211")

    await client.async_connect()

    try:
        devices = await client.async_getdevices()

        print(devices)

    finally:
        await client.async_disconnect()


asyncio.run(main())

Sending IR Commands

import asyncio

from pyitach import ItachClient


async def main() -> None:
    client = ItachClient("192.168.1.211")

    await client.async_connect()

    try:
        await client.async_sendir(
            connector=1,
            command=(
                "sendir,1:1,1,38000,1,1,"
                "343,171,21,21,21,64"
            ),
        )

    finally:
        await client.async_disconnect()


asyncio.run(main())

Device Discovery

One-Shot Discovery

import asyncio

from pyitach.discovery import async_discover_once


async def main() -> None:
    beacon = await async_discover_once(timeout=5.0)

    print(beacon)


asyncio.run(main())

Discovery Listener

import asyncio

from pyitach.discovery import (
    ItachDiscoveryBeacon,
    ItachDiscoveryListener,
)


async def on_beacon(beacon: ItachDiscoveryBeacon) -> None:
    print(beacon)


async def main() -> None:
    listener = ItachDiscoveryListener(on_beacon)

    await listener.async_start()

    await asyncio.sleep(60)

    await listener.async_stop()


asyncio.run(main())

Development

Clone Repository

git clone https://github.com/<username>/pyitach.git
cd pyitach

Create Virtual Environment

python -m venv .venv
source .venv/bin/activate

Windows PowerShell:

.venv\Scripts\Activate.ps1

Install Development Dependencies

uv sync --group dev

Run Tests

pytest

Run Type Checking

mypy src tests

Build Package

python -m build

Project Structure

src/pyitach/
    __init__.py
    client.py
    protocol.py
    discovery.py
    capabilities.py
    identity.py
    exceptions.py

License

Apache-2.0


Disclaimer

Global Caché is a trademark of Global Caché, Inc.

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

pyitach-0.1.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyitach-0.1.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file pyitach-0.1.0.tar.gz.

File metadata

  • Download URL: pyitach-0.1.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyitach-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a61d2cfdb13338b91df0af5c868d26376ef0ad0ff96f6f033de5d117ebb7ed76
MD5 94436810593fc26904a8800243569c68
BLAKE2b-256 4d700ef34d727db06edd7157adeeb83c47a1d11b0e3d6d513375cf0ac676e7c0

See more details on using hashes here.

File details

Details for the file pyitach-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyitach-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyitach-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fd667b7a39c66984336f68eccab027af538bb06134850f44ae7e3f26df4df3c
MD5 21ce6caa6de50cfe999701bda40e6e45
BLAKE2b-256 5205c40c999f86cb8a112ffcb163a4036f9ea05707b038c994bd0b8f12ad2254

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page