Hive Integration Error in 2022.7.*

Is anyone else seeing this issue when attempting to configure the hive integration with the latest HA version?

Logger: homeassistant.config_entries
Source: components/hive/__init__.py:89
First occurred: 10:39:52 (2 occurrences)
Last logged: 10:43:22

Error setting up entry {my email address} for hive
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 89, in async_setup_entry
    devices = await hive.session.startSession(hive_config)
  File "/usr/local/lib/python3.9/site-packages/apyhiveapi/session.py", line 493, in startSession
    await self.getDevices("No_ID")
  File "/usr/local/lib/python3.9/site-packages/apyhiveapi/session.py", line 416, in getDevices
    await self.hiveRefreshTokens()
  File "/usr/local/lib/python3.9/site-packages/apyhiveapi/session.py", line 303, in hiveRefreshTokens
    result = await self.auth.refreshToken(
  File "/usr/local/lib/python3.9/site-packages/apyhiveapi/api/hive_auth_async.py", line 544, in refreshToken
    result = await self.loop.run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 391, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 691, in _make_api_call
    request_dict = self._convert_to_request_dict(
  File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 739, in _convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
  File "/usr/local/lib/python3.9/site-packages/botocore/validate.py", line 360, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter AuthParameters, value: ({'REFRESH_TOKEN': 'eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.npLdJLtWX5l1PYOqoZCySfqLoWkBh1BVm0eUpz93xtoGEo2TYqpST2MZpRQwBK-hgv9MCkS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vzSDp5AZY173WRV9FMokZWF5bSFfJXHLQbbLqSeIhe5PlskUMr-bl_uDS85StlmWFkl0qhO_sM0aLvk5NPJOtHhCruRjmyWV-ZsgRkyOFAyVdUcVe6kJTxraSEj_3SUd66NktnlylfuXhF0vAtr2cHCQtcPMUr8T3gqxWknybUZhWlQCzRpCpzF9gUGpq8Z3Qohk7gw8hJ0z90La8TjggV_1puHb7m_KaxPplilFpDTkc6AxFYTsGnne95Ooobi1m5R2Tyt1I1QBq-phrwkEoGmlmJ9fll-3bHcr6bNOSRNhZOJ5j3ByhSnHghm6M7V3rg1Y0l3EQDKOIXE1Texq8VDHJ5mHfmasT96JEjiaUTX3SdKRw3ZbbhpPvui2ynz5r8D34gHhLBL7RLM_uACWIdAJrq_OBTMzuswAWs2VDGDTKqEZ7UjD6sp8FSc2Z2oWvW-eToW__iHImLkO-bWOVyO96UzF4QUKFiodeeqW0QSgnUWZ9VuzLIj3wfL67RoVQdtinZAXy7qzEkbaBflJ5N-wrLJWL7y3xv-kQ6NnHMAjmo9dD6Qs4mvMcBIQ8qwd0SgTicHcmAP4Dxohi_bXBRM9gQDwmVANeRZ4XPn_iUl3qozpCViRtPO6087zs6Q.pL989JPWdu-GuLb3Pm0leA'},), type: <class 'tuple'>, valid types: <class 'dict'>

Yes, I am getting the same issue. Removal and reinstall of Hive does not fix.

Not sure how to resolve the issue. :thinking:

I’ve switched back to 2022.6.7 and getting the same error, so wondering if Hive have changed their API?

Ohhh shoot… I just ordered an Orbit 21004 B-hyve, hoping to deploy with HACS integration. :grimacing:

There was a change not long ago, see the posts here. All fixed now in latest HA and custom component, think you have to turn on 2FA in Hive

1 Like

Thanks for the link, yep, worked for me, just enabled 2FA and then deleted and re-added the integration and all working again. Thank.

1 Like

Yep eventually worked for me too.

A pain in the backside though to be honest. 2FA is only via SMS with Hive, and my mobile phone does not receive a signal at home so can’t receive SMS making 2FA useless. There has to be a better way…

I still have this issue sadly, I’ve removed the integration, rebooted, installed the integration with 2FA enabled and each time it still shows my lights / devices as unavailable.

Me too. I’ve tried multiple times deleting integration, rebooting, reinstalling. Still get Failed to set up. Check the logs.
Can someone give step by step instructions to get this working again? It used to work for me.
Does not now work for me on HA core-2022.7.5, Hive 2022.7.3
Reverting to 2021.5.4

Logs say

2022-07-16 16:03:05 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration hive which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-16 16:05:20 INFO (MainThread) [homeassistant.setup] Setting up hive
2022-07-16 16:05:20 INFO (MainThread) [homeassistant.setup] Setup of domain hive took 0.0 seconds
2022-07-16 16:05:24 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] for hive
File "/config/custom_components/hive/__init__.py", line 89, in async_setup_entry
devices = await hive.session.startSession(hive_config)
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 494, in startSession
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 442, in getDevices
File "/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py", line 371, in getCamera

I have 2FA enabled

@perjury1 i saw this error the other day wh
It’s some else.

My guess is you have a hive camera but you don’t have a recording saved or available?

I have built the camera functionality in the backend with a view I will be adding it to home assistant hopefully soon.

It seems I have missed a scenario here the previous person who had the issue only stored recordings from the last 24 hours and no longer and didn’t have a recording available.

@perjury1 is this your scenarios?

This is correct. No recordings.
You know that Hive have just announced that they’re abandoning their cameras?

@perjury1 no I did not know that. That’s rubbish.

To get you up and running the only way is to removed the camera device from hive until I change the back end and release it

1 Like

Will I be able to add the camera back again once the integration is installed?
(I can’t do anything at the moment because I can’t log in to my Hive account, sigh )

@perjury1 unfortunately no not until I release an update to the backend and home assistant integration.

I’m currently away so i can’t do anything for 2 weeks

I forced the cameras to generate a file and now the integration is up and running

@perjury1 you will need to make sure there is a recording there every 24 hours as the first update after the recording has gone will fail

This has worked for me many thanks :slight_smile:

Thanks from me… needed 2FA, delete and reinstall integration. (After reinstall config asks for 2FA code.)

I have just got a Hive Mini today and am having this same error

I think the issue is with Hive - in the app it says 2FA is enabled, but it doesn’t ask me for a code on either the app or the web
I tried turning 2FA off and it just stays on

Mobile number is confirmed

Anyone got any ideas?