The iKettle, the Eleven-Hour Struggle to Make a Cup of Tea, and Why It Was All About Data, Analytics and Connecting Things Together

So today a story about my eleven-hour struggle to get a WiFi kettle working so I could make a cup of tea made the national newspapers after going viral on Twitter, with The Guardian first picking the story up followed by Mail Online, The Independent and The Sun, then Buzzfeed and other US sites took it international leading to stories running in Austria, Germany, the Netherlands and even Israel.

I had a number of requests from national newspapers, TV and radio for interviews and clearly the story struck a chord with readers with the additional angle of an Englishman so obsessed with his tea that he’d spend all day and night fixing his WiFi kettle and then making it voice controlled, whereas it’s really a story about the value of connecting smart devices together and how hard it still is to do that now, as I made abundantly clear over the series of tweets I posted during the day.

To give some technical background to my initial setup; at home I have a number of Apple HomeKit-compatible devices (Eve Thermostats, Philips Hue lights and so on) that can be controlled from an iOS device either in the home or remote via an Apple TV hub to set the temperature in individual rooms, monitor air quality, turn on-and-off the lights in the house as well as dim and change their colour, either from an app on your phone or through Siri voice commands (“Hey Siri, turn on the kitchen lights”, “Hey Siri, set the temperature in Mark’s office to 20 degrees”).

For those smart devices that don’t yet have HomeKit compatibility I use the open-source HomeBridge project to make these devices also controllable through Siri, and I also have a Samsung SmartThings IoT hub that links to sensors around the house and also my Nest thermostat and smoke detectors, all of which then route through HomeBridge so that they’re available as devices that can be controlled or used as event triggers by Siri and Apple HomeKit.

And the purpose of all this? Well part of it is obviously my interest in gadgets, but it’s mainly to see what can be done with the data these devices produce and combine it with other data we increasingly log using wearables, smartphone apps and social media sites to give better insights into the lives we lead, make our smart devices even smarter, help carers and health organizations provide better services and support for the elderly and vunerable … or in my case, help me exercise more and adopt a healthier lifestyle.

All of this data feeds into a big data “data lake” that I’ve got running on a Hadoop cluster running in the garage, where I run R, SparkML and Python statistical and machine learning algorithms on that combined dataset to work out correlations, attributes of significance and predictive models that could be useful in making sense of that data and the value it can provide.

I use the ideas and models that come out of this setup in my own personal life and as ideas for the work I do, and share them other developers and startups hosted at Wired Sussex and their Digital Catapult Centre in Brighton, an R&D centre next to Brighton Station that proves space and collaboration facilities to a number of developers and early-stage companies that are also working on projects and initiatives in this area.

So where things got complicated with the iKettle is that whilst it’d be useful to connect it to HomeKit and Samsung SmartThings so that a “morning” routine triggered by my health band detecting I’ve woken up could then turn up the heating, put the downstairs lights on and boil the kettle ready for when I came out of the shower (and with all this logged to my Hadoop data lake in real-time ready for analysis later), this device in common with many others only connects to an accompanying app on your smartphone and doesn’t support HomeKit, Samsung SmartThings or any of the services such as IFTTT (If This, then That) that can be used to connect your devices together yourself. To get my iKettle to actually work with Siri I had to hack this integration together myself using the following approach:

  1. Download an install iBrew, a python interface for the iKettle 2.0 that can run on a Raspberry Pi or other server device and sends commands to the iKettle’s IP address to stop, start and report status using a set of reverse-engineered commands.
  2. Using HomeBridge and the HomeBridge-cmdswitch2 plugin, present the iKettle to HomeKit as an accessory with a switch service that when turned on and off runs the corresponding iBrew scripts through this plugin.
  3. Then, use Siri to “Turn the Kettle on” from my iPhone or other iOS device, like this:

Except in my case as the kettle had needed to be re-connected to the network several times over the morning, it had been assigned a new IP address by my DHCP server (I know, I’ve assigned it a static IP address now), and I had to spend several hours using port scanning software on my Mac to try and track down where the kettle was to obtain its new IP address — something that’s not strictly the fault of the iKettle manufacturer as their iOS app tracks the address of the kettle automatically, but by not providing it with HomeKit integration and having to do this myself, this is where the next few hours of my eleven hour ordeal went.

Getting all of this working with my new Amazon Echo was even more of a challenge though, as the Echo doesn’t work with HomeKit and therefore can’t switch the kettle on and off via HomeBridge, but it does work with Samsung Smarthings .. which also isn’t supported by Smarter for their iKettle 2.0. As the iKettle also doesn’t come with an IFTTT channel but SmartThings does, and as IFTTT have a Maker Channel that allows you to sent HTTP GET and POST calls to an arbitrary web address, I took this approach to get the iKettle working with SmartThings and thereby, my Amazon Echo:

  1. Set up a webserver or MTQQ server (Node Red, for example) on the Raspberry Pi that then uses the iBrew scripts to stop and start the kettle when a URL it provides is called by an HTTP GET request
  2. Within SmartThings, define a virtual device and button that we’ll use to stop and start the iKettle within the SmartThings smartphone app
  3. Set up an IFTTT Maker Channel recipe to call our webserver or MQTT server when that SmartThings button is pressed
  4. Expose that Smarthings device and button to Alexa, the voice command service that comes with the Amazon Echo, so that you can switch it on and off using commands such as “Alexa, turn on the kettle”
  5. Get it all running, make a cup of tea at 1am, and then post the video on Twitter.

… then wake up to find it’s gone viral on the internet, the phone is ringing off the hook, and you’ve now added the amount of cups of tea you drink each day to the dataset you’re analyzing back on your Hadoop cluster, along with around 1,500 internet comments about the story you’ve been telling and a similar number on the Guardian and other websites.

All of which, though, will at least give me some interesting anecdotes and datasets to use at the UK Oracle User Group Tech’16 event in Birmingham later on in the year when I’m presenting on this topic — or more likely, how to get an iKettle working -in one of my conference sessions on big data, cloud and IoT analytics.

For now though, that’s the story behind the iKettle, and why I still think it was worth waiting eleven hours (or even more, in the end) to get a voice-activated cup of tea and that essential start to the day … even though as it was 1am, it was actually now time to go bed.