Skip to content

Releases: martijndierckx/hydrawise-api

v2.0.1

Choose a tag to compare

@martijndierckx martijndierckx released this 09 Jun 08:20

Fixed

  • LOCAL zone filter: real configured zones with lastwaterepoch === 0 (never watered) were being silently dropped, returning an empty zone list to consumers. Reverted to the original (pre-2020) heuristic of skipping relays with type === 110, which is the controller's own marker for unconfigured slots. Regression introduced in commit eb0fe93 (May 2020); preserved across the v2 rewrite. Fixes homebridge-hydrawise showing zero accessories after a controller reset or on a fresh install.

Added

  • RelayRow.type?: number field on the typed LOCAL response.

Install

npm install hydrawise-api@2.0.1

Published to the next dist-tag; latest remains on 1.2.1.

v2.0.0

v2.0.0 Pre-release
Pre-release

Choose a tag to compare

@martijndierckx martijndierckx released this 09 Jun 07:06

Changelog

2.0.0 (unreleased)

Breaking

  • Constructor now throws on missing required fields (was silent in v1).
  • HydrawiseConfiguration interface removed; use HydrawiseConfig (discriminated union: {type: 'LOCAL', host, password, user?} | {type: 'CLOUD', key}).
  • commandZone(action, …) narrowed to single-zone actions: ZoneAction.Run | ZoneAction.Stop | ZoneAction.Suspend | 'run' | 'stop' | 'suspend'. Passing an …All action is now a compile error.
  • HydrawiseController.id / serialNumber / lastContactWithCloud / status typed as … | undefined (LOCAL controllers don't populate them).
  • HydrawiseZone.controller typed as HydrawiseController | undefined.
  • Minimum Node bumped to 18.20.

Added

  • ZoneAction enum (Run, Stop, Suspend, RunAll, StopAll, SuspendAll).
  • HydrawiseConfig discriminated-union config type.
  • Typed response interfaces: LocalStatusResponse, CloudStatusResponse, CloudCustomerDetailsResponse, SetZoneResponse.
  • HydrawiseController.host — populated for LOCAL controllers (used by homebridge-hydrawise to compute stable accessory keys).
  • HydrawiseZone.defaultRunDuration is now actually populated for LOCAL zones (was silently dropped by the v1 constructor).
  • Vitest suite with fetch-stubbed unit tests (35 cases) covering both LOCAL and CLOUD parsing, command shaping, error handling.

Changed

  • Replaced axios with native fetch. Zero runtime dependencies.
  • Internal rewrite: async/await throughout; no more manual Promise wrapping.
  • Tightened internal types; eliminated any in the API surface.

Removed

  • axios runtime dependency.
  • Manual Error.captureStackTrace fallback (guarded via optional chaining).

1.1.0

Choose a tag to compare

@martijndierckx martijndierckx released this 31 May 15:27
Added isRunning detection for cloud connections

0.1.0

Choose a tag to compare

@martijndierckx martijndierckx released this 01 May 14:47
Add Travis CI badge to README