Metadata-Version: 2.4
Name: pyrtl_433
Version: 0.1.1
Summary: Standalone async client for the rtl_433 WebSocket/HTTP API.
Author: Andrew Berry
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/rtl-433-hass/pyrtl_433
Project-URL: Repository, https://github.com/rtl-433-hass/pyrtl_433
Project-URL: Documentation, https://rtl-433-hass.github.io/pyrtl_433/
Project-URL: Issues, https://github.com/rtl-433-hass/pyrtl_433/issues
Keywords: rtl_433,rtl-sdr,websocket,aiohttp,asyncio,sdr
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Home Automation
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: aiohttp
Dynamic: license-file

# 📻 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](https://docs.astral.sh/uv/)-first. Not yet published to
PyPI; once it is:

```sh
uv add pyrtl_433
```

From a clone of this repository: `uv pip install .`. See the
[installation guide](https://rtl-433-hass.github.io/pyrtl_433/latest/installation/)
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):

```python
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](https://rtl-433-hass.github.io/pyrtl_433/latest/quickstart/) guide
for the callback style, the full constructor signature, and SDR `/cmd` writes.

## Documentation

- [Full documentation](https://rtl-433-hass.github.io/pyrtl_433/latest/)
- [Quick Start](https://rtl-433-hass.github.io/pyrtl_433/latest/quickstart/)
- [API Reference](https://rtl-433-hass.github.io/pyrtl_433/latest/api-reference/)
- [Protocol Reference](https://rtl-433-hass.github.io/pyrtl_433/latest/protocol-reference/)
- [Development](https://rtl-433-hass.github.io/pyrtl_433/latest/development/)
- [Issue tracker](https://github.com/rtl-433-hass/pyrtl_433/issues)

## 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`](LICENSE) and
[`NOTICE`](NOTICE) for the source modules and attribution.
