Page 14 of 16
Re: Read British Gas Hive Heating temperature
Posted: Monday 05 October 2020 18:17
by sach
Thanks for updating the plugin, it works great.
One issue I have is this message in the logs appearing every hour:
"Error: (Hive) Error Getting Devices - Recreating Session"
Any ideas or is there a way to suppress this message so it stops sending me emails

Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 20:00
by imcfarla
I have reduced this to just a log message - it was never meant to happen that often but it seems to be a session now only lasts an hour.
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 22:29
by sach
Thanks for the quick reply.
I updated the py file but it’s still showing up as errors in the logs.
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 22:35
by imcfarla
Are you using the urllib version? I haven't updated that one
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 22:38
by sach
No the normal one.
Is this the section you updated?
# Bad session?
Domoticz.Error("Error Getting Devices - Recreating Session")
self.sessionId = ''
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 22:50
by mark.sellwood
This may be a silly question, what's the difference between the normal & urllib versions?
How do I know what one I'm using & how do I switch to the other?
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 23:00
by imcfarla
oops - I missed one.... updated now
There are 2 files called plugin* in the repository. One is normal plugin.py which uses the domoticz connection objects for all the conections and the second one uses urllib to connect directly ignore domoticz until it is time to update devices.
The urllib one was developed before domoticz had connections and is more directly related to the original script. However there was a time a while back that there were problems with the version of python in domoticz versus the version in various distributions that crasheddomoticz whenever a plugin loaded urllib. I suspect that whatever the problem is has mostly gone away but I do not know if it was ever fixed. Hence I rewrote the plugin to use the connection objects.
To switch between the two versions you need to rename plugin.py to plugin.py.orig (or similar) and rename plugin.urllib.py to plugin.py
I use the newer one rather than the urllib one but I try to keep them feature equivalent.
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 06 October 2020 23:13
by sach
Thanks mate. Update again on my end. Will let you know if it comes back but that should do it

Re: Read British Gas Hive Heating temperature
Posted: Wednesday 07 October 2020 8:26
by mark.sellwood
Thanks for the explanation on the versions.
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 07 October 2020 9:03
by sach
sach wrote: ↑Tuesday 06 October 2020 23:13
Thanks mate. Update again on my end. Will let you know if it comes back but that should do it
No error in the logs now
But i do have some stability issues with my Domoticz VM becoming totally unresponsive. Cannot honestly say its the Hive plugin doing it, but i'm going to switch it off for a day or 2 and see if it still crashes.
I use Hive as a boiler switch when one of my 5 zones requests heat. Previously i was using a virtual switch linked to IFTTT Webhook for this and using the original script to ensure the boiler state was as it should be.
Seriously considering purchasing a Secure Z-Wave boiler switch so i can get rid of hive altogether and make everything local.
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 07 October 2020 9:47
by mark.sellwood
I'm looking at getting rid of Hive too, my Hive Hub stops working randomly and needs to be power cycled, Hive know all about it, its a design issue but wont be fixing it.
They have said I have 2 options:-
Replace my Hub at a cost of £80
Put a time switch in to power cycle the Hub daily
I'm looking at Nest
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 07 October 2020 22:02
by MikeF
Although I switched away from Hive about 15 months ago (
https://www.domoticz.com/forum/viewtop ... 20#p218657), as the OP of this thread I’m still interested to watch developments from time to time.
I must say that I am disappointed to see that people are having problems with BG changing the API, so that plugins, etc., need to be modified - my main reason for moving away is that the system is not under my control, and that I have to rely on minute-by-minute calls to an external server to operate my domestic central heating: view temperature, change thermostat setting, turn boiler on / off, etc. I changed to the Drayton Wiser system (see above link), and whilst this does have a far simpler thermostat than Hive’s, and uses an iPhone / Android app for most settings, the server resides in the controller with no need for a hub, so that the system can be controlled entirely locally.
Some third-party Python APIs have been produced, and I have developed a number of dzVents scripts based on these, so that I can control my system from within Domoticz, both locally and remotely. I rarely use the Drayton app, and I could (but I haven’t) block the app through my router, and I would still have complete control.
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 07 October 2020 23:11
by sach
Thanks Mike.
Is this the same system?
https://www.amazon.co.uk/Drayton-Wiser- ... th=1&psc=1
How reliable are the plugins for Domoticz? I already have zwave trv’s and room sensors in all the bedrooms so have a blocky setup to set Hive to either on (25°) or off (7°) depending on whether a room is calling for heat. I’m guessing this is already possible from the existing plugin for Wiser?
Also how easy is it to replace Hive. Does it just clip into the existing plate? I don’t have a combi so require heating too, but I leave that on a schedule on Hive currently.
Cheers
Sach
Re: Read British Gas Hive Heating temperature
Posted: Friday 09 October 2020 8:43
by MikeF
Yes, it’s that system, and yes, it fits on the same backplate.
I have to admit to no experience of the Wiser plugin - I only have a combi system (heating only, hot water on demand), no TRVs, and no smart plugs. So I find the plugin overkill for my needs - also, I’ve had bad experience with plugins in the past, with repeated ‘onMessage’ failure errors. I prefer to write my own code for my own needs, so I know what’s going on!
Re: Read British Gas Hive Heating temperature
Posted: Tuesday 13 October 2020 10:25
by sach
Heads up. Amazon UK is selling the 2 channel Wiser system that I linked above for £56.99. I just purchased it myself and when in the basket it dropped to £46.99 for some reason (not that i'm complaining). Thanks for the heads up on this system Mike. I will now be pestering you to help me with the scripts!

Re: Read British Gas Hive Heating temperature
Posted: Wednesday 02 December 2020 18:27
by dgilbert2
Here we go again?!
I can no longer login to the Hive API, so no updates since 14:20 today.
Anyone else having this issue and if so, any clues what the problem is?
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 02 December 2020 18:36
by mark.sellwood
Same with me
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 02 December 2020 18:41
by roadsnail
Yep, same here. Noticed the house was cooling down!
(Hive) HTTP Error 401: Unauthorized
Errors started around the same time.
Haven't started looking yet, but I think I will bail on the Hive system. Once I get rid, then I will not be relying on third parties any longer
for automation.
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 02 December 2020 18:45
by mark.sellwood
I'm looking to bail on Hive too, I have to reboot my hub daily to keep it working, that know about the issue & want me to pay for a new hub.
Re: Read British Gas Hive Heating temperature
Posted: Wednesday 02 December 2020 18:53
by roadsnail
mark.sellwood wrote: ↑Wednesday 02 December 2020 18:45
I'm looking to bail on Hive too, I have to reboot my hub daily to keep it working, that know about the issue & want me to pay for a new hub.
Just wish I'd started homebrewing my own solution the last time BG changed stuff! I would have had a working replacement by now. Anyhow...
My plan is to rip the guts out of a cheap (probably ebay) s/h 2 channel controller. Replace said guts with esp32 based wifi solution. (My existing esp8266 work for months on end without any issues).