I found deleting the hive section from my configuration.yaml file, reinstalling the Hive Integration from HACS and setting up 2FA in the hive app fixed my problem of getting “Hive token has expired” in the log file.
The steps are straight forward, pretty much described as above, but I also wrote it up as a blog post if anybody wants a more wordy description of what I did to get things working again.
I’m still struggling with this. This is the message I get from the logs.
Any ideas?
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/hive/init.py:89
Integration: Hive
First occurred: 7:02:33 PM (1 occurrences)
Last logged: 7:02:33 PM
Error setting up entry for hive
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 353, in async_setup
result = await component.async_setup_entry(hass, self)
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
await self.getDevices(“No_ID”)
File “/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py”, line 417, in getDevices
await self.hiveRefreshTokens()
File “/usr/local/lib/python3.10/site-packages/apyhiveapi/session.py”, line 304, in hiveRefreshTokens
result = await self.auth.refresh_token(
File “/usr/local/lib/python3.10/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.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.10/site-packages/botocore/client.py”, line 391, in _api_call
return self._make_api_call(operation_name, kwargs)
File “/usr/local/lib/python3.10/site-packages/botocore/client.py”, line 691, in _make_api_call
request_dict = self._convert_to_request_dict(
File “/usr/local/lib/python3.10/site-packages/botocore/client.py”, line 739, in _convert_to_request_dict
request_dict = self._serializer.serialize_to_request(
File “/usr/local/lib/python3.10/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’: ‘eyJjdHkiOiJKV1QiLCJlbmMi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jeHZfTR-BfIB2x48Y9zARc-tCDBWBR-RkHb94lEgb5M4C7hgGjvgYc4U1qZIvjcU-QqCPz9KCu6V0jRSKHgTSpGUvkKgHXHDzdTcCQRu2OsnaiCYn_dTIrA2T8-5A8qoAbe5GOnVW9jbZcnCa0jKsWchmYcMshBcqJkld0VKjkQR5cvHZApET4H6qAon4KAbE5jFnXz4PN-ep-kKsDGEz-jEl83RL-m364xK_8yMFMD8FuJlHxds6tchjYKk88BWd6zMWhnedGUVCmVvKKYNHpXKMZHweHe_BnD3eUKJoDxklSXP7rYB2lf1uzWOtumi7z1z0EC9aGpOZnhSQ3k5SaPQkClbwBuFxRNBp2mGIx54y5uXYEM-jQwz8uub0T3rFyuOZe-i4BkDj67XVALPkC4gLlXW6S28W8ZHBumelbM2p6dXsnk9Ph77tKNiaF_ymxtmHMQc4w1327O–qbAYXJXVeAk7WUcxUs26fvcWAZGyD_ODkuUTzMk_IcYV6OjgO00fZdwSBPzsD7mDDpTxRnbE4x6UWncBreiuzKiWjZrO-sgoDjxQFXnpri5O_IA150sdWJeMjmTT-LP6FaroVi11TmHSSG4xWBF7wnKF3aYV2W6MbaIQDoPdsoUOdRAXVx61N_C2PWo0oPJVCKQdXeg4DZciZA-p02DyHUohB24AKco70cfdVKa2t5RILtS2YsDr02WTGhnYk1vSc7k9Ba9oM8kAUKNq5grHTDwblcBUHnXE-tzKmJ9oBfyaCMKoiS4Rg.9MYcz1BxLzsMkuGuUn-VWA’},), type: <class ‘tuple’>, valid types: <class ‘dict’>
Not sure if you got this working as this is a pretty old post but I had exactly the same issue in Dec 2022. I am new to Home Assistant and to Hive.
I received the same message as you. I had to Turn on 2FA in the app which is under Account \ Account Security
You need to make sure your mobile is verified.
Then uninstall the app and reinstall, when I logged in the app asked me to provide 2FA where it sent an sms code to my phone. Once logged in I uninstall the Home Assistant plug and reinstall.
Login in using my email and password then I had a prompt to provide 2FA again using my phone. This must have meant that 2FA was not enabled by default when I first setup Hive.
This is now working and when I look in the app I can see HA in the trusted list.
I hope this at least helps someone as this was a bit of a challenge to get working.
I just bought some hive thermostats. I was reading up on them and I forgot to remove my bid…
So now I’m stuck with them. From what I heard they have turned off their servers any chance I can get it working locally with Home Assistant?
or did I just waste $30 bucks. If this is too complicated to get working I’m willing to sell to anyone that wants these.
Hello everyone, i’ve a Hive correctly setted up in HA, the 2FA is enabled but after a while everything works fine i’m getting all sensors offline, hub says connected.
When i reload integration, everything goes then offline.
I can fix removing the integration and re-adding with new 2FA code.
Any can support me? all my attempt of trusted devices appear in the app, but after few days seems something expires.