Skip to content
← Public packages

@kentcdodds/hydrawise

Server-side Hunter Hydrawise controller and zone helpers backed by the hydrawiseApiKey secret.

README.md

39 lines · 1.6 KB · Markdown

@kentcdodds/hydrawise

Intent

Server-side Hunter Hydrawise irrigation helpers for listing controllers, reading zone schedules, and running or suspending zones. A weekday status job posts a glanceable Discord #reporting line (read-only).

What it does

  • List controllers and read zone status without side effects
  • Run, stop, suspend, or resume one zone or all zones (mutating — only when explicitly requested)
  • Call a compact request helper for raw Hydrawise REST under /api/v1/
  • Post a weekday morning status line (controllers, rain/sensors, next run) via the scheduled weekday-status job

Prerequisites / setup

  1. Generate an API key in Hunter Hydrawise (Account Details → Generate API Key).

  2. Save it in Kody as user secret hydrawiseApiKey (never paste the value in chat):

    https://kody.codes/account/secrets/new?name=hydrawiseApiKey&description=Hunter%20Hydrawise%20API%20key&allowedHosts=api.hydrawise.com&scope=user

  3. Approve host api.hydrawise.com and package access to hydrawiseApiKey if prompted.

  4. Agents: see AGENTS.md for import paths, dry-run smoke, and mutation cautions.

Hydrawise does not publish an OpenAPI spec (PDF REST guide only). Auth is the api_key query param via the secret placeholder — not Bearer.

Done when

  • hydrawiseApiKey is saved; host and package secret access are approved
  • Read-only list-zones / get-controllers returns controller and zone data
  • weekday-status with dryRun: true formats a status line without posting
  • Mutating zone actions are used only when the user explicitly asks