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

Solax daily / total sensors mixed up and incorrectly marked as total_increasing #130742

Closed
darmach opened this issue Nov 16, 2024 · 3 comments · Fixed by squishykid/solax#178 or #131373
Closed

Comments

@darmach
Copy link

darmach commented Nov 16, 2024

The problem

Four sensor values are wrong on Solax X3-Hybrid-G4 - I don't have other solax inverters to compare.

Both Consumed energy and Feed in energy:
a) _consumed_energy_total and _feed_in_energy_total- this is not actually a total value, it's reset daily - daily value, wrong name.
b) _consumed_energy_total and _feed_in_energy_total - as daily reset, it's state is market incorrectly as total_increasing.
c) _consumed_energyand_feed_in_energy- lack a_totalsuffix, but actually this is a total increasing sensor.state**correctly** marked astotal_increasing`.

Summary - total and daily are swapped, and both incorrectly state: total_increasing

I'll try to find this in the code and open a PR if time allows.

What version of Home Assistant Core has the issue?

core-2024.11.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

solax

Link to integration documentation on our website

https://www.home-assistant.io/integrations/solax

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @squishykid, mind taking a look at this issue as it has been labeled with an integration (solax) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of solax can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign solax Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


solax documentation
solax source
(message by IssueLinks)

@darmach
Copy link
Author

darmach commented Nov 16, 2024

I suspect while tagging the sensors with state set to total_increasing is done by the integartion, the daily/total getting mixed up could've happened in the solax library in this line

            "Feed-in Energy": (pack_u16(86, 87), Total(Units.KWH), div100),
            "Consumed Energy": (pack_u16(88, 89), Total(Units.KWH), div100),
            "Feed-in Energy total": (pack_u16(90, 91), Total(Units.KWH), div100),
            "Consumed Energy total": (pack_u16(92, 93), Total(Units.KWH), div100),

The initial issue might be from reverse engineered API data here

  FeedInEnergy: read32BitUnsigned(Data[86], Data[87]) / 100,
  ConsumeEnergy: read32BitUnsigned(Data[88], Data[89]) / 100,

The total values are missing in nazar-pc/solax-local-api-docs for Solax X3-Hybrid G4

Daily reset sensors for feed-in and consumed energy seem to miss today postfix that is used by other daily reset sensors like Battery Charge Energy today or EPS Energy today which adds to confusion.

@darmach
Copy link
Author

darmach commented Nov 23, 2024

Attempt to fix:
squishykid/solax#178

@squishykid squishykid mentioned this issue Nov 23, 2024
19 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant