# \[APP\]\[Pro\] Modbus - Connect every Modbus devices

**URL:** <https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497>\
**Category:** Apps\
**Tags:** app, homey-pro, advancedflow\
**Created:** [February 20, 2024, 7:13pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497 "2024-02-20T19:13:05Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![PO\_Blomstrand](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/po_blomstrand/32/12476_2.png) [@PO\_Blomstrand](https://community.homey.app/u/PO_Blomstrand)\
**Post date:** [March 10, 2024, 6:10pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/101 "2024-03-10T18:10:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Valentin\_Ciopei](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@Valentin\_Ciopei](https://community.homey.app/u/Valentin_Ciopei)\
**Post date:** [March 10, 2024, 6:43pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/102 "2024-03-10T18:43:39Z")

</div>

works ok for now.  
Question: Do I need to use addressing?  
 ![Screenshot 2024-03-10 at 20.43.05](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5a9e4da5f3c633fcd7f82692cc2fbbea8b58522e.png)

---

<div class="post-metadata">

**Author:** ![Sasan\_Khandanpour](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sasan_khandanpour/32/79941_2.png) [@Sasan\_Khandanpour](https://community.homey.app/u/Sasan_Khandanpour)\
**Post date:** [March 10, 2024, 7:22pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/103 "2024-03-10T19:22:08Z")

</div>

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

 ![Screenshot_20240310_202041_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/2/12375e0706b9cc5f055e09c20bc139c614b9cf79.jpeg)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 10, 2024, 8:00pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/104 "2024-03-10T20:00:00Z")

</div>

> [@Valentin\_Ciopei](#):
>
> Question: Do I need to use addressing?  
> ![Screenshot 2024-03-10 at 20.43.05](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5a9e4da5f3c633fcd7f82692cc2fbbea8b58522e.png)

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.

---

<div class="post-metadata">

**Author:** ![CaptainVoni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/captainvoni/32/3549_2.png) [@CaptainVoni](https://community.homey.app/u/CaptainVoni)\
**Post date:** [March 11, 2024, 2:48pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/105 "2024-03-11T14:48:24Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/4/74baf780d57be7c3430f9ee4dc6e531eaf24ab0a.png)

---

<div class="post-metadata">

**Author:** ![Sasan\_Khandanpour](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sasan_khandanpour/32/79941_2.png) [@Sasan\_Khandanpour](https://community.homey.app/u/Sasan_Khandanpour)\
**Post date:** [March 11, 2024, 3:47pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/106 "2024-03-11T15:47:04Z")

</div>

Homey still has to restart Modbus App, unfortunately.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 11, 2024, 3:57pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/107 "2024-03-11T15:57:18Z")

</div>

Do you have some connect/disconnect flow cards active?

---

<div class="post-metadata">

**Author:** ![Valentin\_Ciopei](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@Valentin\_Ciopei](https://community.homey.app/u/Valentin_Ciopei)\
**Post date:** [March 11, 2024, 3:58pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/108 "2024-03-11T15:58:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CaptainVoni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/captainvoni/32/3549_2.png) [@CaptainVoni](https://community.homey.app/u/CaptainVoni)\
**Post date:** [March 11, 2024, 4:15pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/109 "2024-03-11T16:15:46Z")

</div>

> [@Valentin\_Ciopei](#):
>
> Works for me with last version 0.3.4 and device set to “Keep connection”

Same here - works like a charm.

---

<div class="post-metadata">

**Author:** ![Bosse\_Rasater](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bosse_rasater/32/78632_2.png) [@Bosse\_Rasater](https://community.homey.app/u/Bosse_Rasater)\
**Post date:** [March 11, 2024, 6:30pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/110 "2024-03-11T18:30:39Z")

</div>

> [@Valentin\_Ciopei](#):
>
> Works for me with last version 0.3.4 and device set to “Keep connection” and no connect/disconnect flows.

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

---

<div class="post-metadata">

**Author:** ![Sasan\_Khandanpour](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sasan_khandanpour/32/79941_2.png) [@Sasan\_Khandanpour](https://community.homey.app/u/Sasan_Khandanpour)\
**Post date:** [March 12, 2024, 6:49am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/111 "2024-03-12T06:49:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 12, 2024, 8:11am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/112 "2024-03-12T08:11:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![CaptainVoni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/captainvoni/32/3549_2.png) [@CaptainVoni](https://community.homey.app/u/CaptainVoni)\
**Post date:** [March 12, 2024, 10:26am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/113 "2024-03-12T10:26:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 12, 2024, 10:32am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/114 "2024-03-12T10:32:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 12, 2024, 5:38pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/115 "2024-03-12T17:38:31Z")

</div>

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 🙂 )

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/3/f33d230270987b9212d46cf071376934fa099d64.png)

@CaptainVoni FYI

---

<div class="post-metadata">

**Author:** ![CaptainVoni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/captainvoni/32/3549_2.png) [@CaptainVoni](https://community.homey.app/u/CaptainVoni)\
**Post date:** [March 12, 2024, 6:09pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/116 "2024-03-12T18:09:08Z")

</div>

> [@RonnyW](#):
>
> New **test version 0.4.1** :
> 
> - added data type for write register flow card.

Perfect! Works great. Many thanks!

---

<div class="post-metadata">

**Author:** ![Edwin\_Biemond](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_biemond/32/72686_2.png) [@Edwin\_Biemond](https://community.homey.app/u/Edwin_Biemond)\
**Post date:** [March 12, 2024, 7:28pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/117 "2024-03-12T19:28:27Z")

</div>

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.

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

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 12, 2024, 9:19pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/118 "2024-03-12T21:19:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [March 12, 2024, 9:21pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/119 "2024-03-12T21:21:35Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![Sasan\_Khandanpour](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sasan_khandanpour/32/79941_2.png) [@Sasan\_Khandanpour](https://community.homey.app/u/Sasan_Khandanpour)\
**Post date:** [March 12, 2024, 9:25pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/120 "2024-03-12T21:25:19Z")

</div>

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.

[Previous page](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497.md?page=5)

[Next page](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497.md?page=7)
