nmakel / solaredge_modbus

SolarEdge Modbus data collection library
MIT License
147 stars 36 forks source link

KeyError on example.py #54

Open icepick3000 opened 2 years ago

icepick3000 commented 2 years ago

When I run the example.py I get this error;

Registers:
Traceback (most recent call last):
  File "./example.py", line 46, in <module>
    print(f"\tManufacturer: {values['c_manufacturer']}")
KeyError: 'c_manufacturer'

Any ideas?

Alex

nmakel commented 2 years ago

This means you are not connected to the inverter.

icepick3000 commented 2 years ago

I found out from the solaredge manual the modbus can only be reached over ethernet.. so i plugged in ethernet and the script now works 50% of the time. Do you know if there is a limit of the number of calls you are allowed to make to the modbus?I was making one every 15 secs but it seems to lock me out after a while.

nmakel commented 2 years ago

I found out from the solaredge manual the modbus can only be reached over ethernet.. so i plugged in ethernet and the script now works 50% of the time.

Depends on whether you're using the rs485 interface or ethernet. Solaredge supports both modbus tcp over ethernet, or modbus over rs485.

Do you know if there is a limit of the number of calls you are allowed to make to the modbus?

There is no rate limiting. Only a single modbus tcp connection is allowed.

addiejanssen commented 2 years ago

I had the same issue with the example. The issue was caused by timeouts. Try adding --timeout 30 to the command line and see if the issue remains.