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
AEP Ohio (Opower integration) "async_login not called" #110019
Comments
Hey there @tronikos, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) opower documentation |
I'm seeing this too with PSO (public service Oklahoma) 2024-02-08 09:34:44.408 ERROR (MainThread) [homeassistant.components.opower.coordinator] Unexpected error fetching Opower data: async_login not called |
Could you please enable debugging for this integration and display debug logs as well? I'm trying to figure out if this was affected by my changes in the opower.py file from the last 0.2.0 release. UPD: I double checked my changes and |
Here is some additional logging, hopefully this helps some. 2024-02-08 15:52:26.207 ERROR (MainThread) [homeassistant.components.opower.coordinator] Unexpected error fetching Opower data: async_login not called |
This also affects City of Austin Utilities integration. Lines generated are analogous to already posted logs. |
Weird, it's been working fine for my COA account for two days. I've enabled debugging, but I can't see any issues. Even the monthly data loaded successfully. |
Hey, thanks for looking into this! I'm super appreciative. While I'm a pretty competent python dev, the idea of setting up home assistant to debug gives me the shivers. I see someone else posted their log, but I also attached a log to my original post. It's a bit noisy, because I have a few things in my system broken, but the net of it is there doesn't appear to be much additional information in there. Happy to roll up my sleeves if you need some help with something to reproduce, I believe I have ssh access to the instance and am fluent in Linux. I seem to remember that the environment is pretty limited due to HA using buildroot instead of a distro. |
Based on the stack trace, I'm guessing in the below for loop, a check needs to be inserted to see if the user is logged in, and call async login if they are not. Otherwise, it'll keep throwing errors on the assert subdomain. |
I just updated to Core 24.2.1 and it appears the issue has been resolved on my instance. |
Same, updated and seems resolved. Survived a restart as well, so I'll go ahead and close this and then reopen it if it pops back up. If anyone else has issues still and wants me to leave this open, let me know. |
I'm glad that it was resolved, but I still have no idea how the new release fixed this |
I had the same exact issue today. Restarting HA solved it. |
I have the updated core and the issue persist for me. City of Austin Utilities. I have deleted and reinstalled the Opower integration. Steps taken to resolve
Below is the error that I pulled form the HA logs with debugger logging enabled.
|
@benhoff should I open a new issue or can you reopen this one ? I provided logs and reproduction steps. This integration is still broken for me. |
@enter360 , reopened! |
It looks like if the original Code issues highlighted below
I've tried to modify the function here, but I haven't had time to test it yet: |
Opened a pull request in the opower repo that should resolve above. Not sure how aggressive Home Assistant is in updating it's dependencies, but the opower integration will need to release a new version and then have HA update the opower dependency as well. Looks like it's defined here, but I'm not familiar with how HA handles updating dependencies:
|
This should be fixed in 2024.2.4. |
update and enjoy! |
The problem
2024-02-07 17:05:09.602 ERROR (MainThread) [homeassistant.components.opower.coordinator] Unexpected error fetching Opower data: async_login not called
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/opower/coordinator.py", line 83, in _async_update_data
forecasts: list[Forecast] = await self.api.async_get_forecast()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/opower.py", line 229, in async_get_forecast
for customer in await self._async_get_customers():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/opower.py", line 301, in _async_get_customers
f"{self._get_subdomain()}"
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/opower.py", line 545, in _get_subdomain
return self.utility.subdomain()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/utilities/aepbase.py", line 93, in subdomain
assert cls._subdomain, "async_login not called"
AssertionError: async_login not called
2024-02-07 17:05:20.020 ERROR (MainThread) [homeassistant.components.opower.coordinator] Unexpected error fetching Opower data: async_login not called
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/opower/coordinator.py", line 83, in _async_update_data
forecasts: list[Forecast] = await self.api.async_get_forecast()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/opower.py", line 229, in async_get_forecast
for customer in await self._async_get_customers():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/opower.py", line 301, in _async_get_customers
f"{self._get_subdomain()}"
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/opower.py", line 545, in _get_subdomain
return self.utility.subdomain()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/opower/utilities/aepbase.py", line 93, in subdomain
assert cls._subdomain, "async_login not called"
AssertionError: async_login not called
What version of Home Assistant Core has the issue?
2024.2.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Opower
Link to integration documentation on our website
https://www.home-assistant.io/integrations/opower
Diagnostics information
home-assistant_opower_2024-02-08T14-57-06.731Z.log
Example YAML snippet
N/A
Anything in the logs that might be useful for us?
Additional information
This is for AEP Ohio, there's only a username password combination, not sure what the error is. This worked when I first plugged in the credentials, but not since I restarted the system.
The text was updated successfully, but these errors were encountered: