Metadata-Version: 2.4
Name: pyrainbird
Version: 6.3.0
Summary: Rain Bird Controller
Author-email: "J.J.Barrancos" <jordy@fusion-ict.nl>, Allen Porter <allen.porter@gmail.com>
License-Expression: MIT
Project-URL: Source, https://github.com/allenporter/pyrainbird
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pycryptodome>=3.16.0
Requires-Dist: PyYAML>=5.4
Requires-Dist: mashumaro>=3.12
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: ical>=4.2.9
Requires-Dist: aiohttp>=3.13.5
Requires-Dist: aiohttp_retry>=2.8.3
Dynamic: license-file

Python module for interacting with [WiFi LNK](https://www.rainbird.com/products/module-wi-fi-lnk) module of the Rain Bird Irrigation system. This project has no affiliation with Rain Bird.

This module communicates directly towards the IP Address of the WiFi module. You can start/stop the irrigation, get the currently active zone, and other controller settings. This library currently only has very limited cloud support. Also there are a number of Rain Bird devices with very different command APIs.

See [documentation](https://allenporter.github.io/pyrainbird/) for full quickstart and API reference.
See the [github project](https://github.com/allenporter/pyrainbird).

# Quickstart

This is an example usage to get the current irrigation state for all available
irrigation zones:
```python
import asyncio
import aiohttp
from pyrainbird import async_client

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        controller: async_client.AsyncRainbirdController = await async_client.create_controller(
            session,
            "192.168.1.1",
            "password",
        )
        zones = await controller.get_available_stations()
        states = await controller.get_zone_states()
        for zone in zones.active_set:
            print(
                f"Sprinkler zone {zone}: {'active' if zone in states.active_set else 'inactive'}"
            )

asyncio.run(main())
```

See [examples](examples/) for additional details on how to use the APIs and an example command
line tool for querying the device.

# Compatibility

This library has been tested with the following devices:

  - ESP-TM2

You are welcome to file an issue for improved compatibility with your device especially if you
include debug logs that capture the API responses form the device.

See [CONTRIBUTING](CONTRIBUTING.md) for details on developing in the library itself, such as
running the tests and other tooling used in development.
