Git Product home page Git Product logo

Comments (14)

gndean avatar gndean commented on September 23, 2024 2

Interesting. It is by design that the Hypervolt Session Energy resets for each session - this is to match the behaviour of the mobile app.
When summing the energy used, there may be a solution to your issue... The sensor currently has the state class of "Total" which I think is why the resets decrease the total sum of energy used. There is an alternative state class of "Total Increasing" which maybe this sensor should be declared as, so that the resets don't decrease the totals: https://developers.home-assistant.io/blog/2021/08/16/state_class_total/

I'll have a look into this and a play around.

from home-assistant-hypervolt-charger.

exalyte avatar exalyte commented on September 23, 2024 1

Appears to have worked for last night.

Here are the results, for both sensors on mobile sorry.

Screenshot_20221221-083646
Screenshot_20221221-083652

from home-assistant-hypervolt-charger.

n0rbie avatar n0rbie commented on September 23, 2024

Same for me:

image

from home-assistant-hypervolt-charger.

exalyte avatar exalyte commented on September 23, 2024

I attempted to amend the sensor config but just ended up breaking it (im not new to HA just terrible at it :D)
Its done the same thing again tonight though so now my "month" (2 days) of charging is...
image
wish it was so little 🤣

edit ignore the insane AC numbers i broke that at the same time as the hypervolt sensor, was copy pasting configs between the two and accidently x100 the AC numbers lol

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

I've added a new sensor Hypervolt Session Energy Total Increasing to V1.0.3 with the Total Increasing class mentioned above. However, I don't think it's going to work, because of the warning from the Home Assistant page about that:

It is important that the integration ensures that the value cannot erroneously decrease in the case of calculating a value from a sensor with measurement noise present.

I do see the Session Energy decrease, just before the session is stopped e.g.:

image

Each one of the marked points counts as a reset and HA ends up counting approximately double the actual energy used. I think I've confirmed this by seeing double the expected value in my energy monitor within HA.

I will probably drop the Hypervolt Session Energy Total Increasing sensor from the next release, unless you think it has value? But I think a different approach is required.

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

Maybe I could only update the value of Hypervolt Session Energy Total Increasing only when:

  1. the session ID changes
  2. charging stops

and not during the middle of charging session.

In the first case, the value would reset down to 0, or close to 0.
In the second case, the value would be that of the end of the session and would get summed by HA
🤔

from home-assistant-hypervolt-charger.

exalyte avatar exalyte commented on September 23, 2024

Maybe I could only update the value of Hypervolt Session Energy Total Increasing only when:

  1. the session ID changes
  2. charging stops

and not during the middle of charging session.

In the first case, the value would reset down to 0, or close to 0. In the second case, the value would be that of the end of the session and would get summed by HA 🤔

Yeah I hit the stumbling block, I think the best option is to use the summeration ie the season ct energy and use it as a total increasing, I tried this editing the sensor.py but it broke completely and I had to delete the integration, this is probably my lack of understanding more than anything. A massive thank you for building and supporting this!

Cheers

Exa

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

Trouble with that is, the CT Energy measures everything that passes through the CT clamp which, depending on your installation, is likely to be all your household loads too, not just the Hypervolt.

from home-assistant-hypervolt-charger.

exalyte avatar exalyte commented on September 23, 2024

Oh I did not know that, my CT clamp is inside the charger chassis, I then have another one externally that is for load balancing. Might try unplugging the external clamp and see 👍

from home-assistant-hypervolt-charger.

Kahn avatar Kahn commented on September 23, 2024

I solved this for my energy dashboard with a utility meter that resets daily and is incremented by the session_energy. In my install the CT power is zero, which has been the whole drive for getting HA talking to the Hypervolt.

sensor.hypervolt_session_energy
Status
collecting
Last period
3943
Meter period
daily
Cron pattern
0 0 * * *

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

OK, V1.0.4 contains some updated logic for the sensor: Hypervolt Session Energy Total Increasing:

  • While charging, Hypervolt Session Energy Total Increasing takes on the maximum value seen from Hypervolt Session Energy. By using the maximum, it never drops causing an erroneous reset
  • When a new charging session is seen (detected by a new Session ID), Hypervolt Session Energy Total Increasing resets to 0

I'm going to give it a try and see what happens.

from home-assistant-hypervolt-charger.

exalyte avatar exalyte commented on September 23, 2024

OK, V1.0.4 contains some updated logic for the sensor: Hypervolt Session Energy Total Increasing:

  • While charging, Hypervolt Session Energy Total Increasing takes on the maximum value seen from Hypervolt Session Energy. By using the maximum, it never drops causing an erroneous reset
  • When a new charging session is seen (detected by a new Session ID), Hypervolt Session Energy Total Increasing resets to 0

I'm going to give it a try and see what happens.

Updated shall test overnight, thanks again!

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

@exalyte is this still working for you? If so, we can close the issue and I'll add some notes on the new sensor to the next release's readme.

from home-assistant-hypervolt-charger.

exalyte avatar exalyte commented on September 23, 2024

@exalyte is this still working for you? If so, we can close the issue and I'll add some notes on the new sensor to the next release's readme.

Sorry got busy yes few days in and the sensor it holding steady.
Thank you again for the hard work

Closed.

from home-assistant-hypervolt-charger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.