Hive Integration prevents access to Hive from any device on my home network

I’ve used the custom Hive integration for some time, but recently I did some long-overdue updates and I’m tearing my hair out trying to get it working again. I’m having an issue that persists regardless of whether I’m using the official or custom integration, 2-FA, and regardless of version.

In a nutshell, I add the integration (official, or after downloading via HACS) and enter my username and password, whereupon all the appropriate entities are added and it works fine. Then, maybe 30 mins later, it will stop working. No visible error in the integrations page, no request to re-enter my credentials, but the entities will cease to be updated and any changes I make will no longer by synced with Hive.

The log shows an error message “Config entry for [my e-mail] hive integration could not authenticate.”

What’s weird is that I then can’t log into Hive on other devices (e.g. phone app or website) on my home network. I just get a non-specific error (app) or a refresh loop (website). However, there are no such problems on any other network (e.g. switching my phone to mobile data allows me to use the app).Disabling/deleting the integration and waiting a while fixes this, and I assume that it’s the result of Hive temporarily blocking my IP after numerous failed attempts by HA to authenticate, or something along those lines.

I’ve completely removed and re-installed both the official integration and the custom integration via HACs numerous times, always with the same result: a perfectly working system for maybe 30 mins to an hour, then no access to Hive from any device on my home network.

I’m at my wit’s end. Can anyone offer any advice?

I’m getting similar issues in that the Hive integration stops working and to get it running again I have to delete and reinstall it.
Core Version core-2022.4.5
Supervisor Version supervisor-2022.04.0
Operating System Home Assistant OS 7.6

I’m based in the UK

Log data:
Logger: homeassistant.config_entries
Source: config_entries.py:349
First occurred: April 19, 2022, 8:23:44 PM (1 occurrences)
Last logged: April 19, 2022, 8:23:44 PM

Config entry ‘[email protected]’ for hive integration could not authenticate

Core log data:
2022-04-20 08:03:47.579 | ERROR | apyhiveapi.api.hive_async_api:request:74 - Hive token has expired when calling https://beekeeper.hivehome.com/1.0/nodes/all?products=true&devices=true&actions=true - HTTP status is - 401
2022-04-20 08:03:47.670 | ERROR | apyhiveapi.api.hive_async_api:request:74 - Hive token has expired when calling https://beekeeper.hivehome.com/1.0/nodes/all?products=true&devices=true&actions=true - HTTP status is - 401

1 Like

I have had the custom component installed for some time. When I saw this post I checked my logs and I have 2 errors this morning, still working so far. My HTTP error is 504 Timeout whereas yours is 401 Unauthorized. Maybe an issue with Hive ? (Hopefully temporary)

2022-04-20 01:25:27.558 | ERROR | apyhiveapi.api.hive_async_api:request:79 - Something has gone wrong calling https://beekeeper.hivehome.com/1.0/nodes/all?products=true&devices=true&actions=true - HTTP status is - 504

2022-04-20 08:31:08.655 | ERROR | apyhiveapi.api.hive_async_api:request:79 - Something has gone wrong calling https://beekeeper.hivehome.com/1.0/nodes/all?products=true&devices=true&actions=true - HTTP status is - 504

1 Like

Just to mix things up, I’m getting an HTTP error of 403:

2022-04-20 13:25:50.431 | ERROR | apyhiveapi.api.hive_async_api:request:79 - Something has gone wrong calling https://beekeeper.hivehome.com/1.0/nodes/all?products=true&devices=true&actions=true - HTTP status is - 403

I’m guessing this is indeed my IP being blocked by Hive for some reason probably connected to failed authentication. It’s what I expected based on my inability to log in from other devices on the same network.

There’s some activity on this topic here:

https://github.com/home-assistant/core/issues/70465

1 Like

This temporary fix won’t work for everyone…

But for now I call the service “Home Assistant Core Integration: Restart” from an automation every 20mins.

Although this is a fairly drastic measure, it means I can at least have a continuous connection to the Hive thermostat.

1 Like

I didn’t think of this. Drastic, but since I use HA for all my scheduling etc. then a massively helpful band-aid until the developers have a chance to prepare an update.

Thanks!

Happy to help!

FWIW I’ve restored a backup from 4-Apr-22 (core 2022.3.6, HAOS 7.6, supervisor 2022.04.0)

It seems to have a working Hive token which lasts (so far) 4hrs+, which is way longer than the 20mins I had with the more recent version.

(According to the speculation on the github link above, it could be that Hive changed their backend so access token generated after a certain date had more limitations, but ones generated before that continue to work.)

Did that restart work with 2FA enabled?

I started having to input a code every restart of HA a few weeks ago, presumably coinciding with the Hive backend changes.

Hi,

I’m having the exact same issue. I also loose access to the hive system via both android and iOS apps.

Has the issue been resolved?

What do I need to do?

Help lol

I have the exact same issue on HA the Hive component from HACS doesn’t work.

The Hive Android app shows my Thermostat and Hub as offline.

I did have a quick look and it seems like Hive are having issues with their cameras and other products. However they claim their Hive Heating works fine.

I wouldn’t care but one of the reasons I left ST was that hive worked with HA.

Do we know if anyone is looking at resolving the issue?

Hi, I’m getting this same error now too and my home IP address appears blocked. Switching my phone on to 3G and I can log in to Hive on my iOS device correctly.

I’ve put in a support request to Hive to have my IP white listed but I don’t think that will happen. Is there a fix coming down the line?

Thanks

You’ve got further than I have by identifying your home IP was blocked. I’ve deleted the integration until it gets resolved.

You have zero hope of Hive helping. My experience with them was always poor.

1 Like

Looking at the GitHub issue above, it looks resolved in 2022.6.6

Hi, has this been fixed?

Had anyone had success?

Yes, all working fine now

Its not working for me. I had to revert back to version 2022.5.5
.

Did you remove the integration and restart and add it again after updating to 2022.6.6 ?