Read British Gas Hive Heating temperature
Moderator: leecollings
-
- Posts: 145
- Joined: Tuesday 08 July 2014 15:10
- Target OS: -
- Domoticz version: 4.9700
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
With Beta 4.10445 with v1 it installs and runs.
Need to check stability but i still see errors
This gets repeated often though:-
2019-02-20 22:59:21.387 Error: CConnection_connect, connect request from 'Hive1' ignored. Transport is connected.
2019-02-20 22:59:22.771 Error: (Hive1): Async Secure Read Exception: 1, stream truncated
Need to check stability but i still see errors
This gets repeated often though:-
2019-02-20 22:59:21.387 Error: CConnection_connect, connect request from 'Hive1' ignored. Transport is connected.
2019-02-20 22:59:22.771 Error: (Hive1): Async Secure Read Exception: 1, stream truncated
-
- Posts: 102
- Joined: Tuesday 04 March 2014 10:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Surrey, UK
- Contact:
Re: Read British Gas Hive Heating temperature
Keep an eye on memory usage.
3 x Pi, 1 Master, 2 Slaves, 1x Aeotec Z-Stick S2, 4xSP103 PIR, 5xPowerNode 1, 1xSmart Energy Switch Gen5, 4xFGSS101 Smoke Sensor, 2xFGD212, 9xFGS212 , 7xFGS221/2, 1xAD142 , 1xTKB TZ68E , 2xAeotec Multi Sensor, 3 x NodOn CRC-3-1-00.
-
- Posts: 111
- Joined: Wednesday 12 October 2016 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
Started receiving these errors today:
2019-04-04 19:09:24.915 Error: (Hive) 'onMessage' failed 'KeyError'.
2019-04-04 19:09:24.915 Error: (Hive) ----> Line 860 in '/home/pi/domoticz/plugins/Hive/plugin.py', function onMessage
2019-04-04 19:09:24.915 Error: (Hive) ----> Line 155 in '/home/pi/domoticz/plugins/Hive/plugin.py', function onMessage
2019-04-04 19:09:24.915 Error: (Hive) ----> Line 496 in '/home/pi/domoticz/plugins/Hive/plugin.py', function UpdateDeviceState
Anyone else or just me?
2019-04-04 19:09:24.915 Error: (Hive) 'onMessage' failed 'KeyError'.
2019-04-04 19:09:24.915 Error: (Hive) ----> Line 860 in '/home/pi/domoticz/plugins/Hive/plugin.py', function onMessage
2019-04-04 19:09:24.915 Error: (Hive) ----> Line 155 in '/home/pi/domoticz/plugins/Hive/plugin.py', function onMessage
2019-04-04 19:09:24.915 Error: (Hive) ----> Line 496 in '/home/pi/domoticz/plugins/Hive/plugin.py', function UpdateDeviceState
Anyone else or just me?
-
- Posts: 111
- Joined: Wednesday 12 October 2016 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
Unfortunately the plugin is unusable for me now. 
Worked fine for months and nothing changed but all of a sudden it causes domoticz to crash and misses schedules.
I have zwave TRV's and temperature sensors in every room and Hive is used simply as a relay to switch the boiler on.
Will have to look for another solution.

Worked fine for months and nothing changed but all of a sudden it causes domoticz to crash and misses schedules.
I have zwave TRV's and temperature sensors in every room and Hive is used simply as a relay to switch the boiler on.
Will have to look for another solution.
-
- Posts: 102
- Joined: Tuesday 04 March 2014 10:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Surrey, UK
- Contact:
Re: Read British Gas Hive Heating temperature
Same with me, I had to stop using it as it consumes all the memory over a few days then crashes domoticz.
I think something must have changed at the Hive end.
I think something must have changed at the Hive end.
3 x Pi, 1 Master, 2 Slaves, 1x Aeotec Z-Stick S2, 4xSP103 PIR, 5xPowerNode 1, 1xSmart Energy Switch Gen5, 4xFGSS101 Smoke Sensor, 2xFGD212, 9xFGS212 , 7xFGS221/2, 1xAD142 , 1xTKB TZ68E , 2xAeotec Multi Sensor, 3 x NodOn CRC-3-1-00.
-
- Posts: 350
- Joined: Sunday 19 April 2015 0:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.2
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
As the OP of this thread,I've produced python scripts to read Hive current and target temperatures, and display these in Domoticz. I installed the Hive plugin a while ago, but I experienced a number of errors, so I stopped using it. I've been using the python script happily (i.e., my RPi is happy!) for several years - I don't have Hive smart plugs or lights, etc., so I've not extended the script to these.
I've posted my latest version below, which may be of use if all you want to do is monitor your Hive heating - it uses the more recent Hive API (https://beekeeper.hivehome.com). To use it, create 2 dummy temperature devices (current, target), and a dummy switch (heating status), and enter the idx's in the script; also enter your Domoticz url and port, and Hive username and password.


I've posted my latest version below, which may be of use if all you want to do is monitor your Hive heating - it uses the more recent Hive API (https://beekeeper.hivehome.com). To use it, create 2 dummy temperature devices (current, target), and a dummy switch (heating status), and enter the idx's in the script; also enter your Domoticz url and port, and Hive username and password.


- Spoiler: show
-
- Posts: 350
- Joined: Sunday 19 April 2015 0:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.2
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
I've just come across what I believe is a bug in the Hive API - looking at the json output, the target value
is changing one hour later than it should (compared to the schedule). I suspect this bug was introduced on the recent change to BST.
I'll investigate a workaround.
Code: Select all
target = r.json()["products"][thermostat]["state"]["target"]
I'll investigate a workaround.
-
- Posts: 111
- Joined: Wednesday 12 October 2016 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
Thanks Mike, I will give it a shot.
Don't suppose you could code in hot water support
Don't suppose you could code in hot water support

-
- Posts: 111
- Joined: Wednesday 12 October 2016 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
I think i may have solved the errors with the Python plugin by removing the bulbs and just leaving the heating.
I run Zigbee2MQTT and switched one of the bulbs over to it some time ago, but got lazy and left the other bulb on the Hive hub.
I just removed the 2nd bulb so I only have heating and hot water left and the error have stopped appearing in the logs.
This is on the 0.7 version of the plugin.
Will see how it goes for a while but its looking promising
I run Zigbee2MQTT and switched one of the bulbs over to it some time ago, but got lazy and left the other bulb on the Hive hub.
I just removed the 2nd bulb so I only have heating and hot water left and the error have stopped appearing in the logs.
This is on the 0.7 version of the plugin.
Will see how it goes for a while but its looking promising

-
- Posts: 350
- Joined: Sunday 19 April 2015 0:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.2
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
I've amended my script to include support for hot water - there are various places in the code where it says 'uncomment for hot water'. Note that I haven't tested this, as i now only have a (combi) heating system (so hot water is on demand), although I still have the Hive 2-channel receiver.
Also, I've included code to get the target temperature by parsing the 'schedule' object, to get round the bug I reported earlier.
Also, I've included code to get the target temperature by parsing the 'schedule' object, to get round the bug I reported earlier.
- Spoiler: show
-
- Posts: 145
- Joined: Tuesday 08 July 2014 15:10
- Target OS: -
- Domoticz version: 4.9700
- Location: UK
- Contact:
-
- Posts: 350
- Joined: Sunday 19 April 2015 0:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.2
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
I think the instructions are pretty well given in my post of 9 April, but here goes:
1. Create 2 dummy temperature devices (one for inside, and one for target), and note their IDx's
2. Create 1 dummy switch for heating status, and note its IDx
3. Copy the script from my post of 9 April, and edit the python file with your own values: Hive and Domoticz logins, Domoticz url and IDx's
4. Place the file in the Domoticz script folder
5. Create a crontab which runs the script every x minutes (I run mine every minute); my crontab now looks like this:
(Sorry for the delay - I've been away.)
1. Create 2 dummy temperature devices (one for inside, and one for target), and note their IDx's
2. Create 1 dummy switch for heating status, and note its IDx
3. Copy the script from my post of 9 April, and edit the python file with your own values: Hive and Domoticz logins, Domoticz url and IDx's
4. Place the file in the Domoticz script folder
5. Create a crontab which runs the script every x minutes (I run mine every minute); my crontab now looks like this:
Code: Select all
*/1 * * * * sudo python /home/pi/domoticz/scripts/hive2domo.py > /dev/null 2>&1 &
-
- Posts: 145
- Joined: Tuesday 08 July 2014 15:10
- Target OS: -
- Domoticz version: 4.9700
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
Should of said I had a crack is from old to new and got it working.
Water bit didn't work at the start then realized there was more to un comment throughout the script not just at the top.
All looks good, thanks
Water bit didn't work at the start then realized there was more to un comment throughout the script not just at the top.
All looks good, thanks

-
- Posts: 26
- Joined: Tuesday 06 December 2016 23:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
I ended up using @MikeF 's script. Works perfectly for me for now.
I would of liked to use Hive plugin but dont have any intention of using their bulbs etc. The TRV's look tempting however but it shouldnt take much to add to the scripts as and when. I suspect they will report back a current temp, target and if they are on/off.
Thanks for all the work on this folks !
I would of liked to use Hive plugin but dont have any intention of using their bulbs etc. The TRV's look tempting however but it shouldnt take much to add to the scripts as and when. I suspect they will report back a current temp, target and if they are on/off.
Thanks for all the work on this folks !
-
- Posts: 350
- Joined: Sunday 19 April 2015 0:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.2
- Location: UK
- Contact:
Re: Read British Gas Hive Heating temperature
I have now changed over to the Drayton Wiser heating system
- see this thread: viewtopic.php?f=34&t=28585
I’m developing similar scripts there.
- see this thread: viewtopic.php?f=34&t=28585
I’m developing similar scripts there.
-
- Posts: 111
- Joined: Wednesday 12 October 2016 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
Anyone still using the Python plugin?
-
- Posts: 64
- Joined: Monday 04 December 2017 13:18
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
Yes but I have redone my heating with Tado thermostats and most of my lights are now lightwaverf. Just a few hive bulbs and an active plug left...
-
- Posts: 111
- Joined: Wednesday 12 October 2016 14:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
That's a shame as the plugin does work really well, but I'm nervous in case it ever stops working and we have no devs working on it.
I'm at a crossroads where I have installed home assistant to try out where Hive works great, in addition to the Ring plugin which Domoticz is missing, however I have spent a lot of time and effort in getting domoticz to where it does everything I need.
I may just be better off getting a zwave boiler switch and sticking with Domoticz. Food for thought...
I'm at a crossroads where I have installed home assistant to try out where Hive works great, in addition to the Ring plugin which Domoticz is missing, however I have spent a lot of time and effort in getting domoticz to where it does everything I need.
I may just be better off getting a zwave boiler switch and sticking with Domoticz. Food for thought...
Re: Read British Gas Hive Heating temperature
I'll answer my own question - looks like domoticz does not send the servername so any site using SNI will fail.
Helena
Helena
-
- Posts: 64
- Joined: Monday 04 December 2017 13:18
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Read British Gas Hive Heating temperature
I have just updated the plugin to work with a few more types of bulbs.
Who is online
Users browsing this forum: No registered users and 1 guest