UPDATE 07/12/2020: Hive have disabled username and password authentication for the Hive API. You now have to externally generate the Hive tokens and paste them into the smart app code. I know this isn’t easy process for non coders, but I have updated the step by step instructions as much as I can to walk people through the process. If you have any issues, you can discuss them with the community on this thread. I will try to help out if I have a spare moment.
The latest version of the unofficial Hive / SmartThings integration. This now utilises the new BeeKeeper API which stopped compatibility with some Hive devices and SmartThings. Now with added Hive Colour Bulb support!
In order to clean up the device types I had to refactor filenames and app names. This means that refreshing from Github in the SmartThings IDE may not work so you might have to manually copy from GitHub and paste over the old code. If you have time, i would recommend to uninstall the v2.0 devices and reinstall from the alyc100 repo via the SmartThings IDE.
NOTE: This smart app requires the Hive Hub to function.
Original Author - @Alyc100
Noteworthy Contributors
@iBeech - Hive Bulb support / Hive Active Plug support
@bibbleq - Hive TRV support
Donations
This integration is provided completely free of charge and is open source. If however you really feel like it, you can make a donation here
Latest Versions
SmartApp
- Hive (Connect) v3.2c - SmartThingsPublic/hive-connect.groovy at master · alyc100/SmartThingsPublic · GitHub
Device Handlers
-
Hive Active Heating v3.0 - SmartThingsPublic/hive-heating.groovy at master · alyc100/SmartThingsPublic · GitHub
-
Hive Active Hot Water v3.0 - SmartThingsPublic/hive-hot-water.groovy at master · alyc100/SmartThingsPublic · GitHub
-
Hive Dimmable Bulb v3.0 - SmartThingsPublic/hive-active-light.groovy at master · alyc100/SmartThingsPublic · GitHub
-
Hive Cool to Warm White Bulb v3.0 - SmartThingsPublic/hive-active-light-tuneable.groovy at master · alyc100/SmartThingsPublic · GitHub
-
Hive Colour Bulb v3.0b
(3.0b) Bug fix. Typo for colour change HTTP request.
SmartThingsPublic/hive-active-light-colour-tuneable.groovy at master · alyc100/SmartThingsPublic · GitHub -
Hive Active Plug v3.0 - SmartThingsPublic/hive-active-plug.groovy at master · alyc100/SmartThingsPublic · GitHub
-
Hive TRV
SmartThingsPublic/hive-trv.groovy at master · alyc100/SmartThingsPublic · GitHub
Screenshots
Supported Devices
The Hive (Connect) app currently supports the following Hive devices:
-
Hive Active Heating (all versions)
-
Hive Active Hot Water (all versions)
-
Hive Dimmable Bulb
-
Hive Cool to Warm White Bulb
-
Hive Colour Changing Bulb
-
Hive Active Plug
-
Hive TRV
Installation Guide
To install the Hive (Connect) app:
-
Add the Hive (Connect) app from GitHub as a new ‘My SmartApps’, select create from code option and paste. Save and Publish.
-
Add the Hive Heating device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive Hot Water device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive Bulb device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive Tuneable Bulb device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive Active Colour Light device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive Active Plug device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive TRV device type from GitHub as a new ‘My Device Handlers’, select create from code option and paste. Save and Publish.
-
Add the Hive (Connect) app within the ST app from the Add SmartApp page in the SmartApp section and locating the Hive (Connect) app under the ‘Custom’ section which should be at the bottom of the list.
NEW: GENERATE HIVE TOKENS EXTERNALLY
First you need to generate tokens for your Hive account. Make sure 2 factor authentication is DISABLED in your Hive account.
-
You need a computer where you can run node.js.
-
Install node.js if you haven’t already. Node.js
-
Check nodejs is installed. In a terminal (or Command Line) run
‘node -v
’
you should see a version number appear which means it’s installed. -
Run ‘
npm init
’ and keep pressing ENTER to create a package.json file. You should type YES when prompted 'Is this OK? (yes) ’ to complete. -
Run ‘
npm install amazon-user-pool-srp-client --save
’ -
Run '
npm install axios --save
’ -
Download index.js from Dropbox - index.js - Simplify your life and replace the index.js already present in ‘node_modules/amazon-user-pool-srp-client’ with downloaded one. On OS X, my node-modules folder was located in my Home directory.
-
Edit the index.js and add your Hive user email and password at your end of the file and save. It should be obvious which lines you need to edit to do this.
-
Set the environment for the index.js script:
OS X/UNIX/Linux - In the amazon-user-pool-srp-client directory run
‘export CognitoUserPoolUsers=eu-west-1_SamNfoWtf CognitoUserPoolClientWeb=3rl4i0ajrmtdm8sbre54p9dvd9
’.
Windows Powershell - In the amazon-user-pool-srp-client directory run
$env:CognitoUserPoolUsers = ‘eu-west-1_SamNfoWtf’
and then
$env:CognitoUserPoolClientWeb = ‘3rl4i0ajrmtdm8sbre54p9dvd9’
- Run ‘
node index.js > HiveTokens.json
’ to generate your token file.
NOTE: If you get an error running step 19 below that looks like TypeError: Cannot read property ‘split’ of undefined
, it might be that the environment variables were not set properly in step 18. Try hardcoding the values in index.js described here → [OBSOLETE] - Hive (Connect) V3.2c (British Gas Hive) - #377 by Alyc100 and redo step 19.
Now you need to paste the token values into the Hive(Connect) app.
-
Open the HiveTokens.json file in a text editor.
-
Edit the Hive(Connect) smart app in the Smartthings IDE
-
In the Smartthings Hive code at line 105, you should see
def hiveTokenString = 'PASTE HiveToken.json content into here'
NOTE: Would have ideally had this in App Settings, but the tokens are too long Smartthings IDE doesn’t like them.
-
Copy the contents of HiveTokens.js file and paste them into the ‘’ single quotes in line 105. It’s a very long string.
-
Save and publish the code.
-
Go into the SmartThings mobile app and go to SmartApps section.
-
Open Hive(Connect) app
-
Tap ‘Done’.
-
This should refresh the new tokens. Open Hive(Connect) app again.
-
Hopefully it should say ‘AUTHENTICATED’.
-
You should be able to select your thermostats and hot water devices in the configuration screen.
-
Once you have selected your devices, click Done on the top right.
-
Your selected devices should automatically be configured and appear under ‘Things’ with the label [Thermostat Name] Hive Heating/Hot Water (may require SmartThings app restart).