I have been working with Modbus lately to communicate with some solar inverters and batteries. I am working on creating a virtual environment where I can test some basic operation of my code without needing to test everything on the physical system.
I am using the pymodbus library and used the server_async.py example to create a virtual Modbus TCP slave (server) on localhost (IP 0.0.0.0, port 502).
Is there a way I can do the same for Modbus RTU ?
I am working on an Ubuntu 22.04 OS.