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.1.tar.gz (60.3 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.1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrtl_433-0.1.1.tar.gz
  • Upload date:
  • Size: 60.3 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.1.tar.gz
Algorithm Hash digest
SHA256 7bd1c5db0a1862d9260173624888fc97e7c304d92246127b7a0eb1cea98c4182
MD5 85d07757ceca3d040b1f188a4537496c
BLAKE2b-256 69837a338b54d8c8ac5e469d7aae6288575a04c5604e5828eca06cd7c24c546c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrtl_433-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pyrtl_433-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a07e4f64d5dc55d7107a1f020407c23585736c603c89e0128fc0209b0036724a
MD5 1701b48451632eaa171f3c8c3f16bf73
BLAKE2b-256 4e9aa55a4192632674456542e9bf580919a98a563282182ee3346910b32247d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrtl_433-0.1.1-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