[APP][Pro] Modbus

Thanks.
Short hint: when using INT32 or similar, the set size from flow card is not uses. The amount of registers is read based on data type.
With type BYTE you should use a size of “2” (registers, not bytes).
The 00 00 at the beginning and at the end are irritating. Are you sure the 5998 is a register number and not an address?

The 5998 is the modbus adress and give me the correct value, as you see in the picture the reading are 220 and it correct when multiplied with 0,1 = 22,0 dgrC

There is an offset of 1 between address (starting at 0) and register (starting at 1). What is right should be documented in the manufacturers manual.

If’ the correct decimal value should be -1,3 (-13 as INT32), then FFFFFFF3 should be the right byte value.
I think you are 1 register off resulting in trailing 00 00 bytes.
In your case, the app would read 0000FFF3 and that’s 65523 as INT32.

Please change your flow card to “Address, starting with #0”. Then you should get a Byte result of FFF3FFFF reading with a size=2.

Sorry about the delay… I was stucked n a New Year dinner :slight_smile:
I tried to change the starting point to #0…here is the read value

Happy new year :grinning: Was also away and today it’s a lazy day.
But back to your example.
FFDE FFFF look right…if -3.4 would be the right value.

I used this converter:
https://www.simonv.fr/TypesConvert/?integers

And FFFF FFDE is -34 as INT32.
So it seemsyour device is using INT32LER (a lower endian variant where the registers are read from right to left - not the Bytes).

Perfect Ronny… thank you so much for your support. :grinning:. here is the result when trying another register type
… The correct value are -3,4 dgrC

1 Like

I think I have encountered a bug. I’ve recently changed my network, and needed to change the IP address. When I tried to update this setting inside the configuration, it seems to try to connect to the old IP first? Tried, restarting the app but the problem persists. Finally removed the device and added it as a new device to solve it.

Thank for the hint.
I haven’t found a real error. I think it’s a kind of race condition in this case.
When using the “keep connection” settings, the device tries to reconnect after connection lost. I think this works while changing the settings. Then the app disconnect from old IP and tries to connect to the new IP. This ended in a connect error (EISCONN / already connected). So an error on connect occoured and then the app resets settings to old settings and tries to reconnect to the old IP. This results in your connection timeout because the old IP was invalid.
Sorry for this really technical explaination :slight_smile:

I adjusted the connect logic to ignore the “already connected” error. I hope that works in future.

If such an error happens again and anyone needs a quick fix / workaround, please set “manual” as connection type. This prevents the check in settings view and you can adjust the IP. Then you can switch back to “keep connection”.

Ah, that totally make sense Ronny. Ill try to remember it when if a new modem forces me to use different IP ranges again :sweat_smile:

Hi Ronny, thanks yor the great app. I installed it, connected, but there are no flow cards available - Can you help me ? Thanks and bye, Lars

Hi,
did you add a device and set IP, port and id?
Then add a flow action (THEN card) to read registers.
Modbus is not pushing updates. You have to read it with flows, e.g.every 5min.