magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
488 stars 66 forks source link

Integration loses the ability to authenticate after some restarts. #247

Open sirmeili opened 9 months ago

sirmeili commented 9 months ago

After some restarts of HA, I can no longer authenticate. Sometimes I can remove the integration and readd it, sometimes not. I'm getting this in the logs after I remove and try and read the integration.

`Log details (ERROR) This error originated from a custom integration. Logger: custom_components.emporia_vue.config_flow Source: custom_components/emporia_vue/config_flow.py:77 Integration: Emporia Vue (documentation, issues) First occurred: 10:01:27 PM (3 occurrences) Last logged: 10:02:26 PM

Unexpected exception Traceback (most recent call last): File "/config/custom_components/emporia_vue/config_flow.py", line 77, in async_step_user info = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/config_flow.py", line 48, in validate_input if not await hub.authenticate(data[CONF_EMAIL], data[CONF_PASSWORD]): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/config_flow.py", line 38, in authenticate result = await loop.run_in_executor(None, self.vue.login, username, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyemvue/pyemvue.py", line 230, in login self.auth = Auth( ^^^^^ File "/usr/local/lib/python3.11/site-packages/pyemvue/auth.py", line 32, in init self.client = boto3.client( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/boto3/init.py", line 92, in client """

File "/usr/local/lib/python3.11/site-packages/boto3/session.py", line 299, in client :type use_ssl: boolean ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/session.py", line 971, in create_client self._session = session ^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/session.py", line 1042, in _resolve_defaults_mode env_var_names = None

File "/usr/local/lib/python3.11/site-packages/botocore/session.py", line 818, in _get_internal_component 'response_parser_factory') ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/session.py", line 1140, in get_component File "/usr/local/lib/python3.11/site-packages/botocore/session.py", line 216, in create_default_config_resolver try:

File "/usr/local/lib/python3.11/site-packages/botocore/loaders.py", line 471, in load_data File "/usr/local/lib/python3.11/site-packages/botocore/loaders.py", line 142, in _wrapper File "/usr/local/lib/python3.11/site-packages/botocore/loaders.py", line 453, in load_data_with_path :type extra_models: iterable of dict botocore.exceptions.DataNotFoundError: Unable to load data for: sdk-default-configuration `

Before this I just can't get the integration to work. I get the "failed to setup". I'm sure it will run fine until a restart. Some restarts it continues to work, others not and once it fails it seems to never work again until I remove it and get it added back (which might take a restart of HA).

I am on the most current version.

Ernie11 commented 8 months ago

Im having this same issue. Even after deleting the integration and redownloading it doesnt work. Any ideas?

Aipoc76 commented 5 months ago

same issue has started for me. I can get it to work after many restarts of Emporia Vue app on HA. It use to work flawlessly, now not so much.