Hmm... I don't really understand that... the instructions for getting that value, the 32bit int is to get 2 words from modbus, starting at holding register 53.
Oh! So that's for the input, that makes sense! I thought that was for the output.
That works as BE and that gives me a value of 285169 (working with live values so they change from what you have) and I need to just divide by 10 to get kWh
However the number seems a bit too small, 28516,9 kWh is too small to be able to be correct.
Unfortunately the display in the meter has died so I cannot double check the figures...
Are we sure that we have the word order right? The instructions confuse me.
"For all the formats the byte order (inside the single word) is MSB->LSB. In INT32, UINT32 and UINT64 formats, the word order is LSW-> MSW."
Maybe it's correct, it seems to increase steadily, if the bit or word order was wrong I guess the value would not increase normally.
You may need to do swap 16 or swap 32 on the data and mess about with the BE and LE functions
If you can identify another int32 register where you know what the value will be, you could try grabbing that and see if the current int32be is working as expected (adjust swap/le if not)
That's a good idea, I'll see what I can find in the registers
EDIT:
I checked with Register 1 which is also a 32Bit INT, it is for L1 voltage which i know is supposed to be around 240. Swapping to that register in the modbus node gives 240.4 so by all accounts the byte order is correct.
There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.
Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.
Also, you don't need to parsefloat it, it is already a float. You can use a Change node to move it into msg.payload if that is what you want. Whether you actually need to do that depends on what you want to do with it next.
Oh I remember that now! I did all my Node Red flows some years ago and have since then forgotten a lot it seems! I was just adding a new value to my log and I was so lost
Anyway, I realized the Gavazzi manual actually states the modbus addresses as starting from 1, but with my modbus reader it starts from address 0. So I was reading the wrong address. That is why the numbers didnt add up . I thought kWh tot was at address 53 but it should be read at 52.
This also meant the bytes were all screwed up, so the final setting for me in the parser as long as I was reading the correct modbus address was int32LE with a swap16
I think I guess I'll know tomorrow if the values add up or not...