Skip to content

chore: upgrade nwp500-python to 8.1.3#82

Merged
eman merged 1 commit into
mainfrom
chore/upgrade-nwp500-python-8.1.3
Jun 15, 2026
Merged

chore: upgrade nwp500-python to 8.1.3#82
eman merged 1 commit into
mainfrom
chore/upgrade-nwp500-python-8.1.3

Conversation

@eman

@eman eman commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Upgrades the nwp500-python library from 8.1.2 to 8.1.3.

What changed in 8.1.3

Fixes a thread-safety bug where asyncio.Task.cancel() was called directly from an AWS IoT SDK background thread in on_connection_resumed. When the event loop was busy at the moment of cancellation (e.g. the sleeping task's 1-second timer callback had already been enqueued), the cancellation was silently dropped. The stale _reconnect_with_backoff task would then complete its sleep, call _reconnect_func, and tear down an otherwise healthy connection — restarting the entire disconnect → reconnect → AWS_ERROR_MQTT_UNEXPECTED_HANGUP cycle seen in production logs.

See nwp500-python PR #89 for the upstream fix.

Files updated

File Change
custom_components/nwp500/manifest.json nwp500-python==8.1.3
requirements.txt nwp500-python==8.1.3
tox.ini All 4 occurrences updated
coordinator.py Error message install hint
config_flow.py Error message install hint
README.md Version badge link
.devcontainer/README.md Package list
.github/copilot-instructions.md Current Version field
CHANGELOG.md Entry under [Unreleased]

Fixes thread-safety bug in on_connection_resumed where Task.cancel()
was called directly from an AWS IoT SDK background thread, allowing
the cancellation to be silently dropped under load and causing the
MQTT reconnection storm seen in production logs.
@eman
eman merged commit 7a3bd78 into main Jun 15, 2026
10 checks passed
@eman
eman deleted the chore/upgrade-nwp500-python-8.1.3 branch June 15, 2026 21:50
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.

1 participant