BrucesHobbies / energyMaster

Energy monitoring for logging, detection of faults, and preventative maintenance monitoring.
GNU General Public License v3.0
17 stars 5 forks source link

Change in pymodbus library #4

Open UgoPoddine opened 1 year ago

UgoPoddine commented 1 year ago

Hello,

due to changes in pymodbus library new version, it's required to adjust the pzem.py as follow :

a) from pymodbus.pdu import ModbusRequest in place of from pymodbus.client.sync import ModbusSerialClient as ModbusClient b) replacing all result = client.read_input_registers (0x0000, 8, unit= chanAddr) with result = client.read_input_registers (0x0000, 8, slave = chanAddr)

Best regards UP