2024.4 Modbus async calls breaks compatibility with serial over IP (Socket or Telnet/RFC2217) devices

This is one of those " side effects we did not foresee" mentioned in
The cause is that there isn’t currently async support in pyserial for IP devices, either via a dumb socket or to a RFC2217 compatible device. pymodbus relies on pyserial for its serial port handling and the modbus integration uses pymodbus.
There’s currently an open issue https://github.com/pyserial/pyserial-asyncio/issues/46 and a waiting pull request https://github.com/pyserial/pyserial-asyncio/pull/95.

For now, anyone with a modbus config like:

  - type: serial
    port: rfc2217://<ip_address>:<port>

Will likely have problems on upgrading to 2024.4

Posting this here to help anyone who is in a similar position, as I feel posting on github isn’t appropriate as the problem ultimately is with a dependency even if it is a HA change that has surfaced it.