[APP][Pro] Modbus

Does anyone else have PV-System with 2 inverters? How do you have handeled it??
Thanx everyone for your great support!!! :smiling_face_with_three_hearts:

is state of capacity the same as state of charge??

I mean state of charge

I tested with a second Modbus device (Smartmeter).
I used the IP from the inverter, but used device ID 200 (default for Fronius smartmeter) instead of 1 (default for inverter).
And with this second device I can read the register of the smartmeter.

You can check if the device ID is 2 or if there is also a ID system behind. You shoud find this in the Modbus reference.

your value is from “[Energy storage unit 1] Battery SOC”.
The one in my screenshot is “[Energy storage]SOC”.

Both work anyway.

Hi @RonnyW , thanx for your reply:
I updated to the test Version.
When i now start my flow i get following errors:

Or the error: no connection to modbus server

Thats how I installed the two Modbus devices:
image

Modbus 1 settings:
image

Modbus 2 settings:
image

The ID 1 is the Huawei Sun2000 8KTM Inverter and ID 2 is the 10 kw inverter:
I checked this IDs in the settings.
But since I have installed the second Modbus Device it doesn’t work any more!

Now i have deleted the first Modbus with ID1.
Now its is getting more confusing:
After erasing the modbus 1 it doesn’t work with inverter 2. But when I restart the modbus App AND when I wait some minutes it works again:
When I read out adress for der battery SOV of the Inverter with ID2 it works and gives me the right percentage of batterie charge. Also the amount of Energy coming from inverter 2 is now right (i mentiones earlier that it says 0, but the inverter has been termporarly on 0; I don’t know why).
Now I added Inverter 1 again. Again I can’t read out inverter 2. After erasing inverter 1 it doesn’t work instantly. But when I restart the modbus app it works again instantly without waiting!

So now I think that the APP might not support having two modules. @RonnyW could you maybe add a flow card where we can tell your App to wich ID number the adress read or write shouold be send?

value is correct.

@Valentin_Ciopei when i read out the value it says 2084 Watt. But my PV modules give me just now 12,72 kW power!!

Now i investigated further: ACtive power seems not to be the ammount of energy coming from the roof!!!
I checked on each inverter: When i calculate the cummulativ energy from the DC power (AxV for each string on both converters) I get 9544Watt. But active energy is only 0,6 on Inverter A on 3,6 on inverter B. the rest seems to go to the battery! So now I think active energy is only that amount of DC energy that is converted to AC power. When the battery is charging the energy seems to go directly into the battery (its a DC battery) and is not counted as active energy.
Now i have two remaining problems:
I have to calculate the amount of energy coming from the roof. Therefore I could let homey and the genial modbus App calculate the Watt from each sting (AxV). Therefore I must be able to adress both inverters. Or does anyone know an other adress code which I can use for my purpose to get the total amount of energy in Watt coming from the roof??

actually Active power is the household comsumption!

you need input power:

1 Like

Hasn’t the inverter both values? There should be additional registers for. The inverter knows the DC input and AC output. It controls battery charging.

For Fronius there is a second register reference for an attached battery with battery specific data. Perhaps you need this in addition.

1 Like

@Valentin_Ciopei @Sasan_Khandanpour

You could document the Huawei register and a HowTo as an HowTo thread - or just create a Huawei-Modbus thread.
That’s a bit too specific for this app thread.

1 Like

you might be right with a huawei specific topic. But I would keep on discussion on this thread regarding the avialibility of your great Modbus TCP App to read out two different IDs. I Think there might be more people having more than one modul in their modbus network.
I tried the adress 32064 from @Valentin_Ciopei . Thats the right adress for the PV input. But I only get the amount of the Strings connected to one inverter. But I need to read the input power of both inverters to get the ammount of total input power of both inverters. @RonnyW Do you know a way to manage this

Perhaps you have to use an offset for the second inverter. Are there no details in the documentation?

I don’t know about any offset. I haven’t read about it but it might be to complicated for me. Is there any way to install your Modbus TCP app twice? Or can’t you make a second flow with an other id to read out? That would make me so happy!! That would be the solution for all my problems. Or can’t you duplicate your app in the app store?

But best solution would be if You could add several Modbus modules but with several IDs. Now that crashes the whole app. How many hours would this take You to make the programmation?

Every device has it’s own context/settings and independent connection to the target device.
As said I tried two device IDs and it’s working:

grafik

Inverter:
grafik

Electricity meter
grafik

I get the correct device name from the registers.

grafik

grafik

So the app is working correctly :man_shrugging:

Thank you @RonnyW . So that is great to know that your app should be working correctly.
Maybe you can figure why it doesn’t work on my homey?
Step by step: I have one Modbus-GerÀt 2 with ID number 2.
image

Than I re-installed a second device with the ID number 1.
image

after that i didn’t set up any new flows with the new ID 1 module.
When I now try to start the old flows with the first ID1 module the following error comes:
Error code1 = connection to modbus server closed
image

Error code 2 = rejecting because of earlier Out of sync error
image

I think that is not a Huawei specific problem. But I am wondering why it does work on your homey but not on my. How could you help me?

I made a diagnosis report on the App:
db564217-e8fa-450c-a373-ffa66c5a964e

Many thanks for the app! I’m trying to use it for my NIBE heat pump.

I was wondering why there is no way to set the size and type of a register when writing? Example: I can read register 18 with size 2 and type INT16, but how can I write a value to that register?

huawei inverter support will be coming on SolarEdge + Growatt TCP modbus.

I understand the current huawei impl is not ideal .

meantime do this and experience how and should work.

2 Likes

Is it possible that the master should be ID=0?

I found this information in the web:

Entweder ID 0 Oder ID16(Master) ID1 (Slave)

grafik
Page 30 from:

Currently the JS data type is used to convert into a buffer/Bytes.
I only found (U)INT16 registers with RW permission. Using a number tag/value is writing an x16 value.
I haven’t tried to convert to 32bit due to a lack of testing options.