Modbus switch+ sensor

General Modbus setup, using a things file, described here

You’d need an interface for Modbus-RTU, a cheap USB-RS485 stick should do the job.

Example for a real device

Different approaches for power meter here

Forum search is your friend.