Comments (6)
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.
from crownstone-home-assistant.
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.
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.
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.
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)
- Device triggers not being loaded from custom_component HOT 1
- [Feature Request] show energy & power usage HOT 24
- Crownstone Home Assistant Integration - Official HOT 2
- Home Assistant instable because of this integration HOT 4
- USB dongle not found HOT 16
- Support for energy management HOT 11
- Automation based on presence can't be created HOT 8
- Energy is 0kWh using dongle HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crownstone-home-assistant.