[APP][Pro] Modbus

@Sasan_Khandanpour Yes, I have a Huawei inverter. I’m familiar with what You are saying. Have sent a mail to my installer asking them to activate Modbus. Still waiting for there reply!

works ok for now.
Question: Do I need to use addressing?
Screenshot 2024-03-10 at 20.43.05

@RonnyW leider kommt es immer noch zu Verbindungsabbrüchen.

It’s a help to add the number frim the documentation.
Some are using Modbus Register and some Modbus address.

Register: Use this for register numbers startign at #1
Address: Use this for address numbers starting at #0

This makes it easier if the manufacturer uses Registers. So you can use the numbers 1:1 in flows.

Just wanted to thank @RonnyW for this great and much needed app. Along with the amazing Device Capabilities app by @Arie_J_Godschalk, I now have my heat pump fully integrated with Homey.

3 Likes

Homey still has to restart Modbus App, unfortunately.

Do you have some connect/disconnect flow cards active?

Works for me with last version 0.3.4 and device set to “Keep connection” and no connect/disconnect flows.

2 Likes

Same here - works like a charm.

1 Like

Same config here and it works perfekt. Thank you @RonnyW for your good work!

1 Like

Unfortunately I have still to restart the app… Ok it’s done by the flow when there is an error message.
Here is the error report code
0dbb9264-1809-40ff-b837-08dc48944dc7

I can see a request timeout. It seems the Dongle is offline or doesn’t respond.
Then I can see app restarts.

And it seems there are some run conditions causing errors…

  • a register is read during a reconnect.
  • perhaps reading the register triggers the dongle to close the connection
  • in this case, the connection is closed by the dongle causing the error
  • the app reconnects and than all is ok again.

So I think you should not restart the app onlynif there is one reading error. That can still happen also on network timeout or if the inverter starts/restarts. So just ignore this single tmeout and let read again with the next flow trigger.
Or add a 2sec delay and read again.

I was thinking that it might be a good idea to share somewhere™ the registers that actually work for a certain device. Even if one has a complete documentation, it might take a while to figure out what is actually what. E.g. I exported the supported registers directly from my heat pump, but it still took me two days to figure out where the power consumption is hidden.

Does this make sense? if so, any suggestions where to share that data?

The “Tutorials” area would be a good place. The thread could contain a post for every device.
If the first pistos a Wiki post, everyone can add links or an table of contents.

1 Like

New test version 0.4.1:

  • added data type for write register flow card.

Currently data types INT16 and UINT16 (BE) are possible.
Most registers will use these types I think.
If no type is set, UINT16 is used (to keep your flow cards working without a missing parameter error :slight_smile: )

grafik

@CaptainVoni FYI

Perfect! Works great. Many thanks!

1 Like

had to do this , sdongle is famous for request timeout. now it is almost stable. plus you need to wait a few sec after the connection and don’t do overlap and some time between requests.

    let client = new Modbus.client.TCP(socket, unitID, 3500);
``
1 Like

Many thanks. I will add the timeout.

@Sasan_Khandanpour:
Like Edmin said, please make serial requests to your inverter in your flow and not parallel. I hope this prevents most timeouts.

@CaptainVoni:
You asked for INT64 values. Is this still needed? Has your inverter really 64bit values?
How is the register defined and what is set in the flow card?

Hi @RonnyW , hi @Edwin_Biemond ,
thanx for your good ideas. I already had set up all requests in serial order. But I don’t know what you have changed since 7:42 am?!? Since 7:42 I had no error and crashes of the modbus app any more. Since then it works smooth, even in my complicated two inverter Setup (18,6 kwpeak, heat pump 15 kw battery). have you changed the programmation? Ok I can’t trust in that peace… let’s wait till tomorow.