Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rachio Irrigation API Example #195

Merged
merged 2 commits into from
Jun 24, 2024
Merged

Add Rachio Irrigation API Example #195

merged 2 commits into from
Jun 24, 2024

Conversation

DJDevon3
Copy link
Contributor

@DJDevon3 DJDevon3 commented Jun 23, 2024

Example pulls data from your Rachio Irrigation Timer. This is just a basic example. More can be done with zone scheduling, actually running the irrigation system, etc.. will work on an advanced example in the future. This should be good enough for very basic communication with the API and timer.

Because this API pulls very sensitive data I've included an asterix obfuscation for serial prints when not in debug mode. Debug mode will show all data without obfuscation. The below serial output is verbose, the asterix are intentionally part of the script.

Example serial output:

Connecting to WiFi...
✅ Wifi!
 | Attempting to GET Rachio Authorization
 | ✅ Authorized
 | Attempting to GET Rachio JSON
 | ✅ Rachio JSON
 |  | UserID:  130*********************************
 |  | Username:  tre*******************
 |  | Full Name:  Dev*****
 |  | Account Status: Active
 |  | Registration Date: 06/17/2024 22:18:57
 |  | Device:  Rachio 3
 |  |  | Model:  GENERATION3_4ZONE
 |  |  | Serial Number:  AC*******
 |  |  | MAC Address:  9C**********
 |  |  | Device Status:  ONLINE
 |  |  | Time Zone:  America/New_York
 |  |  | Latitude:  *******
 |  |  | Longitude:  ********
 |  |  | Rain Sensor:  False
 |  |  | Zones: Backyard 2, Zone 4, Front Yard 3, Median 1

Finished!
Board Uptime: 1.2 days
Next Update: 15 minutes

Example pulls data from your Rachio Irrigation Timer. This is just a basic example. More can be done with zone scheduling, actually running the irrigation system, etc.. will work on an advanced example in the future.  This should be good enough for very basic communication with the API and timer.
quick simple fix for a misspelling
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks for the new example @DJDevon3

I tested it successfully on a Feather ESP32S3 TFT.

@FoamyGuy FoamyGuy merged commit 197c653 into adafruit:main Jun 24, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 25, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_DS248x to 1.0.1 from 1.0.0:
  > Update ds248x_simpletest.py

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 8.4.0 from 8.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#209 from justmobilize/add-ap-info

Updating https://github.com/adafruit/Adafruit_CircuitPython_ConnectionManager to 3.1.1 from 3.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_ConnectionManager#21 from justmobilize/update-wiznet-version-check

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 3.1.2 from 3.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#208 from RetiredWizard/monoprecision

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 4.1.1 from 4.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#195 from DJDevon3/main
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#194 from justmobilize/post-file-as-data

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_S35710, Adafruit_CircuitPython_HX711

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants