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

Could not identify a smart meter on your account with gateway access. #16

Closed
awboyd79 opened this issue Sep 7, 2021 · 4 comments
Closed

Comments

@awboyd79
Copy link

awboyd79 commented Sep 7, 2021

I am using version 0.0.8 and get the below error when trying to setup the integration.
I am not sure how to run the example (no python experience here) but I did verify the correct account number and meter is being returned in the logs. I read the previous issue that was similar and even tried 0.0.7 but it gave the same error.

0.0.8 Log

2021-09-07 17:59:56 DEBUG (MainThread) [custom_components.duke_energy_gateway] Setup Duke Energy API client
2021-09-07 17:59:56 DEBUG (MainThread) [custom_components.duke_energy_gateway] Accounts to check for gateway (1): 62XXXXXXX
2021-09-07 17:59:56 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking account 62XXXXXXX for gateway
2021-09-07 17:59:57 DEBUG (MainThread) [custom_components.duke_energy_gateway] Meters to check for gateway (2): ,33XXXXXXX
2021-09-07 17:59:57 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking meter for gateway [meter_type=ELECTRIC, is_certified_smart_meter=True]
2021-09-07 17:59:58 DEBUG (MainThread) [custom_components.duke_energy_gateway] Failed to find meter on account 62XXXXXXX: Request failed with unexpected error [https://cust-pilot-api.duke-energy.com/smartmeter/v1/auth]: 500, message='Internal Server Error', url=URL('https://cust-pilot-api.duke-energy.com/smartmeter/v1/auth')
2021-09-07 17:59:58 ERROR (MainThread) [custom_components.duke_energy_gateway] Could not identify a smart meter on your account with gateway access.

0.0.7 Log

2021-09-07 17:59:56 DEBUG (MainThread) [custom_components.duke_energy_gateway] Setup Duke Energy API client
2021-09-07 17:59:56 DEBUG (MainThread) [custom_components.duke_energy_gateway] Accounts to check for gateway (1): 62XXXXXXX
2021-09-07 17:59:56 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking account 62XXXXXXX for gateway
2021-09-07 17:59:57 DEBUG (MainThread) [custom_components.duke_energy_gateway] Meters to check for gateway (2): ,33XXXXXXX
2021-09-07 17:59:57 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking meter for gateway [meter_type=ELECTRIC, is_certified_smart_meter=True]
2021-09-07 17:59:58 DEBUG (MainThread) [custom_components.duke_energy_gateway] Failed to find meter on account 62XXXXXXX : Request failed with unexpected error [https://cust-pilot-api.duke-energy.com/smartmeter/v1/auth]: 500, message='Internal Server Error', url=URL('https://cust-pilot-api.duke-energy.com/smartmeter/v1/auth')
2021-09-07 17:59:58 ERROR (MainThread) [custom_components.duke_energy_gateway] Could not identify a smart meter on your account with gateway access.

@mjmeli
Copy link
Owner

mjmeli commented Sep 7, 2021

Thanks for posting the logs! It looks like it is picking up 2 meters on your account, but one doesn't have an ID and that is causing the API call to fail. Is the meter you have there 33XXXXXXX the correct one? If so then I think I'll have to put in a fix to make sure to try other meters if one of the meters fails.

@awboyd79
Copy link
Author

awboyd79 commented Sep 8, 2021

Yes - the 33XXXXXXX is the correct one.

@mjmeli
Copy link
Owner

mjmeli commented Sep 8, 2021

I just pushed an updated version 0.0.9 that I hope solves this. I can't test it easily here on my account so let me know if it works or doesn't work for you.

@mjmeli mjmeli closed this as completed Sep 8, 2021
@awboyd79
Copy link
Author

awboyd79 commented Sep 8, 2021

Thanks for the quick fix, I just updated and confirmed it's working now.

2021-09-08 11:04:44 DEBUG (MainThread) [custom_components.duke_energy_gateway] Setup Duke Energy API client
2021-09-08 11:04:44 DEBUG (MainThread) [custom_components.duke_energy_gateway] Accounts to check for gateway (1): '62XXXXXXXX'
2021-09-08 11:04:44 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking account '62XXXXXXXX' for gateway
2021-09-08 11:04:45 DEBUG (MainThread) [custom_components.duke_energy_gateway] Meters to check for gateway (2): '','33XXXXXXX'
2021-09-08 11:04:45 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking meter '' for gateway [meter_type=ELECTRIC, is_certified_smart_meter=True]
2021-09-08 11:04:45 DEBUG (MainThread) [custom_components.duke_energy_gateway] Checking meter '33XXXXXXX' for gateway [meter_type=ELECTRIC, is_certified_smart_meter=True]
2021-09-08 11:04:47 DEBUG (MainThread) [custom_components.duke_energy_gateway] Found meter '33XXXXXXX' with gateway 'P204XXXXXX'
2021-09-08 11:04:47 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching duke_energy_gateway data in 0.188 seconds (success: True)

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

No branches or pull requests

2 participants