Documentation of an API for the Hive platform is somewhat elusive, but this is not because of lack of demand… There are countless forum, social media and support requests begging Hive to release an API and IFTTT support, which would then empower developers to create innovative new applications as well integration with other home automation platforms such as SmartThings and Vera. Without such an API Hive will always be shadowed by the likes of Nest and Philips Hue.
There have been a few announcements from Hive about a new development platform called ‘Honeycomb’ but no firm dates and, much like IFTTT support, the promise has been like a carrot on a stick and of late has gone a little quiet.
AlertMe API v5
Luckily documentation for Hives predecessor from AlertMe is a little more available, and fortunately Hive inherits much of the same API. The following are a few examples from the AlertMe API which also work for Hive:
The API is a RESTful service. All returned data is JSON encoded. There are two API URLs used by British Gas Hive systems, I am not sure which is the most appropriate to use but they both appear to work:
For completeness the following two URLs were used by AlertMe and Lowes Iris systems, these will not work for Hive:
username : Hive username (for Hive this is your email address)
password : Hive password
caller : Caller of the API (e.g WEB, iPhone, Android)
Before any other calls can be made you must login. This will return a WebApiSession cookie which must then be sent with all consequent calls. Session will expire after 20 idle minutes.
After successful login the API will also return the hub ID associated with your user – take note of this ID, it will be used in a number of the other consequent calls.
Returns a list of devices associated with the hub. Note username and hubId. You may see listed devices such as HAHVACTemperatureSensorSLT3 (Thermostat), HAHVACThermostat (Receiver), GenericRangeExtender (Signal Booster) and SmartPlugs.
As you can see the response is an “Unexpected error occurred”, which is different from other error messages where the call is completely wrong, which leads me to believe there is still something there for the smartplug call.
Still this API call particularly interests me, as when the SmartPlug was used in an AlertMe system the above call could be used to remotely switch the plug on and off as well as read power usage values. However when in a Hive system the only “smart” thing the plug does is act as a signal booster and can not be switches of and off over Zigbee. I have written about this in a previous post as I am sure that, if Hive wanted to, these plugs could be re-enabled for remote control (please see voting link below).
These took a little bit of hunting but the following is the documentation for the AlertMe API’s V2.2, V5 and V6.1 (I am not really sure if v6.4 is going to be ‘Honeycomb’ or whether is an older API from AlertMe which is to be retired?