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

When i start at the modbus device→flow→create new flow, i can select all cards to start creating a flow.

But when i start from scratch with a new flow and want to select a “when” card, i only get the 3 options as mentioned before.

I “overinstalled” the app. notthing changed.

Is it possible to delete the app and reinstall it without loosing de fow cards ?

No, uninstall removed the device and all flow card become unavailable.

I habe to ask Athom about this issue. Can you please provide some screenshots and a short explaination so I can link the post? Thanks.

It is difficult to capture the problem in screenshots.

Other question, what is the difference between “modbus device” and “modbus slave device” Is the “modbus device” a master/client and de “modbus slave device” a slave/server ?

In that case when writing to modbus registers, they are stored in Homey and i can read them out and write to them with an other master/client ?

In normal caee, you only need the Modbus device.

A slave device is a modbus dehice with a second Modbus ID “behind” the ModbusTCP device you are connecting with IP and ID. This can happen if you want to control a Modbus device that is not directly accessible (only connected via Modbus serial to your ModbusTCP gateway).

Reading and writing registers is done on the “real” Modbus device. If you write a register via flow card, the value is changed on your hardware (e.g. inverter).

Background: I am trying to limit the active power on my SMA Tripower STP TL9000 inverter. The Homey SMA app is not addressing the correct address (as it is writing to flash memory with limited cycles), developer is not reacting to requests.

So Modbus is an alternative solution, but I am careful and do not want to brick the device.


The register to read/write is 40212. Found this in SMA documentation, and verified using SMA Sunny Portal online. I can read this perfectly “Read holding register 40212 with size 2 of type UINT32/ACC32 with addressing Address, starting with #0. In my case I read a decimal 4950, which is the power limit in Watt.

If I try to write “Write holding register 40212 with value 4950 of type UINT32/ACC32 with addressing Address, starting with #0 in Live mode” I get a Modbus error message.

I found an old post here: “Correct. For reading I now have to use “INT32-LE (16-bit Word LE)” with size 2 (size 1 returns an error), and for writing I have to use INT32. Very strange.”

What is the correct syntax and especially the type to use? I read decimal so assume I can write decimal. I do not see a “size” statement, so assume something is wrong with the type. Can someone experienced comment and suggest? Can I brick the device with wrong instructions?

For reading, a size can be set, but it’s inly needed for string values (text across several registers). For others like INT, the size is defined by the type itself.

The UINT is writing a BigEndian value (like 12 34 56 78 as 4 bytes/2 registers) . Some devices are using a mixey Byte order für 2Byte values like 56 78 12 34. Then you can use the 16bit word LE.

LowerEndian would be 78 56 34 12.

But it’s up to the device what is needed. You can only try to use different UINT32 variants, write first, then read and compare to find the correct type, if there is no hint in the manual.

Hi @RonnyW Love your APP!!

I have used it to integrate Carlo gavazzi uwp3.0, EM340 Energy meter and are working on the CHINT nb2le-80zt and I can read the energy values with the holding register function :smiley:

But I am now wanting to use the function code 0x11 (Report Slave ID?)
Do you think it is possible to add this function code? :smiley:
Want to be able to read the “Status”
From the Modbus register manual:

Edit:
One more question is it possible to send “Raw” modbus commands? :thinking:
Seem like it isnt possible from homeyscript? :frowning:

and another one:
Why can we read int64 etc, but Not write int64? :thinking: *

The used NodeJS module jsmodbus only supports codes 1 - 6 and 15 and 16.
It’s not possible to request 0x11 data. And based on documantation I read it’s mostly used for serial Modbus, not for Modbus TCP.

Is it a slave device you want to read? Isn’t it possible to add this as a slave device with its ID to Homey and read registers directly from this device?

No, the module only supports the 4 types used in the app.
It would need another NodeJS module that supports this functionality.

Do you really have a use case or register where you can write INT64? I’ve only seen values up to 32bit.

after more reading in the manual the data was in a holding register to :smiley:
Just hidden inbetween the cels in an excelsheet :slight_smile:

The raw command would just have fixed alot I feel like it :smiley:
But thanks for explaining why it isnt in this app :smiley:

Was just noticing it and wondered why :smiley: As you say. Rearly anything to write int64. But have seen values to read (energy meters, serial numbers, etc)

Like MdJ in this topic 7 days ago, I am migrating form my Homey 2019 to a new 2026.
I have SMA inverters and on the 2019 I use flows to read register values of those inverters. All works fine.
I have created a Modbus device on the 2026 with exactly the same parameters IP/Port/ID as on the 2019. I created a test flow with the same card as in my 2019. On the 2019 it gives me the value I need but on the 2026 it throws an error when testing.

The error is “Dit apparaat is nu niet beschikbaar”
Would be possible that the problem lies in have both Homeys up at the same time?
I already re-installed the app and restarted it. Also the Modbus device itself on the 2026 gives a connection time-out

Hi, this normally means the device itself (Homey device) is unavailable. Can you please check the device if there is an error message shown in device details?

Hello Ronny,

It´s a timeout error. If I test from the same card in my 2019 flow immediately afterwards, it gives me the values without a problem/error.

It seems your Modbus device only allows single connections.

You can adjust the settings in HP19 to manual connect. Then try on your HP26 to connect.

That did the trick! Thanks

Hi @RonnyW. Do you have a good idea for handling this? :sweat_smile:

I don’t understand what’s the issue?

Is something changing on Modbus end withoit running the flow? Or are bits still overwritten?

Btw…what a Modbus device is it that uses such bits?