Skip to content

Releases: eman/ha_nwp500

v0.16.2

Choose a tag to compare

@github-actions github-actions released this 14 Jul 23:21

Fixed

  • MQTT reconnection retry loop: Fixed a critical bug where
    force_reconnect() would fail to retry after a transient auth service or
    network error. Previously, when reconnection failed during the initial
    attempt, the method would return instead of rescheduling retries with
    exponential backoff. This caused the integration to become permanently stuck
    disconnected, requiring manual Home Assistant restart to recover. The fix
    converts force_reconnect() to loop internally with exponential backoff
    (2s, 5s, 15s, 30s, 60s cap), continuously retrying until successful
    reconnection or task cancellation. This ensures automatic recovery from
    transient auth/network failures. Fixes
    issue #100.

v0.16.1

Choose a tag to compare

@github-actions github-actions released this 14 Jul 16:45

Fixed

  • MQTT reconnection rate-limiting bug: Fixed a critical bug in the
    reconnection rate-limit logic that prevented the integration from recovering
    after MQTT connection failures. When a reconnection attempt was rate-limited
    (< 30 seconds since the last attempt), the timeout counter was incorrectly
    reset to 0, preventing the reconnection threshold from ever being reached
    again. This caused the integration to remain disconnected indefinitely even
    when the MQTT service became available. The fix removes the counter reset
    from the rate-limit case, allowing the counter to accumulate normally so
    reconnection proceeds once the rate-limit interval expires. Fixes
    issue #100.

v0.16.0

Choose a tag to compare

@github-actions github-actions released this 07 Jul 15:52

Fixed

  • MQTT reconnect alignment with nwp500-python v9.0.0: The coordinator no
    longer tears down the MQTT client after three disconnected update cycles while
    the library's own hardened internal reconnect loop is already running. Forced
    reconnect remains as a last-resort escape hatch only for repeated
    coordinator-level request timeouts on a connection that still appears up, and
    the integration now listens for the library's reconnection_failed event to
    trigger Home Assistant reauth when the internal loop stops permanently.
  • AWS CRT clean-session warning workaround removed: nwp500-python v9.2.0
    fixes issue #97 upstream:
    _await_ack() and the subscribe/unsubscribe acknowledgement waits now
    attach a done callback whenever a shielded AWS CRT future is abandoned, so
    the eventual result/exception is always retrieved and logged at debug level
    by the library instead of leaking to asyncio's global exception handler.
    The coordinator's temporary global asyncio exception-handler
    install/restore machinery (_nwp500_exception_handler,
    _install_exception_handler, _restore_exception_handler, and the shared
    refcount globals) is no longer needed and has been removed.
  • Recirculation Active binary sensor: Removed the redundant "Recirculation
    Active" binary sensor (recirculation_use), which read the same
    DeviceStatus.recirc_operation_busy field as the existing "Recirculation
    Operation Busy" sensor and duplicated it with a nonexistent recirc_use
    fallback. Use the existing "Recirculation Operation Busy" sensor instead.

Changed

  • Internal API cleanup / Python 3.14 modernization: Removed redundant
    from __future__ import annotations imports from all
    custom_components/nwp500/ modules now that this integration is
    Python 3.14-only, updated stale nwp500-python version-pinned comments
    to reflect current library behavior, and replaced the auth-client
    shutdown dunder call with the library's public close() API. Initial
    auth setup still relies on NavienAuthClient.__aenter__() because
    nwp500-python does not yet expose a matching public connect/open
    lifecycle method for the coordinator's longer-lived auth session.
  • Library Dependency: nwp500-python: Upgraded to
    9.2.0. No
    breaking changes affecting this integration. Notable changes:
    • Fixes issue #97:
      _await_ack() in mqtt/connection.py and the subscribe/unsubscribe
      acknowledgement waits in mqtt/subscriptions.py now attach a done
      callback whenever a shielded AWS CRT future is abandoned due to a
      timeout or cancellation, so its eventual result/exception is always
      retrieved and logged at debug level instead of leaking as an unhandled
      "Future exception was never retrieved" asyncio warning. This obsoletes
      this integration's own global asyncio exception-handler workaround,
      which has been removed (see "Fixed" above).
    • Internal refactors with no behavior change: CLI formatting stacks
      merged behind a single Rich renderer, mqtt/client.py slimmed via
      mixins, event-name constants de-duplicated between events.py and
      mqtt_events.py, and awscrt types (e.g. mqtt.QoS) wrapped behind a
      library-owned nwp500.QoS enum on public MQTT signatures. This
      integration does not use awscrt.mqtt.QoS directly, so no code changes
      were required.
  • Library Dependency: nwp500-python: Upgraded to 9.0.0 (BREAKING). This
    is a major version bump on the library side that trims its public API
    surface and removes dead code; see the
    full release notes
    for the complete list. Notable changes affecting this integration:
    • Removed the never-raised TokenExpiredError exception. The coordinator's
      authentication error handling no longer imports or catches it (the
      remaining TokenRefreshError/AuthenticationError handling is
      unaffected, since the library never actually raised this class).
    • Numerous bug fixes relevant to this integration's stability: queued
      control commands are now preserved in order and expire after a
      configurable age instead of replaying stale commands after long
      outages; MQTT message dispatch now runs on the event loop instead of
      the AWS CRT network thread, fixing a potential
      RuntimeError: dictionary changed size during iteration during
      reconnects; the reconnection loop now survives all library errors
      instead of dying silently on auth/token errors during an outage;
      error_detected events are now emitted when the error code changes
      between two non-zero values; and sub-zero Fahrenheit temperature
      conversions are now rounded correctly.
    • No changes were required to this integration's own use of
      build_reservation_entry/build_tou_period, since it already imports
      them from nwp500.encoding rather than the removed top-level
      re-exports.
  • Water heater mode enums: Replaced duplicated magic-number protocol values
    with nwp500.enums.CurrentOperationMode / DhwOperationSetting members and
    consolidated DHW mode-to-state translation so the water heater entity and its
    extra state attributes share one base mapping while preserving the vacation
    restore behavior.

v0.15.5

Choose a tag to compare

@github-actions github-actions released this 15 Jun 21:55

Changed

  • Library Dependency: nwp500-python: Upgraded to 8.1.3. Fixes a
    thread-safety bug in on_connection_resumed where Task.cancel() was called
    directly from an AWS IoT SDK background thread. When the event loop was busy,
    the cancellation could be silently dropped, leaving a stale
    _reconnect_with_backoff task that would complete its sleep and tear down an
    otherwise healthy connection — restarting the
    disconnect → reconnect → AWS_ERROR_MQTT_UNEXPECTED_HANGUP cycle. See
    nwp500-python PR #89.

v0.15.4

Choose a tag to compare

@github-actions github-actions released this 05 Jun 16:37

Fixed

  • MQTT reconnection recovery loop: The force_reconnect method was updating _last_reconnect_time before attempting setup, which prevented the integration from retrying failed reconnections. If setup failed, the rate-limiting check in the coordinator would see the recent timestamp and block further attempts for 30 seconds, keeping the device stuck in a disconnected state. Now _last_reconnect_time is updated only after successful setup, allowing retries on failed attempts while still preventing excessive reconnect attempts on success.

v0.15.3

Choose a tag to compare

@github-actions github-actions released this 25 May 22:01

Fixed

  • MQTT client ID conflict: All HA instances authenticated with the same Navien account previously shared the same MQTT client ID (navien-ha-{user_seq}). AWS IoT Core only allows one active connection per client ID, so running more than one instance (e.g. production + local dev) caused a continuous ping-pong of disconnections. The client ID now incorporates the HA installation's unique instance UUID: navien-ha-{user_seq}-{ha_uuid[:8]}, making it stable across restarts and unique per installation.
  • MQTT subscriptions lost after auto-reconnect: When the AWS IoT SDK reconnected internally before the integration's own reconnect logic fired, session_present=False was reported but no resubscribe_all() was called — leaving the client connected but with zero active topic subscriptions. Device status updates stopped flowing silently until a forced full reconnect occurred. Fix pending release in nwp500-python (see fix/mqtt-resubscribe-on-session-lost).
  • Persistent MQTT session: Changed clean_session from True (library default) to False. Combined with the now-unique stable client ID, the AWS IoT broker resumes the existing session on reconnect (session_present=True), so subscriptions are preserved server-side and AWS_ERROR_MQTT_CANCELLED_FOR_CLEAN_SESSION errors are eliminated.

Changed

  • Library Dependency: nwp500-python: Upgraded to 8.1.2

v0.15.2

Choose a tag to compare

@github-actions github-actions released this 18 May 20:27
Release v0.15.2

v0.15.1

Choose a tag to compare

@github-actions github-actions released this 17 May 00:29

Changed

  • Library Dependency: nwp500-python: Upgraded from v8.0.0 to v8.1.0.

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 15 May 22:45
Release v0.15.0

v0.14.4

Choose a tag to compare

@github-actions github-actions released this 14 Apr 01:05

Fixed

  • README: Corrected stale version number (was showing 0.3.0, now reflects current version)

Changed

  • CI: Removed ignore: brands from HACS validation workflow — brand assets are now provided via custom_components/nwp500/brand/ directory

Full changelog: https://github.com/eman/ha_nwp500/blob/main/CHANGELOG.md