https://github.com/ptcryan/hydrawiser
Python library for Hydrawise API
https://github.com/ptcryan/hydrawiser
home-assistant home-automation hunter hydrawise-api irrigation irrigation-controller
Last synced: about 2 months ago
JSON representation
Python library for Hydrawise API
- Host: GitHub
- URL: https://github.com/ptcryan/hydrawiser
- Owner: ptcryan
- License: mit
- Created: 2018-04-15T19:24:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-28T08:49:18.000Z (over 2 years ago)
- Last Synced: 2024-12-09T11:10:46.037Z (10 months ago)
- Topics: home-assistant, home-automation, hunter, hydrawise-api, irrigation, irrigation-controller
- Language: Python
- Size: 25.4 KB
- Stars: 17
- Watchers: 10
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hydrawiser
[](https://coveralls.io/github/ptcryan/hydrawiser?branch=master)
[](https://travis-ci.org/ptcryan/hydrawiser)
[](http://hydrawiser.readthedocs.io/en/latest/?badge=latest)
[](https://badge.fury.io/py/Hydrawiser)

This is a Python 2 and 3 library for controlling the [Hunter](https://www.hunterindustries.com) Pro-HC sprinkler controller.
*Note that this project has no official relationship to Hunter Industries. It was developed using the Hydrawise API v1.4. Use at your own risk.*
Hydrawise Youtube video: https://youtu.be/raOEK8JjSUA
Hydrawise official site: https://hydrawise.com
Source code documentation: https://hydrawiser.readthedocs.io
Python Package Index: https://pypi.org/project/Hydrawiser/## Usage
```python
from hydrawiser.core import Hydrawiser# Register with a hydrawise account to obtain an API key.
hw = Hydrawiser('0000-1111-2222-3333')# List all the controller information.
hw.controller_info
{'boc_topology_desired': {'boc_gateways': []}, . . . .# Get the controller status.
hw.status
'All good!'# Get the name of the controller.
hw.name
'Home Controller'# Get information about the relays on this controller.
hw.relays
[{'relay_id': 987654, 'relay': 1, 'name': 'yard', . . . .# Get the number of relays on this controller.
hw.num_relays
6# You can index a specific relay information.
hw.relays[2] # Return information for the 3rd relay. Relays is zero indexed.# Get the name of the 1st relay.
hw.relay_info(0, 'name')
'Back yard'# Suspend all relays for 60 days.
hw.suspend_zone(60)# Suspend relay 3 for 2 days.
hw.suspend_zone(2, 3)# Stop all relays.
hw.run_zone(0)# Run all relays for 15 minutes.
hw.run_zone(15)# Run relay 5 for 10 minutes.
hw.run_zone(10, 5)# Refresh the controller attributes.
hw.update_controller_info()# Test to see if a zone is running.
hw.is_zone_running(3)
Truehw.time_remaining(3)
247
```## Limitations
* Only one controller is supported