magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
500 stars 67 forks source link

Update to HA core 2024.5.1 and Vue broke. #277

Closed mattlewis19 closed 6 months ago

mattlewis19 commented 6 months ago

Just updated the HA Core to 2024.5.1 and the integration with Vue is no longer working.

DabblerIOT commented 6 months ago

what is hardware and other info?

have any logs?

On Mon, May 6, 2024 at 10:34 AM mattlewis19 @.***> wrote:

Just updated the HA Core to 2024.5.1 and the integration with Vue is no longer working.

— Reply to this email directly, view it on GitHub https://github.com/magico13/ha-emporia-vue/issues/277, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGBTIU7GVSKNOCJQ7RY6J6TZA6IINAVCNFSM6AAAAABHJFCQISVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4DCMBTGEYTQNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

magico13 commented 6 months ago

I just updated my instance and it loaded up without issue, so it doesn't seem to be an issue with the update. Sometimes things don't start up correctly, I recommend restarting Home Assistant and if that doesn't work then we'll need to know what errors are in the logs.

mattlewis19 commented 6 months ago

Hardware is a HP Prologic server running Hypervisor and HA OS.
Core 2024.5.1 Supervisor 2024.04.4 Operating System 12.2 Frontend 20240501.0

Logger: custom_components.emporia_vue Source: custom_components/emporia_vue/init.py:97 integration: Emporia Vue (documentation, issues) First occurred: 10:30:39 AM (3 occurrences) Last logged: 10:44:06 AM

Could not authenticate with Emporia API

Emporia Credentials haven't changed and confirmed credentials on the web app.

2024-05-06 10:50:52.144 ERROR (MainThread) [custom_components.emporia_vue.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/emporia_vue/config_flow.py", line 79, in async_step_user self._abort_if_unique_id_configured() File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2165, in _abort_if_unique_id_configured raise data_entry_flow.AbortFlow(error) homeassistant.data_entry_flow.AbortFlow: Flow aborted: already_configured 2024-05-06 10:51:02.640 ERROR (MainThread) [custom_components.emporia_vue.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/emporia_vue/config_flow.py", line 76, in async_step_user info = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/config_flow.py", line 47, in validate_input if not await hub.authenticate(data[CONF_EMAIL], data[CONF_PASSWORD]): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/config_flow.py", line 37, in authenticate result = await loop.run_in_executor(None, self.vue.login, username, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyemvue/pyemvue.py", line 355, in login self.auth = Auth( ^^^^^ File "/usr/local/lib/python3.12/site-packages/pyemvue/auth.py", line 57, in init self.cognito.authenticate(password=password) File "/usr/local/lib/python3.12/site-packages/pycognito/init.py", line 490, in authenticate tokens = aws.authenticate_user(client_metadata=client_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pycognito/aws_srp.py", line 398, in authenticate_user tokens = boto_client.respond_to_auth_challenge( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/botocore/client.py", line 553, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

magico13 commented 6 months ago

Flow aborted: already_configured usually is thrown when you're trying to set it up again but you already have it running. If you haven't rebooted, definitely recommend doing that first since that usually fixes any issues with the state machine trying to run two instances. If you have, you can try reloading the integration by going to the integration details and using the overflow menu.

image

mattlewis19 commented 6 months ago

Multiple reboots and reloads with no success, however I just deleted the hub and re-added it and that solved the problem. Thanks for trying to help!!

greymoment commented 6 months ago

Update: I reloaded the integration as stated above and the system is back to normal. Thanks for the hint.

This entity is no longer being provided by the emporia_vue integration. If the entity is no longer in use, delete it in settings.

They are no longer providing readings by. the minute. I am very sad about this.

Esprit1st commented 6 months ago

Try reloading the integration and restarting HA. I had the same message and it fixed itself after a couple restarts.On May 13, 2024 08:05, greymoment @.***> wrote: This entity is no longer being provided by the emporia_vue integration. If the entity is no longer in use, delete it in settings. They are no longer providing readings by. the minute. I am very sad about this.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

magico13 commented 6 months ago

They are no longer providing readings by. the minute. I am very sad about this.

If the one-minute data failed to load properly, for example if the API is down or acting unreliable at startup, then those entities can fail to be created. That's another situation where a reload of the integration can fix it, but you might need to wait a bit for the API to stabilize itself first.

Sounds like the main problem for this issue is resolved so I'm going to close this.