Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ac_meter Total Watt-hours Exported sign issue #249

Open
DooMMasteR opened this issue Feb 4, 2024 · 3 comments
Open

ac_meter Total Watt-hours Exported sign issue #249

DooMMasteR opened this issue Feb 4, 2024 · 3 comments

Comments

@DooMMasteR
Copy link

Version of the custom_component

0.025

Configuration

image

Describe the bug

ac_meter Total Watt-hours Exported is a huge value, slowly lowering whenever electricity is exported
image

@dp2008
Copy link

dp2008 commented Mar 19, 2024

Have the same problem with Kostal Smart Energy Meter
there seems to be a fix for openHAB but nothing for HA:
https://community.openhab.org/t/solved-wrong-values-with-modbus-and-kostal-smart-energy-meter/99785

see last comment form Oct 2022:
the Kostal SEM reports Exported Real Energy as signed int32 instead of unsigned int32, which makes it report bad values.
Same happens in Home Assistant and with the official Sunspec verification tools.

@DooMMasteR
Copy link
Author

Yeah I already tried to get KOSTAL to fix the issue in firmware, but they are super shitty at supporting their products.

@guidoffm
Copy link

guidoffm commented Jul 21, 2024

I have the same problem with the Kostal meter. I found a workaround, until a compliant firmware is available: You can install the Node Red add-on. Then, you can read out one of the wrongly interpreted values, convert it to the correct value, and then send the corrected value to a new virtual sensor in Node Red.

The conversion function is quite simple:

function convert(v){
    return -(v << 0);
}

The << operator converts the uint32 to int32, and the - sign makes the value positive again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants