Git Product home page Git Product logo

Comments (6)

RicArch97 avatar RicArch97 commented on May 20, 2024

When energy usage was just implemented, the incrementing logic was done by the integration, and the state of each energy usage entity was the total amount. However, when Home Assistant released their own energy management, this wasn't required anymore, as it now takes care of the delta's, resets etc to track a total value.

The implementation was simplified (since 2.0.0) to where the entity states are just the values directly reported by the Crownstones over USB updates, and rounded to 2 decimals as it's a floating point number with many digits. It is unlikely you will ever reach the maximum value on this, and even then it shouldn't stop counting, but rollover and become negative. This means there's basically no integration logic behind the value.

The integration was never endurance tested, and since HA basically runs 24/7 for most people it would be nice to see if something indeed did go wrong.

You could check the USB values for your specific Crownstones by adding this to your configuration.yaml file:

logger:
    default: info
    logs:
        crownstone_uart: debug

And then, track the logs live, as described in here https://www.home-assistant.io/integrations/logger/#viewing-logs

You should be able to see the updates from the Crownstones (1 minute interval). You'd want to check if:

  • If you have let's say 4 Crownstones, you get updates for all 4 of them. Watch crownstoneId and see if you receive updates for 4 different id's.
  • Watch the accumulatedEnergy value, and see if it changes. Best done for a device that has high power usage so you could actually see the value change.

If neither of the above statements are true, then it's likely not an issue with the integration, but UART / firmware related.

from crownstone-home-assistant.

AlexDM0 avatar AlexDM0 commented on May 20, 2024

from crownstone-home-assistant.

vliedel avatar vliedel commented on May 20, 2024

Hi, accidentally we have encountered a similar situation similar to yours a week ago. See this issue. We will have this fixed in firmware 5.7.

In the meanwhile, if possible, you can simply reboot the crownstone, and the accumulated energy reported by the crownstone should start at 0 again. The integration should recognize that (@RicArch97 should know if it actually does) and continue to increase the accumulated energy.

Regarding using the power to calculate energy on the HA side: that would also fix this, but is less accurate (as the power can change much quicker than what HA receives).

from crownstone-home-assistant.

RicArch97 avatar RicArch97 commented on May 20, 2024

The integration should recognize that (@RicArch97 should know if it actually does) and continue to increase the accumulated energy.

The energy dashboard will indeed detect it as a reset and handle this. The actual sensor value on the entity is the Crownstone value so that will go back to 0

from crownstone-home-assistant.

RicArch97 avatar RicArch97 commented on May 20, 2024

Hi, this issue should be fixed in the firmware 5.7 update as mentioned above. Can we close this issue now?

from crownstone-home-assistant.

jonathanhofman81 avatar jonathanhofman81 commented on May 20, 2024

I can confirm that the issue indeed behaves as described by @vliedel. Interrupting the power indeed made that the crownstone starts the energy measurement. I assume we can close this issue as it is not caused by the home assistant plugin.

from crownstone-home-assistant.

Related Issues (9)

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.