First try at a binding for Hive from British Gas

yeah, the authentication issue is due to the fact that hive api doesn’t return the correct header with http 401. it supposed to have WWW-Authenticate in the header as per http specs. @ChrisSFoot I’ll send you a PR later when I get home.

@jamborta

So why does it temporarily work?

works until the token expires first time. then it’d return a 401 with the incorrect header, which results in an exception.

actually it should return a 401 with a correct header or a 403 instead. but that is an issue on the sever side.

1 Like

Sounds like you might be on the right path too this then hopefully it works :slight_smile: EXCITING :smiley:

That makes sense. I wonder if they will have fixed it in whatever the latest revision of the api is. Guess i’ll find out when I get a TRV!

@Sharpy here is the link of the jar file, you can just put this in your addons folder. that should work: binding jar

1 Like

@jamborta

YES!!! :smiley:

Just added it too my addons folder seems too be working good at the moment I will keep you updated as its too soon too tell if its fixed yet thanks for that

Still working perfectly 7 hours later I think you have fixed the problem thanks for that I will update in a few days

1 Like

Can you keep me posted on the progress of this please Chris it’s something I’m extremely interested in

Ok, finally got it building under the new build system. @jamborta I’ve taken the updates from your fork wholesale as it all looks sensible to me.

Now all I have to do is go through the changes requested in the original PR and hopefully this can get merged into the main repository.

In other news i’m about to purchase some of the TRVs as I can get 20% off through a work scheme so i’ll implement them sooner rather than later!

2 Likes

Waiting on a couple of things now. One is the pull request from to the main repo so this finally gets included out of the box, the other is the delivery of my TRVs so I can start playing! :laughing:

There is a teeny issue with the binding which I’m hoping to fix but a bit stuck with. With the current version when you initially add it before you setup the Hive account it will attempt discovery and obviously not find anything. Clicking the add manually button allows you to add the account and then discover automatically from there.

Fixed the discovery issue with help from @hillbrand

I’ve updated the entry on the eclipse marketplace for anyone who wants to get it that way. Nearly there for a stable version I thing and fingers crossed it’ll get included in the official sources really soon!

TRVs should be with me tomorrow so i’ll look at putting in support this weekend.

1 Like

@ChrisSFoot

Did your TRV Valves arrive? are they any good

They have arrive at my house but I’ve not been home to check them out yet! I’ll be playing with them tomorrow night. Just have to pick which rads to put them on!

1 Like

Exciting times :slight_smile: can’t beat new smart home tech

Absolutely! I have such a mix of stuff in my house though. Don’t know what I’d do without openhab! Got some z-wave, some Ikea Zigbee, the hive, a few wifi bulbs, Xiaomi Aqara switches, a harmony hub and some mqtt devices too. Coming soon, smart curtains by switchbot!!

1 Like

Same here my next investments are radiator valves, leak sensors, smoke alarms, automated blinds all needs more research on my part

It’s early days of course but the valves seem great so far. I have one large room that nobody goes in every other day so it will be handy to be able to cut the heat for those days. It’s looking like I might be able to work on the API next weekend though I might get an hour or two tomorrow!

1 Like

I’ve started poking about in the API and the TRVs show up fine with full readings and some other juicy details that might be useful for stuff (RSSI readings at each of your radiators anyone?). I was slightly worried that they wouldn’t be in the API since you can only administer them via the app and not via the website but clearly that was unfounded :slight_smile:

This won’t take me very long to implement…

Rssi readings are pretty important id say, so is it possible too turn on/off the radiators using the API?