riken, with 5 months I am sure you will have success.
I thought you would get battery state of charge (SOC) either from data from the inverter or directly form the inverter ?
If not, then how will you get this by analogue I wonder ?
Remember Qt is an application framework as such, where you can add in your actual application functionality with C++ code.
So, doing this, you could have the RPi acting as Modbus TCP master, and communicating to both the Victron inverter as well as the M-Duino, which will both be Modbus TCP slaves.
To do this, you use the library I mentioned, the very good libmodbus library on the RPi.
The M-Duino can then just do the direct digital and analogue I/O and do what ever calculations.
But the idea with this is that you use the RPi (or other better GNU/Linux board) to do all the number crunching.
Then, you have a single Modbus TCP master which will get the all data from all devices.
There is no need to do other communication with 'strings' or other tricky stuff.
Use Qt for what it was designed for, for nice GUI's, and wrap it around the code to do the Modbus and other calculations you need.
Pylon, you are excused indeed, but it appears to me you did not read my comment correctly, where I say, and I quote, 'as it is not wise to have one Ethernet port communicating as Modbus TCP master as well as another TCP protocol at the same time', with the key word in there being 'wise'.
I did not say it was not possible, and simply mentioned this as many people do not understand the inner details of a protocol such as Modbus, where timing of responses might come into play.
Without the caution, a user might have a single Ethernet port on a board such as a RPi and have the Modbus polling very fast and then expect to be able to have another connection say by HTTP or streaming data via Web Sockets, and wonder why Modbus errors are suddenly appearing.
So, my caution is simply to highlight that it is not 'wise' to use a single Ethernet port while using Modbus TCP with another TCP/UDP protocol.
It has nothing to do with firewalls, and more to do with hardware that is not so good in this particular aspect, i.e. RPi mixed with multiple protocols used by an application that might not be coded in a way with full understanding to avoid tricky issues.
Pylon, I hope I have been able to clarify my point more for you.
Anyhow, riken, go for it and good luck, I think you shall succeed with determination.
Paul - VK7KPA