skillfed

pyrainbird

Rain Bird Controller

pyrainbird v6.5.0 76.7K downloads/30d#14,598 on PyPI77
Permissive license MIT Active released

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 pyrainbird

uv

uv add pyrainbird

poetry

poetry add pyrainbird

Installing 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

rain bird irrigation controlsprinkler system automationwifi lnk module pythonirrigation zone managementrain bird api clientsmart sprinkler control
irrigation-controlasync-clientsmart-home

More Monitoring packages