thomasfa18 / solar-sungrow

Monitor sungrow inverter over LAN modbus and upload to pvoutput.org
GNU General Public License v3.0
19 stars 5 forks source link

Updates for current pymodbus api #3

Open GKassell opened 1 year ago

GKassell commented 1 year ago

I really should upload the various improvements to this I've made for my sh5K_30, but for now, I've just had to rebuild my pi, and discovered this code doesn't work with the latest pymodbus library. SO to make life eay for others - 'unit=' should be replaced with 'slave=' and "from pymodbus.client.sync import ModbusTcpClient" should be replaced with "from pymodbus.client import ModbusTcpClient"

Then it seems to work well again (though as I said my script is heavily changed to force battery charging to fill the battry from main by just before peak pricing if solar isn't going to achieve such) - Absolute fan of this thank you!.