Closed MilanCiprian closed 1 year ago
Hi @MilanCiprian, oh you've found a "bug" in the documentation. The code snippet should be:
from sun2000_modbus import inverter
from sun2000_modbus import registers
inverter = inverter.Sun2000(host='192.168.15.40')
inverter.connect()
if inverter.isConnected():
input_power = inverter.read_formatted(registers.InverterEquipmentRegister.InputPower)
print(input_power)
I will fix the documentation this evening. Please adjust your code accordingly, should be working.
I install python3.10 and pip3.10, then I install sun200_modbus:
Then I create the file ReadPower2.py with code:
Then I run the code and I get this error: