Closed BrettEBowman closed 1 year ago
Yeah I've been noticing this. Their API is getting increasingly flakey. I'll have to dig into this
This is why, one of the API calls is failing
2022-09-07 14:08:35.626 DEBUG (MainThread) [pyduke_energy.client] Failed to find meter on account '': Request failed with unexpected error [https://cust-api.duke-energy.com/gep/v2/auth/account-details]: (ClientResponseError) 400, message='Bad Request', url=URL('https://cust-api.duke-energy.com/gep/v2/auth/account-details?email=&srcSysCd=ISU&srcAcctId=&bpNumber=')
I think I was able to track the source of the 400 errors on that API call. In my testing, I did not hit the error. I'm pushing up a fix that can be updated to via HACS shortly.
Please update to v0.1.2 of the integration and let me know if you are still seeing issues
I updated to v0.1.2. So far so good--it's connected now and getting data. Thanks!
Version of the custom_component
0.1.1
Configuration
Basically default configuration with 15 minute updates and correct Duke Energy Account which has the Gateway linked.
Describe the bug
Recently I've noticed quite a few failures of the integration to connect to the Duke Energy Gateway. This especially seems to happen after I do a restart of HA.
I do have the Smart Meter Gateway installed and linked to my account. And normally the integration works just fine. However, for some reason part of the time it errors saying "Failed to identify any smart meter with gateway access on your account"
I'm not sure if there is some timeout that need to be lengthened or what. When this occurs, the Integrations screen show a red ! error saying "Failed to setup"![Screen Shot 09-07-22 at 12 22 PM](https://user-images.githubusercontent.com/17341309/188930247-df9b8535-7744-451b-979e-33dc9519930b.PNG)
I believe that when that happens, the integration no longer tries to connect. So, maybe something just needs to be added so that when a known working configuration tries to restart and gets this error (i.e. due to a problem with the Duke servers) it would keep trying in the background.
Debug log