I am beginning to develop a love-hate relationsship with my new Solaredge solar inverter. It is possible to read some interesting values from the inverter via Modbus TCP, but solaredge has opted to make this extra tricky, since the inverter will only support one TCP connection, but the registers are a happy mix of int16, uint16 and uint32 values.
Due to the architecture of the modbus binding, I will however need a separate slave definition for each item type, like so:
The inverter usually doesn’t like this and the connections will be unstable, or not be established at all. Is it possible to make the modbus binding resuse the same tcp connection for different slave connections? How would I go about raising a feature request to get this looked at? Another problem with the current slave definition is, that the binding will most likely try to read multipbe registers in parallel, something that the inverter also does not like. Resuing the same TCP connection would most likely serialize those requests as well.
In the meantime, I guess it would be possible to collapse those slave definitions into a single one to read uint16 values and convert the necessary registers back to signed int16 values. However, I’ll need some help to get the uint32 values back. Any idea, how to take two uint16 numbers and make a uint32 out of them?