# \[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:** 1

<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:** [February 20, 2024, 7:13pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/1 "2024-02-20T19:13:05Z")

</div>

**Modbus**  
A small tool to add every Modus/TCP device to Homey

[![HomeyPro_Modbus_AppLogo](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c7f2969485c3418b72c445c3b9e7ca663ae56454.png)](https://homey.app/a/org.modbus/)

> **[Modbus](https://homey.app/en-us/app/org.modbus/Modbus/)**
>
> Connect every Modbus devices

* * *

This tool allows to add any Modbus/TCP device to Homey without a specific app.  
You can read and write Modbus register with flows.

**How to start?**

Add a device. Insert the Modbus details of your device including IP address, port and Modbus device ID.

 ![HomeyPro_Modbus_AddDevice02](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/5/b57cb977956f6e58dd4039b63fc3fa951d2fa825.png) ![HomeyPro_Modbus_AddDevice03](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c1c176f963c8122ac8bf8f50579acb8a2c25f87e.png)

The Homey device doesn’t offer functionality. It only connects to your Modbus device.

**How to read/write register?**

Create a flow and use the dvice flow actions to read a register.

 ![HomeyPro_Modbus_Fronius04](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/4/d43c75da002202f33eb7ea9624734e220a3b0fd4.png)

Use the second flow action to write a register.

 ![HomeyPro_Modbus_Fronius07](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/4/64a0b000ab2de6572670821cc7288bd34fe74840.png)

**Be careful!** Use the manufacture Modbus reference.  
Change only those registers for which the meaning is known.  
Read the register before and remember it’s value to be able to reset the value to a default value.

* * *

A **description and a use case** reading and writing register of a **Fronius inverter** is available on my Homepage:

> **[Modbus – Ronny Winkler](https://rwdevelopment.de/homeypro-apps/modbus/)**

There you can **register for a newsletter** to get updated when a **new blog post** is published.  
And you can **ask for further blog posts** about examples, HowTo’s and technical insights.

---

<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:** [February 20, 2024, 7:13pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/2 "2024-02-20T19:13:19Z")

</div>

reserved 01

---

<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:** [February 20, 2024, 7:13pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/3 "2024-02-20T19:13:24Z")

</div>

reserved 02

---

<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:** [February 21, 2024, 6:55am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/4 "2024-02-21T06:55:36Z")

</div>

this is nice!  
Currently I’m running some commands on a Huawei inverter via python scripts via huawei\_solar module.  
It would be nice to have it directly in Homey.

I’ll read the documentation and come back with results.

---

<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:** [February 24, 2024, 1:03pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/5 "2024-02-24T13:03:19Z")

</div>

**Version 0.1.2** :

- Fixed flow card registration.

Sorry for the bug preventing usage of flow cards 🙃  
Please update to this version to use the flow cards.

---

<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:** [February 24, 2024, 8:02pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/6 "2024-02-24T20:02:23Z")

</div>

I added [some examples for the Fronius Gen24 Inverter and BYD battery](https://rwdevelopment.de/2024/02/20/modbus-anwendungsbeispiel/) to

- restrict battery discharge while charging car from grid
- force battery charge (low pv yield) during a cheap tariff

---

<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:** [February 25, 2024, 9:49am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/7 "2024-02-25T09:49:04Z")

</div>

nice,

will check it , did you solve all these variations of registers type, mostly (u)int16 are easy but (u)int32 , float32, uint64 are hard with LE and BE plus everyone is doing it differently.

---

<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:** [February 25, 2024, 10:08am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/8 "2024-02-25T10:08:48Z")

</div>

Hi,  
Fronius only uses uint and int for most useful registers. Some are bitfields, but can be set with int values.  
The complete register list you can get at:  
[https://www.fronius.com/en/solar-energy/installers-partners/technical-data/all-products/system-monitoring/open-interfaces/modbus-tcp](https://www.fronius.com/en/solar-energy/installers-partners/technical-data/all-products/system-monitoring/open-interfaces/modbus-tcp)

You need to register with your name/email. But I can send you the file(s) via mail if you would send me your email address.

I only checked the ones I need for direct control of charge/discharge and min SoC level.  
I don’t think there is much more you can control.

---

<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:** [February 25, 2024, 11:14am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/9 "2024-02-25T11:14:58Z")

</div>

if you want and have a vpn , I can try to add it. I know in Germany it is very popular.

---

<div class="post-metadata">

**Author:** ![Andi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andi/32/160466_2.png) [@Andi](https://community.homey.app/u/Andi)\
**Post date:** [February 26, 2024, 8:38pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/10 "2024-02-26T20:38:12Z")

</div>

It would be great if you could add INT32 (Signed integer 32 bits) as I need this for Huawei:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/a/aa3ffae0da3fa7f69a2a1e4feda2439d68be6656.png)

---

<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:** [February 27, 2024, 9:43am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/11 "2024-02-27T09:43:28Z")

</div>

I would be happy if INT32 could be included. Also using Huawei. Thanks!

---

<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:** [February 27, 2024, 10:53am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/12 "2024-02-27T10:53:41Z")

</div>

New **test version 0.1.4** :

- added some data types to read register flow card.

> **[Modbus](https://homey.app/en-us/app/org.modbus/Modbus/)**
>
> Connect every Modbus devices

* * *

@Andi @Bosse_Rasater  
Can you please install the test version and try if it’s reading the data correctly?

---

<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:** [February 27, 2024, 12:45pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/13 "2024-02-27T12:45:03Z")

</div>

I’ve done a quick test with INT32 on a couple of registers and it seems to work great.  
Thank you for your quick response to the request!

---

<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:** [February 27, 2024, 4:58pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/14 "2024-02-27T16:58:06Z")

</div>

New **test version 0.1.5** :

- Added numeric rersult token to “read register” flow card.  
You can use the numeric results now directly in other flow cards.  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/b/fb1fc3e866eed2d20f776e30771ac5da3dd19c5e.png)

And as hint a use case for the **SCALE type** :  
If you have INT values representing numeric decimal values, then you will find a scale register in addition.  
The scale represents a factor for decimal point shift.  
If the register value is -2, it means you have to calculate a value 10000 \* 10^-2 to get the real value of 100,00.

If you read a register of type **sunssf** as INT16, you will get “-2” as result.

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/8/587124e6117cf10a84c8b37cfad9c78407cd8e0d.png)  
If you read it as type **SCALE** , you get “0.01” as result, so you can directly us this factor in flows.

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

---

<div class="post-metadata">

**Author:** ![Andi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andi/32/160466_2.png) [@Andi](https://community.homey.app/u/Andi)\
**Post date:** [February 27, 2024, 7:57pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/15 "2024-02-27T19:57:45Z")

</div>

It works! Thank you

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/1/d1ff2acc535d1ab03b7c56901dcd4d4b9cfa2cfb.png)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/f/0f44161a117ea56b6d7f50964f532bec92fe192a.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:** [February 29, 2024, 8:43am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/16 "2024-02-29T08:43:30Z")

</div>

Hi, i am having still problems to read out modbus.  
I have also Huawei Dongle Dongle-TA22B0293914  
and SUN2000-10KTL-M1 converter. I want to read out the PV active power. It should be a 32-bit signed integer on adress 32095 with size 2. But it doesn’t work at all. I always get the error code Encountered an unexpected error value: ‘[object Object]’  
Who can help me? Someone else using Huawei?  
Thats the flow card:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/3/33b98257be49e7fb7587a11b9f10fec92b6fd8b5.png)

Second Question: Does anyone know the register for the SOC of the battery?

---

<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:** [February 29, 2024, 11:50am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/17 "2024-02-29T11:50:11Z")

</div>

Can you please use test version 0.1.6. I adjusted the error handling. I hope the content is now visible in the message.

---

<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:** [February 29, 2024, 12:02pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/18 "2024-02-29T12:02:54Z")

</div>

SOC:

 ![Screenshot 2024-02-29 at 14.02.35](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cf629317f70c1eda507c1f9f43750365d1a5dde2.png)

New app version provides numeric results for “read register” flow card.

 ![Screenshot 2024-02-29 at 14.07.06](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/5/a5aeb0008d7a324facf0f2bc8635b297d2c58bb1.png)

---

<div class="post-metadata">

**Author:** ![Andi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andi/32/160466_2.png) [@Andi](https://community.homey.app/u/Andi)\
**Post date:** [February 29, 2024, 7:27pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/19 "2024-02-29T19:27:26Z")

</div>

Battery SOC (Huawei Luna):

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/c/dc101d6141d252a52d876fbe7258a1fa9d4dd8a4.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:** [February 29, 2024, 7:37pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/20 "2024-02-29T19:37:17Z")

</div>

Thanx for your examples. I’ve learned much of it. But now I realize a huge new problem:  
I have 18,4 kwpeak of solar capacity. That is why I have two inverter! I have first read out the active power of only one inverter and i wondered why the watt number is so low compared to thefusion solar app. Now i realized that on ID 1 there is the inverter one with 8 kW and on ID 2 is the second inverter with 10 kW. The battery is also on inverter 2. Is that the reason I wasn’t able to read out battery SOC?  
Now i have add a second modbus-module with the same IP but with ID2. But since than, i am not able to read out anything. Is it because its now dark outside and the inverters are sleeping? Or is the Modbus/TCP App not able to handle 2 different IDs???  
That might be an interesting question directly to the developer! @RonnyW !

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