Releases: eman/ha_nwp500
Releases · eman/ha_nwp500
Release list
v0.16.2
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
convertsforce_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
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
Fixed
- MQTT reconnect alignment with
nwp500-pythonv9.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'sreconnection_failedevent to
trigger Home Assistant reauth when the internal loop stops permanently. - AWS CRT clean-session warning workaround removed:
nwp500-pythonv9.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_busyfield as the existing "Recirculation
Operation Busy" sensor and duplicated it with a nonexistentrecirc_use
fallback. Use the existing "Recirculation Operation Busy" sensor instead.
Changed
- Internal API cleanup / Python 3.14 modernization: Removed redundant
from __future__ import annotationsimports from all
custom_components/nwp500/modules now that this integration is
Python 3.14-only, updated stalenwp500-pythonversion-pinned comments
to reflect current library behavior, and replaced the auth-client
shutdown dunder call with the library's publicclose()API. Initial
auth setup still relies onNavienAuthClient.__aenter__()because
nwp500-pythondoes 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()inmqtt/connection.pyand the subscribe/unsubscribe
acknowledgement waits inmqtt/subscriptions.pynow 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.pyslimmed via
mixins, event-name constants de-duplicated betweenevents.pyand
mqtt_events.py, andawscrttypes (e.g.mqtt.QoS) wrapped behind a
library-ownednwp500.QoSenum on public MQTT signatures. This
integration does not useawscrt.mqtt.QoSdirectly, so no code changes
were required.
- Fixes issue #97:
- 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
TokenExpiredErrorexception. The coordinator's
authentication error handling no longer imports or catches it (the
remainingTokenRefreshError/AuthenticationErrorhandling 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 iterationduring
reconnects; the reconnection loop now survives all library errors
instead of dying silently on auth/token errors during an outage;
error_detectedevents 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 fromnwp500.encodingrather than the removed top-level
re-exports.
- Removed the never-raised
- Water heater mode enums: Replaced duplicated magic-number protocol values
withnwp500.enums.CurrentOperationMode/DhwOperationSettingmembers 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
Changed
- Library Dependency: nwp500-python: Upgraded to 8.1.3. Fixes a
thread-safety bug inon_connection_resumedwhereTask.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_backofftask that would complete its sleep and tear down an
otherwise healthy connection — restarting the
disconnect → reconnect →AWS_ERROR_MQTT_UNEXPECTED_HANGUPcycle. See
nwp500-python PR #89.
v0.15.4
Fixed
- MQTT reconnection recovery loop: The
force_reconnectmethod was updating_last_reconnect_timebefore 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_timeis updated only after successful setup, allowing retries on failed attempts while still preventing excessive reconnect attempts on success.
v0.15.3
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=Falsewas reported but noresubscribe_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 innwp500-python(see fix/mqtt-resubscribe-on-session-lost). - Persistent MQTT session: Changed
clean_sessionfromTrue(library default) toFalse. 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 andAWS_ERROR_MQTT_CANCELLED_FOR_CLEAN_SESSIONerrors are eliminated.
Changed
- Library Dependency: nwp500-python: Upgraded to 8.1.2
v0.15.2
v0.15.1
Changed
- Library Dependency: nwp500-python: Upgraded from v8.0.0 to v8.1.0.
- v8.1.0 (2026-05-16): Multiple bug fixes — see release notes
v0.15.0
v0.14.4
Fixed
- README: Corrected stale version number (was showing 0.3.0, now reflects current version)
Changed
- CI: Removed
ignore: brandsfrom HACS validation workflow — brand assets are now provided viacustom_components/nwp500/brand/directory
Full changelog: https://github.com/eman/ha_nwp500/blob/main/CHANGELOG.md