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!.
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!.