Turn your smartphone into an IoT device
- Create a Bluemix app to visualize sensor data
- Now the app can receive messages from the IBM IoT server.
- The IoT Starter app is now installed on your Android device.
- You will use the IoT Starter for Android app to read and send sensor data on your smartphone.
- The device type name must be ” Android ” (this device type name is required by the app that you will use later).
Learn how to turn your smartphone into a sensor device, send sensor data to IBM Watson IoT Platform in the cloud, and create Bluemix applications that process and visualize the data. You create an Android app and two Bluemix apps that use the Internet of Things and Node-RED services.
@IBMSoftware: You – yes you – can turn your smartphone into an #IoT device. Tutorial: #Bluemix
Create Bluemix apps to process, visualize, and store sensor data that is sent to and from your smartphone
This tutorial shows how you can send sensor data that is generated by your smartphone to the IBM Watson IoT Platform cloud-hosted service, and then create Bluemix™ applications that process, visualize, and store the data. Lastly, it shows you how to create an Android application for a smartphone.
This tutorial has been updated to reflect the latest names and versions of the services. The following video demonstrates these tutorial steps, but it uses the older versions of the services that use previous names (IBM Watson IoT Platform was previously IBM Internet of Things Foundation).
Here is an overview of the architecture:
The Internet of Things Platform Starter boilerplate contains a Node-RED engine that you will use later to process IoT messages. For now, you will create an Internet of Things service to send and receive MQTT messages to and from the IBM IoT server on the cloud.
Now you are ready to send MQTT messages from a device to the IBM IoT Server.
You will use the IoT Starter for Android app to read and send sensor data on your smartphone. The source code and documentation of the app are in the IoT Starter for Android GitHub project.
If you are experienced in Android development, you can download the code from GitHub, import it into your Android development environment, and then build the apk file. Otherwise, to get the app installed and running quickly, follow these steps.
Next, you need to configure your Android app.
Now you are ready to work with the message data on Bluemix.
In this section, you will enhance your Bluemix IoT app by using a Node-RED flow to process messages from your smartphone, and then send messages back to your smartphone. The phone will react on these messages by changing the background color in the app.
Node-RED is a visual tool that makes it easy to wire and process Internet of Things messages.
In this step, you create an additional app on Bluemix, which receives the messages from your smartphone (now an IoT device) and visualizes the data.
In this tutorial you learned how to easily turn your smartphone into a sensor device, connect it to the IBM Internet of Things server, and send and receive data. You also learned how to process and visualize device data on Bluemix. With these two apps, you can recognize the value of Bluemix for the Internet of Things, and all you need is your own smartphone.