home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.88k stars 30.95k forks source link

Hive Integration #129682

Open NogintheNog opened 2 weeks ago

NogintheNog commented 2 weeks ago

The problem

I am new to posting so I am not sure this is the right place to send this. Core 2024.10.4 Supervisor 2024.10.3 Operating System 13.2 Frontend 20241002.4 on a pi 4 since the last update in October Hive will not setup. Thanks

What version of Home Assistant Core has the issue?

2024.10.4

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

Hive

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.config_entries Source: config_entries.py:594 First occurred: 14:39:12 (1 occurrences) Last logged: 14:39:12 Error setting up entry john.walchester@btinternet.com for hive Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 84, in async_setup_entry devices = await hive.session.startSession(hive_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 509, in startSession return await self.createDevices() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 539, in createDevices eval("self." + code) File "", line 1, in File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 131, in addList device = self.helper.getDeviceData(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/helper/hive_helper.py", line 98, in getDeviceData device = self.session.data.devices[product["props"]["trvs"][0]]


IndexError: list index out of range

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

_No response_

### Additional information

_No response_
home-assistant[bot] commented 2 weeks ago

Hey there @rendili, @kjonline, mind taking a look at this issue as it has been labeled with an integration (hive) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `hive` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign hive` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


hive documentation hive source (message by IssueLinks)

adyrobady commented 2 weeks ago

Yes I’ve got the same problem. I have 6 different hive houses and can’t login to 2 of them anymore

olivergrovez commented 1 week ago

Same for me, though have never been able to get mine working (only been trying for the last month) accepts the user/pass, then accepts the OTP, and fails to login, disable/re-enable and it then takes the OTP but states Failed to set up, the logs contain this info:

Logger: homeassistant.config_entries Source: config_entries.py:635 First occurred: 7 November 2024 at 11:21:51 (1 occurrences) Last logged: 7 November 2024 at 11:21:51

Error setting up entry email@domain.com for hive Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/apyhiveapi/api/hive_auth_async.py", line 548, in refresh_token result = await self.loop.run_in_executor( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/botocore/client.py", line 565, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/botocore/client.py", line 1021, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.NotAuthorizedException: An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Invalid Refresh Token.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 84, in async_setup_entry devices = await hive.session.startSession(hive_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 502, in startSession await self.getDevices("No_ID") File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 425, in getDevices await self.hiveRefreshTokens() File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 304, in hiveRefreshTokens result = await self.auth.refresh_token( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/api/hive_auth_async.py", line 562, in refresh_token raise HiveInvalid2FACode from err apyhiveapi.helper.hive_exceptions.HiveInvalid2FACode

nigeldixon commented 1 week ago

Are you logging in with primary account? I was having trouble logging in with my account, but works fine for my partner's who is the subscription holder

NogintheNog commented 1 week ago

I am using the primary account all was ok till the last October core update.

Tonynpv commented 4 days ago

Having the same issue here

Logger: homeassistant.config_entries Source: config_entries.py:635 First occurred: November 16, 2024 at 10:46:13 AM (3 occurrences) Last logged: 9:08:29 PM

Error setting up entry email@gmail.com for hive Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 84, in async_setup_entry devices = await hive.session.startSession(hive_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 509, in startSession return await self.createDevices() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 539, in createDevices eval("self." + code) File "", line 1, in File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 131, in addList device = self.helper.getDeviceData(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/helper/hive_helper.py", line 98, in getDeviceData device = self.session.data.devices[product["props"]["trvs"][0]]


IndexError: list index out of range
CircuitMonkey38 commented 1 day ago

Also having the same issue Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 84, in async_setup_entry devices = await hive.session.startSession(hive_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 509, in startSession return await self.createDevices() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 539, in createDevices eval("self." + code) File "", line 1, in File "/usr/local/lib/python3.12/site-packages/apyhiveapi/session.py", line 131, in addList device = self.helper.getDeviceData(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apyhiveapi/helper/hive_helper.py", line 98, in getDeviceData device = self.session.data.devices[product["props"]["trvs"][0]]


IndexError: list index out of range

I've attempted to remove the TRV from my Hive account as it broke quite a while ago, but it hangs around in the app still, possibly related?