volkszaehler / mbmd

ModBus Measurement Daemon - simple reading of data from ModBus meters and grid inverters
BSD 3-Clause "New" or "Revised" License
229 stars 81 forks source link

mbmd ignores last digits after decimal #276

Closed jarau-de closed 2 years ago

jarau-de commented 2 years ago

mbmd ignores the last digits after decimal point for power, reactive power and apparent power. They are always zero. If I look on the webserver of smartmeter the digits are there.

andig commented 2 years ago

Do you have an example? Which meter?

isarrider commented 2 years ago

it is the same for me but I think it isn't related to mbmd, but to what gets published (in my case via Modbus TCP)... In my case the Power of the inverter is rounded to full 10 W (2804W become 2800W...)

jarau-de commented 2 years ago

Yes indeed, it's rounded to 10 W. It would be nice to have the full resolution.

andig commented 2 years ago

but I think it isn't related to mbmd

Closing here- we can only output what the device offers...

jarau-de commented 2 years ago

You very fast, but too fast with closing. I can read modbus TCP and I get at least one digit after decimal. The webinterface of KSEM offers also one digit after decimal, see attached screenshot. It is indeed offered by device.

Screenshot 2022-09-02 at 17-53-02 KOSTAL Screenshot 2022-09-02 at 17-53-37 MBMD offered by device.

isarrider commented 2 years ago

@jarau-de can you be sure that the inverter provides these granular data via Modbus TCP? (Dont get me wrong, I would like to have it too - 10W jumps suck ;))

jarau-de commented 2 years ago

Ok, obviously there was a confusion on my side between KSEM and Kostal Plenticore. Both of them deliver Informations using Modbus TCP, but over different ports (502, 1502) and of course different IP. It is true, as mentioned by andig, the Sunspec values by KSEM of power are given by a resolution of 10^1 W. It is well defined in the KSEM documentation. image

But it has a lot more registers. See table below.

image

These registers have a much better resolution of 0.1 W. I have tested that with pyModbusTCP. But I don't know whether it could or would be implemented in mbmd... For my personal use I read the electric meter of my house directly by optical interface and volkszaehler. That means I don't need KSEM for this purpose.

But much more interesting would be the Modbus TCP interface of the Plenticore inverter. It delivers the total DC and AC power as well as the home consumption of inverter power which I need for tax office (and many, many other parameters). It would be very interesting to see these values in mbmd. I tried that using ./mbmd run -a 192.168.0.31:1502 -d KOSTAL:71 but unfortunately the values look a bit strange. I think it is caused by a different byte order?. It uses little endian (default) instead of big endian (SunSpec). I don't want to touch that configuration. For pyModbusTCP I had to switch the order to get proper values.

image If mbmd would implement these values I would be happy.

andig commented 2 years ago

It is true, as mentioned by andig, the Sunspec values by KSEM of power are given by a resolution of 10^1 W. It is well defined in the KSEM documentation.

I can't remember saying that. The Sunspec models have scale factors for basically every model/block/point which provide arbitrary resolution.

I'm lost: what device and register are we talking about now? Sunspec or not?

jarau-de commented 2 years ago

@andig "Closing here- we can only output what the device offers..." This what you said and you are right. :-)

I would like to see my Kostal Plenticore power SunSpec informations correctly (byte order).

Other users want to have higher resolution of KSEM power informations, but higher resolution seems not suppored by SunSpec registers. If mbmd concentrates on SunSpec, then KSEM question was answered, I think.

jarau-de commented 2 years ago

Good news, I switched the Plenticore to SunSpec byte order. Now mbmd works as expected and I can put inverter power into vz db. Now I have all I need and for me this topic is closed.

isarrider commented 2 years ago

Hi - can you detail a bit more what you did?