`Modbusserialclient` from `Pymodbus. Client. Sync` Vs. `Pymodbus. Client`

I've been using pymodbus to comminicate with a temperature sensor. Previously, I used:

from pymodbus.client.sync import ModbusSerialClient

and everything worked fine.

After a recent update, this was no longer possible (pymodbus.client.sync seems to have been removed, and I was getting an import error) and I had to switch to:

from pymodbus.client import ModbusSerialClient

The import now works, but none of my previous commands do. I've just spent the last 3 hours scouring the documentation and can't work out why this no longer works. I can communicate with my device using minimalmodbus, so I am confident that the device is working fine.

What have I missed? Any ideas?!

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article