-
Notifications
You must be signed in to change notification settings - Fork 2
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
Energy value stops incrementing #9
Comments
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 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 neither of the above statements are true, then it's likely not an issue with the integration, but UART / firmware related. |
Just as a small check in between, could you check the firmware version of the Crownstones? Are they all updated to the latest version?
You can see this by going to the app, room containing crownstone->crownstone->edit and scroll to the bottom.
It should be 5.6.4.x
Regards
…________________________________
From: Ricardo Steijn ***@***.***>
Sent: Tuesday, September 6, 2022 11:36:49 PM
To: crownstone/crownstone-home-assistant ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [crownstone/crownstone-home-assistant] Energy value stops incrementing (Issue #9)
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.
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.
—
Reply to this email directly, view it on GitHub<#9 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABI5MTN7RXEGI7Q6AO7BDKTV462PDANCNFSM6AAAAAAQGFPIMU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
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). |
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 |
Hi, this issue should be fixed in the firmware 5.7 update as mentioned above. Can we close this issue now? |
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. |
I experience problems with energy monitoring for some months now. It has worked correctly in the beginning. The problem started with one Crownstone that still reports power usage as expected, but does not increment the energy count. Recently more devices don't seem to update correctly anymore. It started with a high power user (the heat pump). It first worked correctly (or at least it seemed logical values), then it didn't increment the energy value on 'low' energy usage (+/- below 100W), now it does not increment any more. Also at the heat cycle for warm water (which typically uses between 800W and 1,2kW for 2 hours) doesn't show any energy increment.
Power usage heat pump
Energy usage heat pump
Now also the freezer and refrigerator seem of. For example, the freezer did use today (according to the crownstone) only 0.13kWh, while its power usage is +/- 34W. I would have expected an energy value larger 0.4kWh.
Power usage freezer
Energy usage freezer
The freezer crownstone only seems to report the larger energy spikes and not the background spikes anymore.
I don't know if this is related to #8. I expect it is different. Initially I expected it to be a problem with the crownstone firmware (counters that are to small or so), but now more devices have the same issue it might be something different. Are the energy counters switching to a lower resolution if it obtains larger values? I'm running the crownstones for a while so it could be that I reached some limit?
The text was updated successfully, but these errors were encountered: