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

Tesla: Fix power W calculation #119

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Tesla: Fix power W calculation #119

merged 2 commits into from
Jan 2, 2024

Conversation

dalathegreat
Copy link
Owner

@dalathegreat dalathegreat commented Jan 2, 2024

What

Noticed by @MarkoBolt that the stat_bat_power variable is not formatted correctly. This affects all inverters getting wrong values, and also the webserver will show wrong values.

Why

See how the W is shows as -21313W instead of −8685W
bild

After the fix is applied:
bild

How

This PR fixes the calculation of the value. It is tricky since the signed16 value should be put in an unsigned register (due to legacy modbus reasons)

@dalathegreat dalathegreat changed the title Fix power W calculation Tesla: Fix power W calculation Jan 2, 2024
@dalathegreat
Copy link
Owner Author

Forcing this as merged, due to being tested in the Issue it was spawned from!

@dalathegreat dalathegreat merged commit e964b89 into main Jan 2, 2024
32 checks passed
@dalathegreat dalathegreat deleted the bugfix/tesla-power branch January 2, 2024 19:46
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

Successfully merging this pull request may close these issues.

1 participant