Skip to main content

Standalone async client for the rtl_433 WebSocket/HTTP API.

Project description

📻 pyrtl_433

A standalone, dependency-light async client for the rtl_433 HTTP server's WebSocket + /cmd API.

pyrtl_433 speaks the transport/protocol half of an rtl_433 receiver: it connects to one server over a WebSocket, parses the JSON event stream, and drives the HTTP /cmd endpoint that reports and controls the SDR configuration.

Deliberate non-scope: this is a client, not a policy engine. It does not include the Home Assistant integration's entity model, desired-state store, SDR adoption/enforcement, or availability watchdog. It emits normalized, replay-classified events and gives you the /cmd setter primitive plus the SDR value transforms — you build any higher-level policy on top.

Full documentation: https://rtl-433-hass.github.io/pyrtl_433/latest/

Install

This project is uv-first. Not yet published to PyPI; once it is:

uv add pyrtl_433

From a clone of this repository: uv pip install .. See the installation guide for pip and other options.

Quick start

Inject an aiohttp.ClientSession, construct the client, and consume events with async for event in client (or an on_event callback):

import asyncio

import aiohttp

from pyrtl_433 import Rtl433Client


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        client = Rtl433Client("192.0.2.10", session=session)
        await client.start()
        try:
            async for event in client:
                if event.is_replay:
                    continue  # already-seen / stale-gap frame; seed only, don't act
                print(event.device_key, event.model, event.fields)
        finally:
            await client.stop()


asyncio.run(main())

See the Quick Start guide for the callback style, the full constructor signature, and SDR /cmd writes.

Documentation

License

Apache-2.0. This library was extracted from the transport/protocol code of the rtl-433-hass/rtl_433 Home Assistant integration. See LICENSE and NOTICE for the source modules and attribution.

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

pyrtl_433-0.1.0.tar.gz (59.4 kB view details)

Uploaded Source

Built Distribution

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

pyrtl_433-0.1.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrtl_433-0.1.0.tar.gz
  • Upload date:
  • Size: 59.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyrtl_433-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c75de054d471aaa8e9c5c2591e018f674a208b7540e199d521c17ff8d517efff
MD5 0d14f32397a6e72f6f23d61c4b24a53d
BLAKE2b-256 cce788826c642bdb00d9c326cd98daf4a7c52073380ac4a9147975a2d49e43e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrtl_433-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on rtl-433-hass/pyrtl_433

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pyrtl_433-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyrtl_433-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f0709d881f48c6f8d6a9590db355f9c1400c033f26bcb955cdf263b442ec6d1
MD5 9ad8c876b50ca2ebffc25ce792da200e
BLAKE2b-256 25ebd113faef5e58fd11c5b71a126223794ede0ffec82c8123e85db858c74741

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrtl_433-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on rtl-433-hass/pyrtl_433

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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