My healthy habit pet IOT device is publishing data and QTT to indicate when I can perform my exercise. Device is registered with the device manager through the IT platform and is sending through state every time I hold the button down. So it sends through a responded flag to indicate that I performed the exercise. But I've also modified the device so that it times how long I hold down button and I'm using that to indicate my energy levels at the time. So if I hit the button very quickly I'm using that to indicate that I'm quite tired whereas if I hold the button down for longer I'm using that to indicate that I'm still full of energy. All of this data is being consistent to the Cloudant NoSQL database using the historical data storage extension. I have the data storage extension configured to assist the MQTT events to the healthy habit tracker Cloudant NoSQL database and it's bucketing the data per month. So this means that it creates a new database every month to store the events from that month. So if we take a look at the Cloudant database through the Cloudant dashboard and see the events from this month. And this is an example of one of the events. So it stores the device ID, the device type, the event type, which is habit, the timestamp and then the payload that sent through from my healthy habit pet device. So boolean to indicate that I formed the exercise and this new reading which indicates my energy level. So I'm going to set up a visualization of this data through my IOT platform dashboard. And I'll do that in context of the device centric analytics board. So right now I only have one card showing up in this board which lists my IOT devices that I have registered. It includes the healthy habit pet as well as a couple of other instances of my pet device. So I can add new cards to display the current status or the historical data. So for example, if I select a card or device properties and select my healthy habit pet device, click next, I can see the most recent readings that have come in from my healthy habit pet, which were just a few minutes ago when I configured it. But that's not particularly useful if I want to be able to track my progress over time. So what I'll do is I'll set up a visualization using a line chart against my healthy habit pet. So using the data from that device. And what I'll need to do is to connect a new data set. So the event type that I'm interested in is the habit event and the property that I want to display is the energy reading. And I'll set that up so that it treats it as a number. Now because this number is being measured in milliseconds and I'm sending through the world value this could be quite high. So I'll just give it a quite a high maximum value. And finally I'll configure the appearance to make it quite large so that I can see my energy slump. Change the color. And give it a title. So there I can see my energy readings over the last five minutes. Not gonna change that. It should pick up the other readings from the database. So now it's going to show me the values over time. So I've just been testing it out just so I can have some data points. Normally I exercise a couple of times a day but this allows me to go back 24 hours and see a history of those readings. One other thing that's useful to do if you're going to be setting up a lot of visualizations or if you want to use rules is to create a schema for your device type. So to do that you'll need to go to your devices section of the dashboard and go to manage schemas. So I haven't got a schema set up for my device type so I'll need to create one. And I'll select my device type which is the esp8266. And then I'll need to configure that to have the properties that I want to use from within my cards or within my rules. So add a property. And the properties that are coming through in the device data are all nested underneath the D object so I'm going to need to setup that as a parent to begin with. So I'll just set it up as the D property. That's data and then I'll need to add a child property, which is my energy level. It's the energy property underneath D. So but D and I've got energy and then I can save that and that schema is now available for me to use from within my boards. If I go back to my dashboard I can add a new card. Select my healthy habit pet device. And now instead of having to go in and select the event type and then select the property it should already automatically be populated. The next you can see is my most recent reading. So I can then go ahead and select different sorts of visualizations based on that reading. So that's how you can set up visualizations of the device data that's coming in by MQTT using the built in visualization cards in the IOT device dashboard.