Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Duke Energy Usage Today sensor rising off the charts! #50

Closed
apercrcl01 opened this issue Dec 15, 2021 · 5 comments · Fixed by #51
Closed

Duke Energy Usage Today sensor rising off the charts! #50

apercrcl01 opened this issue Dec 15, 2021 · 5 comments · Fixed by #51

Comments

@apercrcl01
Copy link

v0.1.0b7

At a little after 11am eastern time, the Duke Energy Usage Today sensor started climbing much higher than the actual usage. The Duke Energy Current Usage sensor is functioning properly. I checked the Duke app and can confirm that I am not actually using this much energy. I have tried restarting Home Assistant. Restarting the Duke App. When I get home I will try to power cycle the gateway.

image

@JacobWasFramed
Copy link

I am seeing the same behavior.

@mjmeli
Copy link
Owner

mjmeli commented Dec 16, 2021

I just started seeing this around 6pm Eastern. Investigating...

@mjmeli
Copy link
Owner

mjmeli commented Dec 16, 2021

I believe they changed their API responses today. I have always used the "i" variable to pull the energy reading in Wh for a given minute. However, at the same time as the spike, this value suddenly spiked about 10x. The new value looks like a power reading to me (in W).
image

Before this change, the value in "dr" always equaled the value in "i". Now they are different. Perhaps I should be using "dr". I am slightly concerned however that "dr" seems to have lost precision after this change.

EX: "i" is 717.85, "dr" is 12.0. If "i" is average watts for that minute, then the energy reading for that minute would be 717.85 / 60 = 11.96 Wh. This value is only a small error from 12.0 but that would add up over a day. I'll do some testing and figure out which one the app shows.

@mjmeli
Copy link
Owner

mjmeli commented Dec 16, 2021

The difference isn't as big as I thought. In my situation, the app shows 15.59 kWh. Using "dr" calculates to 15.595, and using "i" comes to 15.598. I'm going to put an update into the mjmeli/pyduke-energy repo to switch the data source. I'll then need to update the HACS integration. Since this is somewhat critical, I will need to push a new stable version and a new beta version.

@mjmeli
Copy link
Owner

mjmeli commented Dec 16, 2021

New versions are pushed to HACS

Stable: v0.0.11

Beta: v0.1.0b8

The spike will still be visible in your history but new values should be correct.
image

Thanks for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants