First try at a binding for Hive from British Gas

There is but i’d like to get the marketplace entry fixed first ideally. The same jar that the marketplace links to works on my install but I can indeed replicate the issue that it won’t install from the market. I think there may have been an issue with the url on the listing which I have now rectified but I can’t work out how to get openhab to update the market entries. In short, i’m working on it and i’ll update here when the market install is working!

This should be installable from the marketplace now!

Hi @ChrisSFoot , Perfect! installed and working :slight_smile:
I was going to do this myself, but never had the time to do it, so thanks for creating this!

I’ve been thinking about it for close to a year but finally got round to doing something about it! If there’s anything that you’d like it to do/anything that I’ve missed then feel free to mention it here, i’m very open to suggestions!

Hi @ChrisSFoot , First observation, i’m getting fairly regular

Failed to get thermostat reading: {}
HTTP protocol violation: Authentication challenge without WWW-Authenticate header

Which looks like an token error. At first, I thought that it may be because I was still running my Curl requests to Hive, which would have been changing the token, but I’ve since stopped that Cron job from running, but still seeing the regular disconnects. Changing any setting in the ‘Thing’ seems to kick it back into life for a while. My guess is it’s still something to do with the access token.

Update: It’s not the bridge losing communication, it’s the ‘Thermostat Thing’. Now seems to be permanently offline.

Installed hive today installed binding from marketplace seems too be working nicely was nice and simple too setup auto discovery worked fine all good

Feature request: is it possible too return the battery level of the Thermostat?

Hi Chris, The only other parameter that I extracted from the API was battery level, as there was a period when the Hive thermostat ate them at a great rate!

PS: Not had as many errors today, so will keep looking at the logs.
P.P.S Thermostat_Hotwateron is returning ‘Null’

I’ll see if I can take a look today. I was finding that the hive api sometimes just stops returning responses, I may just be hitting it too often.

In regards to the hotwateron returning null, do you have the dual channel or single channel?

I’ll take a look at battery level. I have a screen full of battery levels on my habpanel setup so I don’t know why I didn’t think of that one already!

Hi Chris, I have the dual channel controller. Not sure how you are parsing the returned JSON, but I found that the nodes moved around as Hive added more features, which meant that I had to hack my script on a regular basis. I’m guessing that you’ve done it in a far more elegant way :slight_smile:

As for polling too often, my script was only run every 15 minutes, which didn’t seem to cause any issues.

Thanks for that will you keep me posted please

Sorry guys, I suddenly got very busy with other projects! It’ll be updated soon though.

I’ve uploaded a new version of the binding to the eclipse market which will include battery level. You’ll have to remove the thermostat thing and rediscover it but you won’t need to change the account thing. Let me know how you get on.

Hi again Chris i was trying too update the binding too get battery level wasent sure how anyway i uninstalled the binding using paperui tried too reinstall from paper ui marketplace but cant install receiving error

market:binding-4464823: Bundle cannot be installed: Error reading bundle content

now i’m pretty stuck i only wanted too add battery level but lost all comunication with hive now as cant reinstall the binding

i tried that the battery did not show so i uninstalled the binding

Hi Sharpy,

I’m really sorry, the server that’s hosting the jar file was offline while I was moving some stuff around in my house. Try it again now and it should install correctly. Guess I need some more reliable hosting! :wink:

Chris

Don’t worry about it

reinstalled perfectly now back up and running with battery readout :slight_smile: thanks for adding that

just having problems i find that my thermostat thing is offline alot of the time

the only way too fix the problem is delete the hive account and re add it if i only disable and re enable the account it says configuration error

2019-02-10 20:14:57.679 [hingStatusInfoChangedEvent] - 'hive:thermostat:d459f128-fee5-4a3c-ab48-0c1819' changed from OFFLINE (COMMUNICATION_ERROR): Unable to get the status of your thermostat, this may be a temporary problem with the HIVE api to UNINITIALIZED

2019-02-10 20:14:57.688 [hingStatusInfoChangedEvent] - 'hive:thermostat:d459f128-fee5-4a3c-ab48-0c1819' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)

2019-02-10 20:14:59.885 [hingStatusInfoChangedEvent] - 'hive:thermostat:d459f128-fee5-4a3c-ab48-0c1819' changed from UNINITIALIZED (DISABLED) to INITIALIZING

2019-02-10 20:14:59.891 [hingStatusInfoChangedEvent] - 'hive:thermostat:d459f128-fee5-4a3c-ab48-0c1819' changed from INITIALIZING to ONLINE

==> /var/log/openhab2/openhab.log <==

2019-02-10 20:14:59.894 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)

==> /var/log/openhab2/events.log <==


are you still having this problem ?

Hi Chris. Sorry for the late reply … been away for a bit. Today it was still offline, so I uninstalled the binding, and re-installed, and noticed that you’ve now added battery status! Thanks :slight_smile:

I’ll keep an eye on it over the next few days.

Hi Sharpy, I was seeing a permanent ‘offline’ status, so I removed the binding, and re-installed. I did this before reading this thread, and hadn’t realised that there was a new build. Was very pleasantly surprised to see the battery level added, and ‘hot water’ now not returning ‘NULL’.

@ChrisSFoot keep up the excellent work!

Update: Spoke too soon about ‘Hot Water’ not returning ‘Null’ … it still does.

Im having reliability issues using this binding

when its all working im very pleased with the binding and it does everything i could want but its working and then suddenly not it just fails too talk to the Thermostat and return values or send commands restarting openhab brings it back online but only temporarily any suggestion on how too troubleshoot/fix this problem?

I have been having this problem since i first started using the binding

Hi Chris

Just had my Hive home hub installed and heating all connected. Thought I’d give this a try. I’m having a little difficulty connecting to Hive - when i enter my username and password in the Hive Account thing it just says cannot connect. I suspected maybe one of the special characters in my password was the issue but I have removed it (and re created the thing) and no luck.

I did notice that if you go to this page (https://www.hivehome.com/shop/login) I can’t seem to log in, but I am fine at https://my.hivehome.com/login

Bit stumped here; Any ideas? Openhab server can definitely see the internet.