pyrainbird
Rain Bird Controller
What it is and what it does
pyrainbird is an async Python client for Rain Bird WiFi LNK irrigation controllers. It communicates directly with LNK1 (HTTP, port 80) and LNK2 (HTTPS, port 443) modules over local IP to query and control irrigation zones, retrieve controller settings, and manage active programs. The library handles the device password-based payload encryption and implements inter-request pacing (100ms default) and exponential backoff retry logic to work around hardware constraints in modern LNK2 modules that synchronize with Rain Bird's cloud every 5 minutes.
The package depends on aiohttp for async HTTP, pycryptodome for encryption, PyYAML and mashumaro for configuration parsing, python-dateutil for scheduling, ical for calendar handling, and aiohttp_retry for resilient requests. It supports a range of Rain Bird controllers with varying protocol families: Tier 1 (ESP-TM2, fully tested), Tier 2 (ESP-Me, RC2, ARC8, likely to work), and Tier 3 (ESP-RZXe, LXME2, TBOS-BT, untested with higher risk of compatibility issues).
Use it for:
- Automate sprinkler schedules and manually trigger zones from a home automation platform or custom app.
- Monitor active irrigation zones and controller state in real-time for diagnostics or water usage tracking.
- Build a command-line tool or dashboard to query and control multiple Rain Bird controllers on a local network.
- Integrate irrigation control into a broader smart-home system that manages outdoor watering based on weather or soil sensors.
- Test and debug Rain Bird controller behavior by querying raw API responses and device state.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Communicates with Rain Bird WiFi LNK irrigation controllers over local IP to start/stop zones, query state, and manage settings via async Python.
Yes, if you own a compatible Rain Bird LNK1 or LNK2 controller and need local async control from Python. Active maintenance, no known vulnerabilities, and low install friction make it a solid choice. Verify your controller model against the Tier 1/2/3 support matrix first; Tier 3 devices carry higher compatibility risk. Requires Python 3.13+.
Install
pyrainbird on PyPI
pip
pip install pyrainbirduv
uv add pyrainbirdpoetry
poetry add pyrainbirdInstalling pyrainbird
Before you install
Low friction install with 7 runtime dependencies. Active maintenance: last commit 2026-08-14, 39 days since latest release. Repository has 77 stars and is not archived.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
import asyncio
import aiohttp
from pyrainbird import async_client
async def main():
async with aiohttp.ClientSession() as session:
controller = await async_client.create_controller(
session, "192.168.1.1", "password"
)
zones = await controller.get_available_stations()
states = await controller.get_zone_states()
asyncio.run(main())
Requires Python 3.13 or later; controller must be reachable on local network at a known IP address.
Verify before relying
- Whether LNK1 plaintext HTTP communication is acceptable for your network security posture
- Compatibility with your specific Rain Bird controller model (see Tier 1/2/3 support matrix in docs)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.13) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — pycryptodome, PyYAML, mashumaro, python-dateutil, ical, aiohttp, aiohttp_retry |
| Maintenance | actively maintained — 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,711/month — #14,598 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyrainbird-6.5.0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
pydrawisePydrawise is an asynchronous Python library for…
permissive · top 15,000 on PyPI
RachioPyRachioPy provides a Python interface to the…
permissive · top 15,000 on PyPI
pyworxcloudAsync Python client library for communicating…
permissive · top 15,000 on PyPI
gardena-bluetoothControls Gardena Bluetooth-enabled watering…
permissive · top 15,000 on PyPI
python-izonePython library for controlling iZone air…
copyleft · top 15,000 on PyPI
flux-ledControls Magic Home and Surp Life WiFi LED…
copyleft · top 15,000 on PyPI
airtouch4pyapiControls Airtouch 4 and 5 air conditioning…
permissive · top 15,000 on PyPI
zigpy-zigateProvides a Python 3 driver for ZiGate Zigbee…
copyleft · top 15,000 on PyPI
PyRICPyRIC provides programmatic control over Linux…
copyleft · top 15,000 on PyPI
pylnk3Reads, writes, and creates Windows .lnk…
copyleft · top 15,000 on PyPI