To get set up, we'll need to create an Internet of Things Platform as well as a Cloudant database. So, we'll go to the catalog, from the Bluemix dashboard, and if you take a look at Platform, you'll find all different types of services that you can create Now you could go to Boilerplates, and you could create an Internet of Things Platform Starter, which would create a NodeRED application as well as a Cloudant database and an Internet of Things Platform ah, but because we'll be using a Java app, we'll skip doing that, and we'll just create the services individually So if we first of all go to Internet of Things, and select Internet of Things Platform You can enter a name for the service, [typing] I'm just gonna, put Healthy Habits Pet at the end so I know what this service is for, select the region, select your organization and your space, and if you already had an app running, you could connect it here, but we'll just leave it unbound for now. [scrolling] Select the plan, I'm using the free plan, and then click on Create to create that service. So now that's up and running And, I can click on Launch to go and take a look at the details for that But first of all I'll go create my Cloudant database So again, going to Platform, this is under Data and analytics, it's a Cloudant NoSQL database So, I'm just going to postfix that with Healthy Habits Pet, again select the organization and region, and, your pricing plan, and click on Create That can take a little while to provision. You can see both of those services in my dashboard. If I double-click on them, I can see the details What I want to do, is go and set up my Cloudant database to be a historian service for my Internet of Things Platform so that my IoT device data can be stored there I'm going to go to the Historical Data Storage under the Extensions from the sidebar, and click on Setup. I'll select the Cloudant database that I want. Then, you can choose how to bucket it. Because I'm not dealing with a lot of data volume, I'm just going to bucket it by month. the time zone for the timestamps and you can choose a database name which I'll just leave it at the default. And now that's configured. If you ever want to go back and edit it you can see the details there. Before we can start publishing data from the device using MQTT we need to register the device with the platform. So if we go to Devices in the menu, we'll add the device. Now if it's the first time registering this device type There won't be any device types available, so you'll need to create the device type and you can enter a name, so I'll call mine ESP8266 and you can optionally include a description You can also include metadata - serial number, manufacturer, model, class, and so on. So, if I wanted to I could add metadata for the particular board that I'm using. But I'll just leave all of those for now. The other thing that you can do is you can add additional attributes for the device using JSON. So, if I wanted to have different types of Healthy Habits Pets to track different activities, I might put that in the metadata and into the JSON file here. But for now, I'll leave that as a generic device So, that's done. Select that for my device. And here is where I'll enter the ID for the specific device. So, this might be my healthy habits pet that I keep on my desk [typing] Healthy Habit Pet Desk might be the ID that I give it And, I can also add these additional fields at the time when I'm entering this particular device So, I might [typing] put desk in there. [clicks] And now I need to set up the keys for the device to communicate with the platform. So I'm just going to auto generate my authentication token. You can also provide a token. if you want to use one that you've already generated. So just leave it blank and it will generate one for me. So, review the information, we've got the device type, the ID, and some metadata And, now, it's generated the token and need to download this [authorization token] at this time because you won't be able to get back. If you lose the token after this point, you'll have to re-register the device. So, take a copy of this information, and this is what we use to set up our MQTT client to connect to this service.