Kitchen lights that get switched on while you’re getting out of your car … a furnace that gets turned up while you’re on your way home from work on a cold winter night ….
These are just some of the things you can do when you build an application with our new developer journey, Implement voice controls for a serverless home automation hub.Homes and interior settings are becoming more connected thanks to the Internet of Things (IoT). A recent McKinsey study estimated that the value of people’s time spent doing domestic chores is around $11 trillion per year and is expected to climb to over $23 trillion annually by 2025; these are staggering numbers. IoT-enabled smart home “orchestrators” have the potential to streamline how we manage the home and all the tasks and chores within it. With natural language interfaces, historical home usage data, and machine learning features, these orchestrators can truly change how we manage our homes and related activities.
What will I learn?
You’ll learn a lot! You’ll discover how to build a genuinely useful app that gives anybody the ability to use either their phone’s SMS (that is, text messaging) or a microphone to control their home’s smart devices.When the user issues a voice or text command, it triggers an event to an OpenWhisk listening service. OpenWhisk then triggers a call to the Watson Speech-to-Text service, which transcribes the user’s spoken words and interprets their request. IBM’s Watson Conversation Service triggers another OpenWhisk event to the MQTT protocol. The Conversation service enables the definition of intents, entities, and dialogs, providing the framework to analyze a conversation (or text) and trigger actions such as having a Raspberry Pi handle the outlet state changes.
It’s a relatively simple process. But it holds the promise of a domestic work revolution.
Messaging and machine connectivity
The key segment in this developer journey is the MQTT (Message Queue Telemetry Transport) messaging broker, part of the Watson IoT Platform. This messaging is what connects a phone or laptop to a Raspberry Pi. MQTT is a machine-to-machine connectivity protocol and is useful for connections with remote locations where a small code footprint is required, or network bandwidth is at a premium. It’s also ideal for mobile applications because of its small size, low power usage, minimized data packets, and efficient distribution of information to one or many receivers. Publishers send messages to the broker, which then distributes the messages to the subscribers who have requested to receive those messages. In that straightforward process, a new home paradigm is at our fingertips.
The potential demand for home automation is massive, and developers are the ones who will make it happen. Get started with our journey today — you’ll find code, step-by-step instructions, architecture diagrams, and more. Take the opportunity to get a headstart on creating smarter homes. And don’t limit yourself to what we’ve laid out — we challenge you to create and share another smarter device scenario!