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

<div class="post-metadata">

**Author:** ![Mattias\_H](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mattias_h/32/79184_2.png) [@Mattias\_H](https://community.homey.app/u/Mattias_H)\
**Post date:** [October 21, 2024, 7:50am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/341 "2024-10-21T07:50:18Z")

</div>

Adress, i can only choose #0 or #1 in the Flow  
I can only manually adjust size and Register.

I don’t know where i find information about “size”

Also. That document i had linked earlyer might be wrong!  
I don’t have the Smart logger. so i guess this document is the one i should study: [https://www-file.huawei.com/~/media/CORPORATE/PDF/FusionSolar/HUAWEI\_SUN2000\_245KTL28KTL\_MODBUS\_Interface\_Definitions\_20150715\_JP.pdf](https://www-file.huawei.com/~/media/CORPORATE/PDF/FusionSolar/HUAWEI_SUN2000_245KTL28KTL_MODBUS_Interface_Definitions_20150715_JP.pdf)

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/optimized/3X/3/7/37709ae58c06ed76c7052b4a683a540c584ca92e_2_690x78.png)  
Still the same settings as previous (page 12)

is it OK to have modbuss adress 100 in the Intverters Dongle? ( i have set 100 in “Homey’s Device” too)

---

<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:** [October 21, 2024, 9:09am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/342 "2024-10-21T09:09:01Z")

</div>

> [@Mattias\_H](#):
>
> Adress, i can only choose #0 or #1 in the Flow  
> I can only manually adjust size and Register.

I meant changing the register.

Size is set internally based on the type. You can only set individual size for string type. For INT32, 2 registers are used.

> [@Mattias\_H](#):
>
> is it OK to have modbuss adress 100 in the Intverters Dongle? ( i have set 100 in “Homey’s Device” too)

Yes, it’s similar to other devices. In Homey you have to use the same ID which ist set in your inverter.

Based on the docs I think:

- Address: REGISTER #1
- Read Holding register (control 0x03)
- type INT32
- register 40525  
is right.

But I have no further ideas if that doesn’t work. You can only ask in Huawei forums.

---

<div class="post-metadata">

**Author:** ![Mattias\_H](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mattias_h/32/79184_2.png) [@Mattias\_H](https://community.homey.app/u/Mattias_H)\
**Post date:** [October 21, 2024, 9:35am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/343 "2024-10-21T09:35:59Z")

</div>

Thank you for now.,

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5a9281c09b88e0036d4e2c6b282d1bdc3c367d23.png)  
This is as far as i get…

For sh\*t and giggles i installed another Modbus app to see if something happend.  
And with that other app i get connected with the same settings as far as IP, Port and ID goes. (thats the red square in attached picture)

So. It feels like my inverter is correctly communicating?..  
(I don’t want to use that app because its not as good. 🙂 )

---

<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:** [October 21, 2024, 9:44am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/344 "2024-10-21T09:44:51Z")

</div>

“No connection” is perhaps caused by another connection done to your inverter. As default, Modbus allows multi connection tothe server while some devices don’t answer is another connection is active.  
But this should only ocour from time to time.  
The Modbsu error (wrong address) is another one.

What app is working for your? Which device did you add (the name from add device view)? Perhaps I can find something in the code.

---

<div class="post-metadata">

**Author:** ![Mattias\_H](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mattias_h/32/79184_2.png) [@Mattias\_H](https://community.homey.app/u/Mattias_H)\
**Post date:** [October 21, 2024, 10:50am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/345 "2024-10-21T10:50:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/4/e4b8ec2fb6371246134840c98c08dd018eb80c53.png)  
on the left, what i tested for fun.

On the right, the one i don’t seem to get connected properly with

---

<div class="post-metadata">

**Author:** ![Mattias\_H](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mattias_h/32/79184_2.png) [@Mattias\_H](https://community.homey.app/u/Mattias_H)\
**Post date:** [October 21, 2024, 10:51am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/346 "2024-10-21T10:51:35Z")

</div>

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

Current error

---

<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:** [October 21, 2024, 3:18pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/347 "2024-10-21T15:18:50Z")

</div>

You can check the Modbus registers used by the app:  
[solaredge.modbus/drivers/huawei.ts at main · biemond/solaredge.modbus · GitHub](https://github.com/biemond/solaredge.modbus/blob/main/drivers/huawei.ts)

It seems this are addresses (I haven’t found a -1 subtraction) I , so try the option “address #0” first.

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [October 30, 2024, 7:22pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/348 "2024-10-30T19:22:53Z")

</div>

![Skärmbild 2024-10-30 202116](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/c/ec3c2cfe124e2f41f98c547acecf3e3f0cec5eb0.png)  
Will this flow set 0 export when price is below 0? i dont know if i should start with 0 or 1?

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [October 30, 2024, 7:36pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/349 "2024-10-30T19:36:54Z")

</div>

![Skärmbild 2024-10-30 203243](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/f/dff3e1ed2fad8a09e264505fd46fefab6029da2d.png)  
Or This?

---

<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:** [October 30, 2024, 8:19pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/350 "2024-10-30T20:19:43Z")

</div>

You can not set export to 0.  
You can only set charge/discharge limit for the battery. That means: If your panels are producing, and your battery is already full, then all energy goes into the grid.  
Only way to prevent this is to activate “zero feed-in” in Fronius settings (via local access).

I only know changangeable registers for battery charge/discharge and not for production. But perhaps there is a register I haven’t seen.

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [October 31, 2024, 4:56am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/351 "2024-10-31T04:56:55Z")

</div>

Yesterday i read a forum for Home Assistant and i think the last flow may be correct. The first card is turn on/off soft limit, im not sure if thats the real name. The second card sets the % of installed kWp to 1%. So 100 is 1%.

But as i Said, im not sure at all.

> **[Automate Fronius Soft Limit](https://community.home-assistant.io/t/automate-fronius-soft-limit/465124)**
>
> \[Blog created showing step-by-step instructions here\] Hi, I am trying to dynamically change the output of my Fronius inverter. I want do this since I get wholesale power prices, which on occasion charge me to export power when the grid is...

---

<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:** [October 31, 2024, 6:09am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/352 "2024-10-31T06:09:58Z")

</div>

Oh, I checked the battery power registers not output. You are right. Register 40233 (address 40232) seems to be right.  
I would suggest to use register 40233 with option "Register starting at #1 to use same numbers as in Fronius docs).

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

Register 40237 (address 40236) seems to be the switch to turn on/off the limit.  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/f/7f30180680ff4ea1020faa9b804f17c3ee1456ff.png)

I think you can try. You can always revert to default values (R40233=10000 for 100% and R40237=0 for off).  
If it’s working, you can write a comment with your flows. I think that’s a good example for other users. Thanks.

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [October 31, 2024, 6:51am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/353 "2024-10-31T06:51:50Z")

</div>

Thanks. I would not be able to test this today but as son as i have time i Will. And i Will write here.

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [November 1, 2024, 9:41am UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/354 "2024-11-01T09:41:08Z")

</div>

Tested it today but there is 2 two problems. 1. When the load is bigger than the production my battery does not discharge.

1. I have two inverters. One Gen24 and one Symo. Its just the Gen24 that ramps down. My symo runs att usual.

---

<div class="post-metadata">

**Author:** ![JoeGer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joeger/32/78986_2.png) [@JoeGer](https://community.homey.app/u/JoeGer)\
**Post date:** [November 5, 2024, 7:10pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/355 "2024-11-05T19:10:07Z")

</div>

Hello everyone, I use an inverter from SMA. A STP10.0-3SE-40 0 22. The connection via Modbus can be established. But I can’t manage to read the registers correctly.

Can someone help me?

---

<div class="post-metadata">

**Author:** ![Frank\_Risch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frank_risch/32/80319_2.png) [@Frank\_Risch](https://community.homey.app/u/Frank_Risch)\
**Post date:** [December 10, 2024, 3:18pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/356 "2024-12-10T15:18:32Z")

</div>

Hi,  
I can read all the registers of my inverter. But to write I need the “Write Mutiple Holding Register” function. Would it be possible to implement this?

 ![Bildschirmfoto 2024-12-10 um 16.15.32](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/b/6b0bc29e2e44a936e0af9c967e3b08c99a69561b.jpeg)

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [December 10, 2024, 3:54pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/357 "2024-12-10T15:54:25Z")

</div>

I can no longer use this flow (2 cards) to set max discharge to 500w when my car is charging. It stopped working after i put i new battery in. I now have two towers BYD-Batteries. It worked before that. The modbus page in the inverter has also changed. Update?

 ![Skärmbild 2024-12-10 164602](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/f/af89ed3b3339eb0518375edce8a1949723c4efa7.png)  
 ![Skärmbild 2024-12-10 165142](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2e49954764b81ab8a7000e3edb9b8a9448cb2bac.png)

---

<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:** [December 10, 2024, 8:06pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/358 "2024-12-10T20:06:44Z")

</div>

> [@Frank\_Risch](#):
>
> But to write I need the “Write Mutiple Holding Register” function

The app uses the “Write single register” for a standard 16bit value and “Write multi register” for 32bit or more. That’s the default Modbus behaviour I think.  
Have you tried the “Write Holding Register” flow card with UINT16 or INT16 (I can’t in your example what’s needed) with Register 40149 (starting at #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:** [December 10, 2024, 8:28pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/359 "2024-12-10T20:28:31Z")

</div>

> [@Andreas\_Kjork](#):
>
> I now have two towers BYD-Batteries.

I thought the inverter is controlled by Modbus and the inverter controls the energy input/output of the battery.  
Are you able to set charge/discharge ampere settings in the Fronius Web (energy management/battery management then add a timebased setting for charge/discharge and test is that is working),

---

<div class="post-metadata">

**Author:** ![Andreas\_Kjork](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andreas_kjork/32/8354_2.png) [@Andreas\_Kjork](https://community.homey.app/u/Andreas_Kjork)\
**Post date:** [December 10, 2024, 8:50pm UTC](https://community.homey.app/t/app-pro-modbus-connect-every-modbus-devices/104497/360 "2024-12-10T20:50:04Z")

</div>

Im able to charge my batteries and set normal settings but my flow to max discharge with 500w does not work

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

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