Easy-to-use Modbus RTU and Modbus ASCII implementation for Python. Version 2.1.1 supports Python >=3.8. Released semi-regularly, with a focus on simplicity and reliability for talking to Modbus devices over serial ports.
pip install minimalmodbusVerified import paths — ran on the pinned version, not inferred.
Quick example reading a Modbus register.
Set serial parameters via the instrument.serial attribute after creation.
Subtract 1 from usual Modbus addresses.
Use pymodbus for Modbus TCP, or use a serial-to-TCP converter.
Use a slave address in range 1-247.
Check the correct port name (e.g., /dev/ttyUSB0, COM3). On Linux, ensure user has dialout group permissions.