Page 15 of 16

Re: Read British Gas Hive Heating temperature

Posted: Wednesday 02 December 2020 19:34
by sach
Not much help I know and I don’t want to sound like I’m bragging but following Mike’s recommendation and moving to Drayton Wiser was the best decision I made with my heating. The integration has been flawless up till now and the installation from Hive was a piece of cake. I highly recommend you guys to take a look into it.

Re: Read British Gas Hive Heating temperature

Posted: Thursday 03 December 2020 15:08
by pay4property
I'm getting the Hive API returning "Forbidden" :(

I can successfully connect to the Hive web app using the credentials so I know they are correct but whenever the plugin tries to connect it's getting a 403 forbidden error. I've included the log below (obviously with password and Id blanked) as hopefully this may help to debug the issue.

And help would be appreciated.

2020-12-03 13:58:15.177 (W1 Hive) Pushing 'onHeartbeatCallback' on to queue
2020-12-03 13:58:15.239 (W1 Hive) Processing 'onHeartbeatCallback' message
2020-12-03 13:58:15.239 (W1 Hive) Calling message handler 'onHeartbeat'.
2020-12-03 13:58:15.239 (W1 Hive) onHeartbeat called
2020-12-03 13:58:15.239 (W1 Hive) Counter = 3
2020-12-03 13:58:25.379 (W1 Hive) Pushing 'onHeartbeatCallback' on to queue
2020-12-03 13:58:25.411 (W1 Hive) Processing 'onHeartbeatCallback' message
2020-12-03 13:58:25.411 (W1 Hive) Calling message handler 'onHeartbeat'.
2020-12-03 13:58:25.411 (W1 Hive) onHeartbeat called
2020-12-03 13:58:25.411 (W1 Hive) Counter = 4
2020-12-03 13:58:35.593 (W1 Hive) Pushing 'onHeartbeatCallback' on to queue
2020-12-03 13:58:35.639 (W1 Hive) Processing 'onHeartbeatCallback' message
2020-12-03 13:58:35.639 (W1 Hive) Calling message handler 'onHeartbeat'.
2020-12-03 13:58:35.639 (W1 Hive) onHeartbeat called
2020-12-03 13:58:35.639 (W1 Hive) Counter = 5
2020-12-03 13:58:45.810 (W1 Hive) Pushing 'onHeartbeatCallback' on to queue
2020-12-03 13:58:45.857 (W1 Hive) Processing 'onHeartbeatCallback' message
2020-12-03 13:58:45.857 (W1 Hive) Calling message handler 'onHeartbeat'.
2020-12-03 13:58:45.858 (W1 Hive) onHeartbeat called
2020-12-03 13:58:45.858 (W1 Hive) Counter = 6
2020-12-03 13:58:56.195 (W1 Hive) 45 44 22 7d 5d 7d .. .. .. .. .. .. .. .. .. .. .. .. .. .. ED"}]}
2020-12-03 13:58:56.195 (W1 Hive) Pushing 'onMessageCallback' on to queue
2020-12-03 13:58:56.195 (W1 Hive) Processing 'onMessageCallback' message
2020-12-03 13:58:56.195 (W1 Hive) Calling message handler 'onMessage'.
2020-12-03 13:58:56.195 (W1 Hive) onMessage called for Hive Weather
2020-12-03 13:58:56.195 (W1 Hive) Processing 'onDisconnectCallback' message
2020-12-03 13:58:56.195 (W1 Hive) Calling message handler 'onDisconnect'.
2020-12-03 13:58:56.195 (W1 Hive) onDisconnect called for Hive Weather
2020-12-03 13:58:56.196 (W1 Hive) Processing 'onMessageCallback' message
2020-12-03 13:58:56.196 (W1 Hive) Calling message handler 'onMessage'.
2020-12-03 13:58:56.196 (W1 Hive) onMessage called for Hive Devices
2020-12-03 13:58:56.196 (W1 Hive) Pushing 'DisconnectDirective' on to queue
2020-12-03 13:58:56.196 (W1 Hive) Error Getting Devices - Recreating Session
2020-12-03 13:58:56.196 (W1 Hive) Pushing 'ConnectDirective' on to queue
2020-12-03 13:58:56.196 (W1 Hive) Processing 'DisconnectDirective' message
2020-12-03 13:58:56.196 (W1 Hive) Disconnect directive received for 'api.prod.bgchprod.info:443'.
2020-12-03 13:58:56.196 (W1 Hive) Handling TCP disconnect, socket (api.prod.bgchprod.info:443) is connected
2020-12-03 13:58:56.196 (W1 Hive) Processing 'ConnectDirective' message
2020-12-03 13:58:56.197 (W1 Hive) Queued asynchronous secure read aborted.
2020-12-03 13:58:56.197 (W1 Hive) Pushing 'DisconnectedEvent' on to queue
2020-12-03 13:58:56.197 (W1 Hive) Transport set to: 'TCP/IP', beekeeper.hivehome.com:443.
2020-12-03 13:58:56.219 (W1 Hive) Connect directive received, action initiated successfully.
2020-12-03 13:58:56.219 (W1 Hive) Processing 'DisconnectedEvent' message
2020-12-03 13:58:56.219 (W1 Hive) Disconnect event received for 'api.prod.bgchprod.info:443'.
2020-12-03 13:58:56.220 (W1 Hive) Pushing 'onDisconnectCallback' on to queue
2020-12-03 13:58:56.221 (W1 Hive) Processing 'onDisconnectCallback' message
2020-12-03 13:58:56.221 (W1 Hive) Calling message handler 'onDisconnect'.
2020-12-03 13:58:56.221 (W1 Hive) onDisconnect called for Hive Devices
2020-12-03 13:58:56.241 (W1 Hive) Pushing 'onConnectCallback' on to queue
2020-12-03 13:58:56.274 (W1 Hive) Processing 'onConnectCallback' message
2020-12-03 13:58:56.274 (W1 Hive) Calling message handler 'onConnect'.
2020-12-03 13:58:56.274 (W1 Hive) onConnect called for Hive Session
2020-12-03 13:58:56.275 (W1 Hive) Creating Session
2020-12-03 13:58:56.275 (W1 Hive) Pushing 'WriteDirective' on to queue
2020-12-03 13:58:56.276 (W1 Hive) Processing 'WriteDirective' message
2020-12-03 13:58:56.276 (W1 Hive) Sending 292 bytes of data
2020-12-03 13:58:56.276 (W1 Hive) 50 4f 53 54 20 2f 31 2e 30 2f 63 6f 67 6e 69 74 6f 2f 6c 6f POST./1.0/cognito/lo
2020-12-03 13:58:56.276 (W1 Hive) 67 69 6e 20 48 54 54 50 2f 31 2e 31 0d 0a 41 75 74 68 6f 72 gin.HTTP/1.1..Author
2020-12-03 13:58:56.276 (W1 Hive) 69 7a 61 74 69 6f 6e 3a 20 42 61 73 69 63 20 64 7a 46 41 63 ization:.Basic.dzFAc
2020-12-03 13:58:56.277 (W1 Hive) 47 46 35 4e 48 42 79 62 33 42 6c 63 6e 52 35 4c 6d 4e 76 62 GF5NHByb3BlcnR5LmNvb
2020-12-03 13:58:56.277 (W1 Hive) 54 70 6e 61 57 35 6e 5a 58 49 78 51 51 3d 3d 0d 0a 55 73 65 TpnaW5nZXIxQQ==..Use
2020-12-03 13:58:56.277 (W1 Hive) 72 2d 41 67 65 6e 74 3a 20 44 6f 6d 6f 74 69 63 7a 2f 31 2e r-Agent:.Domoticz/1.
2020-12-03 13:58:56.277 (W1 Hive) 30 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 0..Content-Type:.app
2020-12-03 13:58:56.277 (W1 Hive) 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 41 63 63 65 70 lication/json..Accep
2020-12-03 13:58:56.277 (W1 Hive) 74 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 0d t:.application/json.
2020-12-03 13:58:56.277 (W1 Hive) 0a 48 6f 73 74 3a 20 62 65 65 6b 65 65 70 65 72 2e 68 69 76 .Host:.beekeeper.hiv
2020-12-03 13:58:56.277 (W1 Hive) 65 68 6f 6d 65 2e 63 6f 6d 0d 0a 43 6f 6e 74 65 6e 74 2d 4c ehome.com..Content-L
2020-12-03 13:58:56.277 (W1 Hive) 65 6e 67 74 68 3a 20 35 39 0d 0a 0d 0a 7b 22 75 73 65 72 6e ength:.59....{"usern
2020-12-03 13:58:56.278 (W1 Hive) 61 6d 65 22 3a 20 22 77 31 40 70 61 79 34 70 72 6f 70 65 72 ame":."******
2020-12-03 13:58:56.278 (W1 Hive) 74 79 2e 63 6f 6d 22 2c 20 22 70 61 73 73 77 6f 72 64 22 3a ****",."password":
2020-12-03 13:58:56.278 (W1 Hive) 20 22 67 69 6e 67 65 72 31 41 22 7d .. .. .. .. .. .. .. .. ."********"}
2020-12-03 13:58:56.322 (W1 Hive) Pushing 'ReadEvent' on to queue
2020-12-03 13:58:56.336 (W1 Hive) Processing 'ReadEvent' message
2020-12-03 13:58:56.336 (W1 Hive) Received 547 bytes of data
2020-12-03 13:58:56.336 (W1 Hive) 48 54 54 50 2f 31 2e 31 20 34 30 33 20 46 6f 72 62 69 64 64 HTTP/1.1.403.Forbidd
2020-12-03 13:58:56.336 (W1 Hive) 65 6e 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 en..Content-Type:.ap
2020-12-03 13:58:56.336 (W1 Hive) 70 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 43 6f 6e 74 plication/json..Cont
2020-12-03 13:58:56.337 (W1 Hive) 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 34 0d 0a 43 6f 6e 6e ent-Length:.24..Conn
2020-12-03 13:58:56.337 (W1 Hive) 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a ection:.keep-alive..
2020-12-03 13:58:56.337 (W1 Hive) 44 61 74 65 3a 20 54 68 75 2c 20 30 33 20 44 65 63 20 32 30 Date:.Thu,.03.Dec.20
2020-12-03 13:58:56.337 (W1 Hive) 32 30 20 31 33 3a 35 38 3a 35 35 20 47 4d 54 0d 0a 78 2d 61 20.13:58:55.GMT..x-a
2020-12-03 13:58:56.338 (W1 Hive) 6d 7a 6e 2d 52 65 71 75 65 73 74 49 64 3a 20 32 65 30 36 64 mzn-RequestId:.2e06d
2020-12-03 13:58:56.338 (W1 Hive) 66 35 31 2d 32 33 34 66 2d 34 63 32 34 2d 62 31 61 37 2d 32 f51-234f-4c24-b1a7-2
2020-12-03 13:58:56.338 (W1 Hive) 32 66 62 39 64 39 36 62 35 39 33 0d 0a 78 2d 61 6d 7a 6e 2d 2fb9d96b593..x-amzn-
2020-12-03 13:58:56.338 (W1 Hive) 45 72 72 6f 72 54 79 70 65 3a 20 46 6f 72 62 69 64 64 65 6e ErrorType:.Forbidden
2020-12-03 13:58:56.338 (W1 Hive) 45 78 63 65 70 74 69 6f 6e 0d 0a 78 2d 61 6d 7a 2d 61 70 69 Exception..x-amz-api
2020-12-03 13:58:56.338 (W1 Hive) 67 77 2d 69 64 3a 20 57 2d 70 4d 39 45 55 50 44 6f 45 46 6f gw-id:.W-pM9EUPDoEFo
2020-12-03 13:58:56.339 (W1 Hive) 6e 67 3d 0d 0a 58 2d 41 6d 7a 6e 2d 54 72 61 63 65 2d 49 64 ng=..X-Amzn-Trace-Id
2020-12-03 13:58:56.339 (W1 Hive) 3a 20 52 6f 6f 74 3d 31 2d 35 66 63 38 65 66 31 66 2d 33 35 :.Root=1-5fc8ef1f-35
2020-12-03 13:58:56.339 (W1 Hive) 61 30 61 61 62 31 30 62 65 35 66 38 37 39 34 37 30 33 62 62 a0aab10be5f8794703bb
2020-12-03 13:58:56.339 (W1 Hive) 37 62 0d 0a 58 2d 43 61 63 68 65 3a 20 45 72 72 6f 72 20 66 7b..X-Cache:.Error.f
2020-12-03 13:58:56.339 (W1 Hive) 72 6f 6d 20 63 6c 6f 75 64 66 72 6f 6e 74 0d 0a 56 69 61 3a rom.cloudfront..Via:
2020-12-03 13:58:56.339 (W1 Hive) 20 31 2e 31 20 61 38 63 37 66 64 61 35 31 63 38 39 32 36 35 .1.1.a8c7fda51c89265
2020-12-03 13:58:56.340 (W1 Hive) 64 31 35 34 35 64 64 35 35 34 63 62 39 34 37 63 38 2e 63 6c d1545dd554cb947c8.cl
2020-12-03 13:58:56.340 (W1 Hive) 6f 75 64 66 72 6f 6e 74 2e 6e 65 74 20 28 43 6c 6f 75 64 46 oudfront.net.(CloudF
2020-12-03 13:58:56.340 (W1 Hive) 72 6f 6e 74 29 0d 0a 58 2d 41 6d 7a 2d 43 66 2d 50 6f 70 3a ront)..X-Amz-Cf-Pop:
2020-12-03 13:58:56.340 (W1 Hive) 20 4c 48 52 33 2d 43 31 0d 0a 58 2d 41 6d 7a 2d 43 66 2d 49 .LHR3-C1..X-Amz-Cf-I
2020-12-03 13:58:56.340 (W1 Hive) 64 3a 20 36 35 6b 76 68 52 67 47 79 63 62 51 6d 79 34 51 58 d:.65kvhRgGycbQmy4QX
2020-12-03 13:58:56.340 (W1 Hive) 73 71 53 36 35 52 38 6e 71 48 68 6b 4d 76 47 41 64 78 32 7a sqS65R8nqHhkMvGAdx2z
2020-12-03 13:58:56.340 (W1 Hive) 6e 59 6c 50 52 44 79 45 35 62 43 32 65 33 62 32 41 3d 3d 0d nYlPRDyE5bC2e3b2A==.
2020-12-03 13:58:56.341 (W1 Hive) 0a 0d 0a 7b 22 6d 65 73 73 61 67 65 22 3a 22 46 6f 72 62 69 ...{"message":"Forbi
2020-12-03 13:58:56.341 (W1 Hive) 64 64 65 6e 22 7d 0a .. .. .. .. .. .. .. .. .. .. .. .. .. dden"}.
2020-12-03 13:58:56.341 (W1 Hive) Pushing 'onMessageCallback' on to queue
2020-12-03 13:58:56.341 (W1 Hive) Processing 'onMessageCallback' message
2020-12-03 13:58:56.341 (W1 Hive) Calling message handler 'onMessage'.
2020-12-03 13:58:56.341 (W1 Hive) onMessage called for Hive Session
2020-12-03 13:58:56.341 (W1 Hive) Error Creating Session
2020-12-03 13:58:56.341 (W1 Hive) 403
2020-12-03 13:58:56.341 (W1 Hive) Pushing 'DisconnectDirective' on to queue
2020-12-03 13:58:56.341 (W1 Hive) Processing 'DisconnectDirective' message
2020-12-03 13:58:56.342 (W1 Hive) Disconnect directive received for 'beekeeper.hivehome.com:443'.
2020-12-03 13:58:56.342 (W1 Hive) Handling TCP disconnect, socket (beekeeper.hivehome.com:443) is connected
2020-12-03 13:58:56.342 (W1 Hive) Queued asynchronous secure read aborted.
2020-12-03 13:58:56.342 (W1 Hive) Pushing 'DisconnectedEvent' on to queue
2020-12-03 13:58:56.398 (W1 Hive) Processing 'DisconnectedEvent' message
2020-12-03 13:58:56.398 (W1 Hive) Disconnect event received for 'beekeeper.hivehome.com:443'.
2020-12-03 13:58:56.399 (W1 Hive) Pushing 'onDisconnectCallback' on to queue
2020-12-03 13:58:56.399 (W1 Hive) Processing 'onDisconnectCallback' message
2020-12-03 13:58:56.399 (W1 Hive) Calling message handler 'onDisconnect'.
2020-12-03 13:58:56.399 (W1 Hive) onDisconnect called for Hive Session
2020-12-03 13:58:56.195 Error: (W1 Hive) Error getting weather information
2020-12-03 13:58:56.195 Error: CConnection_disconnect, disconnection request from 'W1 Hive' ignored. Transport does not exist.
2020-12-03 13:59:06.168 (W1 Hive) Pushing 'onHeartbeatCallback' on to queue
2020-12-03 13:59:06.214 (W1 Hive) Processing 'onHeartbeatCallback' message
2020-12-03 13:59:06.214 (W1 Hive) Calling message handler 'onHeartbeat'.
2020-12-03 13:59:06.214 (W1 Hive) onHeartbeat called
2020-12-03 13:59:06.215 (W1 Hive) Counter = 2

Thanks
Chris

Re: Read British Gas Hive Heating temperature

Posted: Thursday 03 December 2020 18:17
by MadBanana
I've been using modified versions of the excellent script and python routine by MikeF respectively to boost hot water time (when someone takes a long shower in the evening) and to send data to Domoticz. The latter I can live without, the former is much more of a loss!

The script fell over several months ago and try as I did, I couldn't fix it. The python routine has now also stopped working - I'm also getting a 'Forbidden' response to both - 2FA is off - hope someone with greater skills than me can fix this!!

Re: Read British Gas Hive Heating temperature

Posted: Friday 04 December 2020 9:15
by russss
Hi, a few bits of (hopefully helpful) info from me...

1. There's a thread on the hivehome community where they seem to have fixed the issue:
https://community.hivehome.com/s/questi ... more-error

I need to absorb this today to see if I can repeat this in Python...

2. Zigbee2MQTT supports the Hive SLT2/SLT3 devices as here: https://github.com/Koenkk/zigbee2mqtt/i ... -714520848 - I attempted this yesterday and failed to get it working (after a while the receiver paired, but wasn't recognized properly so I'm missing the right config, despite having pulled the latest code from git) so have reverted back to Hive app version at present :(

For me Zigbee2MQTT must be the way to go to ditch the BG service (helped that I have a Zigbee2MQTT setup anyway), so I need to have another go to see if I can get it to pair properly..... I agree its time to ditch the "service" element of the setup and bring it in to our own control!

Re: Read British Gas Hive Heating temperature

Posted: Friday 04 December 2020 9:48
by dgilbert2
Yes, I've been able to get things working again thanks to that post :-)

I'll post a step by step of what I did shortly if that helps anyone.

Re: Read British Gas Hive Heating temperature

Posted: Friday 04 December 2020 11:40
by dgilbert2
FIXED!!! (for now!!)

All credit for this fix is down to the contributors of the Hive Community post at:
https://community.hivehome.com/s/questi ... errorerror

In particular, chriss and matthewprice2 who developed and put all the pieces of this Hive login jigsaw together.
The core issue is that Hive now uses Amazon Web Services (AWS) and therefore additional code is required to be installed.

All the steps below are what I needed to do. Its a bit daunting at first, so I've tried to create a step by step approach ;-) Good luck :P

Copy and paste each of the following lines into a Terminal window to install and setup AWS (to generate and refresh the Hive login token):

Code: Select all

cd /home/pi

Code: Select all

sudo apt-get install npm

Code: Select all

npm install amazon-user-pool-srp-client --save

Code: Select all

npm install axios --save

Code: Select all

cd /home/pi/node_modules/amazon-user-pool-srp-client
Now download file index.js from (I did this via my PC):
https://www.dropbox.com/s/f9zphtaomgaqwoa/index.js?dl=0
and replace the one in /home/pi/node_modules/amazon-user-pool-srp-client.
(I have also attached a copy index.js as an attachment to this post should the Dropbox link become invalid in the future)

Edit index.js and add your Hive login/password credentials to the end of the file

Code: Select all

nano /home/pi/node_modules/amazon-user-pool-srp-client/index.js
Continue to copy and paste each of the following lines into a Terminal:

Code: Select all

mkdir /home/pi/tmp

Code: Select all

export CognitoUserPoolUsers=eu-west-1_SamNfoWtf CognitoUserPoolClientWeb=3rl4i0ajrmtdm8sbre54p9dvd9

Code: Select all

node /home/pi/node_modules/amazon-user-pool-srp-client/index.js > /home/pi/node_modules/amazon-user-pool-srp-client/HiveTokens.json
Now update your original Hive script file. The login & sessionId sides of the script needs updating as below, which is based on Mike's older version. The code is all my lines up to the first "nodes=$....." line.
(Only applicable if your still using MikeF's original V6 script.)

Code: Select all

#!/bin/bash

cd "${0%/*}"

curl -s https://beekeeper-uk.hivehome.com/1.0/cognito/refresh-token -H "Content-Type: application/json" -d @/home/pi/node_modules/amazon-user-pool-srp-client/HiveTokens.json > /home/pi/tmp/HiveTokens.json

login=$(cat /home/pi/tmp/HiveTokens.json)

sessionId=$(echo $login | python -c 'import sys, json; print json.load(sys.stdin)["token"]')

if [ -n "$sessionId" ] ; then cp /home/pi/tmp/HiveTokens.json /home/pi/node_modules/amazon-user-pool-srp-client/HiveTokens.json ; fi
I'm sure there are smart ways to make all these changes but this is where I'm at :)

The hive token is refreshed every time this script runs otherwise it expires after about an hour.

I hope this is of some help!

Re: Read British Gas Hive Heating temperature

Posted: Friday 04 December 2020 18:39
by russss
Awesome, dgilbert2 thanks, you beat me to it :D ! I have my own Python code running again now which boosts my hotwater as needed....

Now to port the login code over to get the domoticz-hive plugin working again....

Re: Read British Gas Hive Heating temperature

Posted: Friday 04 December 2020 23:47
by Calzor Suzay
Hmm bugger I'm using MikeF's updated script, don't have the brainpower to work out what I need to modify to get it to work.
Seems totally different to the fix and original version.

Re: Read British Gas Hive Heating temperature

Posted: Saturday 05 December 2020 10:15
by MadBanana
Fantastic work dgilbert2, thank you so much for sharing the very comprehensive instructions! Boost script is now back at work as before.

For others that follow, the instructions worked for me, although I needed to:-

update my node.js version with

Code: Select all

sudo curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
and then

Code: Select all

sudo apt-get install -y nodejs
and for some reason, I had to replace the "-" in the following line as it showed invalid

Code: Select all

npm install axios –save
I would never have got this far without support from here - so thanks again!

Now to work on a python version to collect the data and populate Domoticz!

Re: Read British Gas Hive Heating temperature

Posted: Saturday 05 December 2020 10:26
by dgilbert2
MadBanana wrote: Saturday 05 December 2020 10:15 .......and for some reason, I had to replace the "-" in the following line as it showed invalid

Code: Select all

npm install axios --save
Sorry! That was my fault when I created the instructions, -- came out as - in that line :cry:

I've now corrected the original post ;)

Re: Read British Gas Hive Heating temperature

Posted: Saturday 05 December 2020 15:07
by MadBanana
Sorry! That was my fault when I created the instructions, -- came out as - in that line :cry: I've now corrected the original post ;)
No need to apologise at all!! Strange, as it worked when I replaced with a single - not sure why though.

Re: Read British Gas Hive Heating temperature

Posted: Saturday 05 December 2020 15:15
by dgilbert2
MadBanana wrote: Saturday 05 December 2020 10:15 .....Now to work on a python version to collect the data and populate Domoticz!
It would be interesting to see what changes are needed to the python version, please post when you have done that one :geek:

Re: Read British Gas Hive Heating temperature

Posted: Monday 07 December 2020 22:38
by MadBanana
dgilbert2 wrote: Saturday 05 December 2020 15:15
It would be interesting to see what changes are needed to the python version, please post when you have done that one :geek:
I've had a slight change of plan in that I can now get all the data I need from the script approach rather than using two separate approaches ... if I get anywhere with a python version (which I'm not at the moment!) I will certainly post ...

Re: Read British Gas Hive Heating temperature

Posted: Friday 11 December 2020 9:02
by SteveW
Hi,

I have up until now been logging on to Hive home from php to send data to an Apache web page.

This has obviously stopped working for the same reason as everyone else.

I am struggling to see how to apply the techniques shown on this forum to php.

Has anyone managed to do this or can anyone help.

Thanks

Re: Read British Gas Hive Heating temperature

Posted: Sunday 27 December 2020 1:12
by alisander
hi,
I found a way to get it working thanks to some good soul updating the plugin a few hours ago and some additional py library installation.
https://github.com/imcfarla2003/domoticz-hive

download the new file plugin.urllib.py

I renamed to plugin.py and copied in the Domoticz\plugin\Hive.. folder

I needed to install the Boto3 and pyincognito module:

I also needed PIP (to install Boto3..) and pathlib


I did it as following:
sudo apt-get install pip
sudo pip install pathlib


-follow https://pypi.org/project/boto3/ to install Boto3
and last (use either methode)
sudo pip3 install pycognito
or sudo python3 -m pip install pycognito

restarted Domoticz and all worked, Hive is generating the tokens automatically and discovering the Hive devices jsut fine.

good luck

Re: Read British Gas Hive Heating temperature

Posted: Wednesday 30 December 2020 15:48
by roadsnail
Hi all,

Not wanting to detract from the excellent work going on here to maintain the plugin following recent authorisation changes made by BG.

But for anyone wanting to experiment with migrating their Hive Active CH/HW controller from the Hive cloud and controlling their CH and HW locally by pairing the Hive stuff to their own Zigbee network with zigbee2mqtt and currently using a node-RED flow. I have written up my notes and experiments here viewtopic.php?f=68&t=35022 and at https://github.com/roadsnail/Hive-SLR2- ... h-node-RED

I am also trying to get better SLR2/SLT2 support in the hive zigbee2mqtt plugin, thus not requiring node-RED support. Note that this is all experimental at the moment, but my aim is to move away from the BG Hive cloud and make my Hive Controller/Thermostat part of my Zigbee network under full control of Domoticz using dzVents scripts.

Just to be clear, this just relates to controlling Hive Active HW/CH, not Hive bulbs/plugs/cameras etc. I moved my Hive bulbs and one active plug to my local Zigbee network ages ago.

Re: Read British Gas Hive Heating temperature

Posted: Wednesday 30 December 2020 18:28
by MikeF
I might just return to this (having left it about 18 months ago)!

Re: Read British Gas Hive Heating temperature

Posted: Wednesday 30 December 2020 19:18
by roadsnail
@MikeF - It was you that first got me into controlling my Hive from Domoticz! I thought you had moved on to using different hardware?

Re: Read British Gas Hive Heating temperature

Posted: Sunday 10 January 2021 16:39
by fountside
alisander wrote: Sunday 27 December 2020 1:12 hi,
I found a way to get it working thanks to some good soul updating the plugin a few hours ago and some additional py library installation.

restarted Domoticz and all worked, Hive is generating the tokens automatically and discovering the Hive devices jsut fine.

good luck
Thank you so much, this worked perfectly for me. Really, really appreciated!

Re: Read British Gas Hive Heating temperature

Posted: Tuesday 24 January 2023 22:49
by uncledulgaria
I'm sorry to have to resurrect this old thread, but I find the final solutions posted seem (to me) a bit inconclusive, as some modifications were done to the two plugin python files as the problems were being resolved, so I'm not clear just what is still needed to be done, and with which py file.

I am new to Domoticz and Python installs (a couple of months) and I am now happily running Domoticz on a Raspi 3 (using a headless Bullseye RaspiOS) linked to the Evohome API. Every thing is working fine, simply by following the install instructions for the built in Evo web api hardware connector, once I had the python3 version stuff sorted out properly.

This is now effectively my "production" system and I don't want to mess anything up and have to reinstall from scratch. It's not installed on an SD-Card, but on a USB linked SSD in one of the Geekworm mini NAS cases, so it's not so easy to just plug in another SD image. It's also gathering data on my Evohome system and helping me refine the room temperature schedules for best comfort for least cost (I hope).

I have now installed a Hive system in another property (circa 300 miles away), and I am now trying to achieve the same level of monitoring with the Hive plugin, but have hit similar errors as posted on page 15 of this thread by pay4property.

I have tried both the plugins and have different errors on them, and I am trying to understand which I should use to get Hive working with the least risk to what has been achieved so far. Since these posts were made, RaspiOS has been updated to Bullseye from Buster, so I'm not fully sure that all of it is still relevant.

Am I right in thinking that alisander's solution is the most suitable as it came after the script updates, or should I follow dgilbert2 plus MadBanana's combined solution ? Or do I have another problem ?

Kind Regards