Skip to content

v1.2.10

Choose a tag to compare

@alexdelprete alexdelprete released this 26 Jan 10:03
v1.2.10
3ce7bde

Release v1.2.10

GitHub Downloads

What's Changed

New Features

  • ModbusLink 1.4.2 flush() pattern - Implements lightweight error recovery using the new flush() method
    introduced in ModbusLink 1.4.2. When timeout or protocol errors occur, the integration now clears stale
    data from the TCP receive buffer before attempting recovery, which is faster and more reliable than
    immediately resetting the connection.

Acknowledgments

Special thanks to @Miraitowa-la, the ModbusLink developer:

  • Implemented our feature request (ModbusLink#5) for a flush() method and auto-drain mechanism
    in ModbusLink 1.4.2
  • Included a Home Assistant integration code example showing the recommended error recovery pattern,
    which we've now adopted in this integration

Dependencies

  • ModbusLink 1.4.2 - Updated to use the new flush() method for robust error recovery
  • Compatible release specifier - Changed from >=1.4.2 to ~=1.4.2 (PEP 440) to protect against
    breaking changes from minor version bumps. This allows patch releases (1.4.3, 1.4.4) but blocks
    potentially breaking minor releases (1.5.0+).

Technical Details

The new error recovery strategy:

  1. On timeout/protocol error → call flush() to clear stale responses
  2. Increment protocol error counter
  3. Only reset connection if error threshold is reached

This aligns with the Home Assistant integration pattern recommended by the ModbusLink developer.

Full Changelog

Full Changelog: v1.2.9...v1.2.10