Hive Integration

Ah, so its not just me. I’ll stop messing with my settings.

1 Like

Yep I was the same :stuck_out_tongue:
Checked the api status on the Hive page and all seems to be working, wondering if Hive will be the next in line to “lockdown” their api like most of the iot products these days? :frowning: I’m starting to see a trend…

Similar issues reported over on the Smartthings integration forums:

looks like the API has been closed GRR https://beekeeper-uk.hivehome.com = {“message”:“Forbidden”}

As with others - stopped working for me too…

That Forbidden might be expected since I’m getting this

{“message”:“Missing Authentication Token”}

on
https://beekeeper-uk.hivehome.com/1.0/global/login

But wouldn’t surprise me that they would close it… after all it is a “Unofficial API” :frowning:

Missing Authentication Token is an AWS message when there’s a fault (by design or accidental) with the domain linking through to the running code.

The question is whether it was intentional or not.

1 Like

I thought I’d give their online support a try.

Me: “I was wanting to find out if you have switched off the API? My home automations that use it have stopped working.”
Them: “Please elaborate what is an API?”

Sheesh!

Frustratingly this appears dead for me today too. Just as we’re approaching the heating season, so a perfect reminder of why I chose Home Assistant and why the cloud-only thermostat needs to go.

It looks like Hive have introduced a SSO system and no longer use the /login call to get a token.
Looks like this integration will need work if possible to integrate with hive sso

i’ll take a quick look now, see if there is anything obvious

3 Likes

its not looking good.
I dont think it will be a simple thing to fix.
as MagicalTrev89 said, it looks like they have switched the authentication method to include SSO, so the old authentication method no longer works.

I am not sure I fully understand it, but it looks like the authentication destination is different, plus the password is encrypted before sending. After that it all looks to be pretty much the same.

It will need someone much more knowledgeable in this new authentication method than me to fix this unfortunately

If it can’t be fixed has anyone tried Hive via Alexa or Google Home? I already control my garage door via SmartThings as there was no native HA integration and it works a treat.

Thanks for having a look at this. :slight_smile:

Once again its kinda poor that Hive made this change and yet another company that couldn’t care less about opensource :frowning:

I’m assuming this will break the default Hive integration from HA also right? Wondering if we could get some help from someone from the core? Just an idea, I would love to help, but this way of my expertise, sorry…

Yes it will impact the default hive integration (the custom component just replaces the sensors entities with more sensors that were not allowed in the core hive platform)

Tried to use Alexa through node red to control it but that doesnt seem to be working either. I guess their skill has broken too.

Actually it does look like its still working just takes a few minutes to update, might be able to use that as a work around.

So hopefully just a matter of figuring out the auth method…

1 Like

Hi, I’m no expert but I have been boosting my hive heating via sh script for a while now and when I noticed that hive integration no longer worked this morning I realised my boost script did still work. I then have just tweaked the url I’m posting to turn on my hive light and it worked. I’ll post as much as I can and answer any questions. Hope it helps…

#!/bin/bash
INSTANCE_REGION="$(curl -H ‘Host: beekeeper.hivehome.com’ -H ‘Content-Type: application/json’ -H ‘Accept: /’ -H ‘User-Agent: HiveRNApp/10.16.2 Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148’ -H ‘Accept-Language: en-gb’ --data-binary ‘{“username”:“myemail”,“password”:“mypassword”,“devices”:true,“products”:true,“actions”:true,“homes”:true}’ --compressed ‘https://beekeeper.hivehome.com/1.0/cognito/login’ | python -c “import sys, json; print json.load(sys.stdin)[‘token’]”)"
echo $INSTANCE_REGION
curl -H ‘Host: beekeeper-uk.hivehome.com’ -H ‘accept: /’ -H ‘content-type: application/json’ -H ‘accept-language: en-gb’ -H ‘user-agent: HiveRNApp/10.16.2 Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148’ -H “authorization: ${INSTANCE_REGION}” --data-binary ‘{“status”: “ON”}’ --compressed ‘https://beekeeper-uk.hivehome.com/1.0/nodes/colourtuneablelight/709cc3e4-0b04-4cc4-8e26-b15ec455766f?homeId=myhomeid

1 Like

Interesting, @bradderz… you are using cognito and the pyhiveapi currently uses global
I’ve just changed my version of pyhiveapi to see if it works …