•  In the past, building a home assistant required a lot of effort and could be technically challenging. However, with IBM Watson and other complementary cloud services, you now have the power to create and innovate right at your fingers. 
  •  This tutorial explains how to combine the power of Watson with the simplicity of the IBM IoT platform to create a home assistant to control some basic electronic devices (a light and camera). 
  • The framework can be extended to control actual home appliances that are enabled with the connectivity.  
  • You can use this tutorial as a guide to building your own application. 
  • Developed in iOS Swift, the Home Assistant mobile app communicates with IBM Watson Conversation by using both key inputs and voice commands; 
  • The user interfaces let you send messages or speak (use the Watson Text to Speech and Speech to Text services) to make this conversation possible.  
  • Watson Conversation is trained to derive an intent based on voice commands or input messages
  • Based on the intents, the Home Assistant application sends commands to the devices through the IoT Platform service and a Home Gateway (a Raspberry Pi).  
  • The Home Gateway controls the devices and sends device events to the Home Assistant app through the IoT Platform service. 
  • The system also uses Object Storage Service to store pictures that are uploaded by the Home Gateway. 
The basic flow of the application is: 
  • (1) The user speaks or types in a command from the Home Assistant user interface. 
  • (2, 3) The voice command is transcribed into text by using the Watson Speech to Text service. This step is skipped if the user types in the command
  • (4,5) The transcribed text is forwarded to Watson Conversation so that it can derive an intent from the user's speech. 
  • (6) On receiving the intent, the Home Assistant constructs a command JSON message and sends it to the IoT Platform.
  • (7) A Node-RED application is running on Home Gateway, which subscribes to the command topic and receives the command message. 
  • (8a, 8b) The Home Gateway performs the action, either turning the light on or off or taking a picture.
  • (8c) The captured picture is uploaded to Object Storage. 
  • (9) Upon completion of the task, the Node-RED application sends a device event (containing the status) as a JSON message to the IoT Platform.