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)
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