This guide provides a step by step tutorial to equip users to control power outlets using a Raspberry PI. The voice/text commands to trigger the outlets will be processed by IBM Watson's natural language services.
Login to IBM Cloud
Select the service Catalog icon in the upper right
Select and create the "Watson IoT Platform" service
Once the Watson IoT Platform has been successfully created, click the "Launch" button to access the Dashboard
Register your Raspberry PI with the Watson IoT Platform. This can be done by navigating to the Devices tab in the dashboard, and selecting "Add Device"
Select "Create a device type"
Enter a name for the device type. We used "homeAutomation". Continue pressing "Next" to create the device type and to Add a device. Enter a unique string of numbers and letters as the Device ID.
Next, we'll need to generate an API key to serve as credentials for the MQTT broker. Select the "Apps" option in the sidebar, and click "Generate API Key".
Take note of the API Key and Authentication Token, as they will be required to access the secure MQTT broker from IBM Cloud Functions and the Raspberry Pi. In the cloned repository on the Raspberry Pi, place the credentials in the node_mqtt.js file