Pilgrim Beart was behind the technology of British Gas' Hive
Pilgrim Beart was behind the technology of British Gas' Hive

    Fail fast and hire good data scientists: The Hive recipe for IoT success

    British Gas has enjoyed enormous success with its Hive thermostats and connected sensors but, as the company’s data science experts explain, this is just the start.

    Hive is today where most retailers, telcos and utility companies want to be tomorrow. The Hive thermostats are already embedded in thousands of smart homes across the UK, and the firm’s latest array of products take the firm beyond simply controlling heating from your phone, to managing your entire home using the same device.

    Established some four years ago, Hive was born out of British Gas’s initial work with Cambridge smart home pioneer alertme.com – a company it eventually acquired for $100 million earlier this year.

    The original connected thermostat gathered rave reviews, and largely for the ease in which users could control their heating from their phone. The latest version, Hive 2, raised the bar with better styling and increased functionality, as well as the system (machine) learning the user’s heating habits.

    And with the newly launched sensors, Hive can now help you to control heating, lighting and detect movement in the home. Event tracking is apparently ‘coming soon’ too.

    Today, British Gas boasts a suite of smart home products, from the first and second generation Hive thermostats to the new sensors for windows, doors and motion, as well as its My Energy smart meters. Boiler IQ is the most recent addition, with the monitoring system enabling compatible boilers to self-diagnose problems before they cause significant damage.

    hive-phoneWith British Gas and Hive on the march to owning the smart home (your time will come, Amazon), Internet of Business spoke to British Gas Connected Homes’ Jim Anning, head of data and analytics, and Josep Casals, head of data engineering, to understand what’s up next.

    Read more: British Gas takes smart homes to another level

    Smart home market gets shooting pains

    For all of its early success, Anning admits that it’s hard for British Gas to strategically plan for an early-adopter market that continues to evolve at rapid pace.

    “It’s a nascent market, and I don’t think anyone knows where it’s going to go,” he told IoB.

    “We’re clearly playing with Hive. We’ve got 300,000 customers right now. We started out from the base of controlling your heating from your phone, but that strapline is now control your home from your phone. Right now, it’s about expanding out that from solid base of heating and moving beyond that.”

    Anning says that British Gas’ business model with Hive still revolves largely around B2C subscriptions, despite the lure of B2B and the opportunity of working in certain verticals.

    “I think everyone is playing with that. Of course, like everybody else, we’re exploring if there an insurance model, if there are various other models, especially when we look at water leak detectors and various things like that.

    “Clearly, there is something there that we could make valuable proposition out of, so we’re exploring all those things. However, our day-to-day focus is on making Honeycomb – the platform for Hive – a versatile, solid and reliable base on which we can build these things on.”

    The Hive Honeycomb IoT platform

    Hive’s success has been built upon machine-learning algorithms, a fail fast approach to innovation (more on that in a minute – Ed) and its bespoke Honeycomb IoT platform which enables these machines to talk to each other.

    Hosted in Amazon Web Services cloud to offer “scalability”, the core platform is built in Java. All sensor data is collected in Apache Cassandra, an open-source NoSQL database first developed by Facebook in 2008.

    Jim Anning

    Open APIs and development kits allow Hive to ‘talk’ to home hubs and third-party applications.

    Anning explains that Honeycomb enables the company to set rules to control things, but also to remotely send data to data analytics tools for greater analysis.

    Technical capabilities

    Hive’s tech stack is built on the Apache Cassandra distributed database (a NoSQL distributed database that can manage large amounts of data spread across a large number of servers) with Apache Spark Streaming used for streaming analytics and Apache Kafka – originally developed by LinkedIn and similar to Amazon’s Kinesis – for real-time data messaging. All of this technology is built to process huge amounts of data, from Hive devices, in real-time.

    Indeed, Connected Home is said to be processing 40TBs of static data across 30 large nodes, according to Casals. This includes 30,000 messages a second on the message broker Kafka, with the majority of these messages coming to and from Hive devices.

    Despite all this, and in a world where most technology companies are looking to bolster their partner ecosystem, Hive is trying to do it all on its own.

    Anning says the 2015 acquisition of alertme allowed the firm to “own the entire technology stack”, from the hardware and IoT software platform to the user interface, apps, data analytics and patent portfolio.

    “That helps you to innovate faster than having to deal with a whole load of partners,” he said.

    The firm also takes a novel view on new technologies, with the Hive team always trialling three technologies at the same time.

    “We try three technologies at once, which frustrates Josep, because he wants five,” says Anning, who admits it’s tricky to do this without “overwhelming” legacy equipment. He adds that, with three technologies in play at once, they try not to adopt another until at least one of these has been “mastered”.

    The British Gas spokesperson say that it took them a year to understand Cassandra and the open-source community around it; Kafka was more difficult as there was no community, so British Gas built one. Today, it hosts the London meet-up for Kafka enthusiasts.

    “It’s give and take,” explains Anning.

    Related: Why Google’s Nest sees beyond connected homes and the Internet of Things

    Fail fast innovation

    British Gas may be a 200-year-old utilities company but it has, in recent years, emerged as an innovative place to work. Online the company promotes Hive as a ‘place to create and innovate’ and it also highlights its enthusiasm for the LEAN start-up methodology and agile app development.

    The firm is also a big believer in a ‘fail fast’ approach to innovation.

    “We cut our work into 5-6 weeks’ chunks, we don’t take on things we can’t deliver, unless they can be delivered in six weeks,” said Anning.

    “The initial part of that work is a one-week hack, two weeks is to build working prototype, then three weeks is to turn working prototype into a solid, operational thing. We try and build up everything in these six week blocks. If, after one week, it looks like we’re not getting there, we say let’s bin that and try a different take.”

    Data science and engineering working together

    Anning heads up the data science team of 25 people (data scientists, engineers and data operations people) with Casals managing the data engineering team. Both admit these two departments collaborating successfully is key to a finished product.

    “One of the things I think a lot about is how do I get data science and data engineering working well together. Talking about the data science end of it, these people are using languages like R and Python.

    Josep Casals

    “Josep’s group more about scale and robustness, big stuff. I know the faster I can get the integration between two teams working, the more experiments we’re doing, the more we can fail fast. Languages like Juniper and Python are helping bridge that gap.”

    Citing how the teams share notebooks and now work in both Python and the Scala programming language, he added: “I just don’t think you can innovate as fast.” He mentioned scale was a typical issue.

    Casals added that there are challenges with recruiting:

    “These technologies are becoming more and more popular, and more companies are willing to adopt them because see more companies like us…making them work.

    “We struggle a little bit [with recruitment]; we have managed to cope by making our workplace a very interesting place to be.”

    Anning added: “Data scientists are more in demand. We work at interception of data science and the Internet of Things and I can’t think of two more things that are more hyped-up right now.”

    “Actually, lots of people want to work in this intersection, but finding ones that are exceptional is something we spend a lot of time on. Nobody has ten years’ experience of Cassandra. The challenge is finding the fast learners.”

    Moving to real-time assistance

    Anning and Casals clearly see a future where British Gas can deepen its role in the smart home, and where Hive too can produce real-time updates. There is perhaps the opportunity for more connection between devices, such as Boiler IQ and Hive.

    Anning admits there is plenty of competition in the smart home space.

    “Nest, clearly, is one everyone talks about. Clearly people like Tado doing interesting things, Honeywell too…. everyone is starting to play in this space.

    “But discovering our customers’ needs and serving those, that’s our aim. We’re focused on being the leader, not a follower”

    “I think real-time is the thing that we need to crack, what’s happening in home now. It doesn’t sound very visionary but really that’s not where the industry is right now.

    “So I think from my little bit of the world – data and analytics – being able to consume real-time stream of data and being able to apply some intelligence to those and make customer experience really simple, and to enable them to alter things in their homes based on what’s happening and in real-time.”

    Seb Chakraborty, chief technology officer at British Gas Connected Homes, is speaking at IoT Build, which takes place in London on 15-16 November 2016.

    Featuring high-profile speakers from Google, IBM, Bristol is Open and Digital Greenwich, IoT Build provides a unique opportunity to join technology leaders, innovators and peers to tackle the challenges of technology selection and building the Internet of Things.