The proliferation of IoT devices means we have more data about our surroundings than ever before. However, data itself is not useful unless we can take action based on it. In this article, we will show you how you can visualize and monitor your IoT data so that you can effectively act upon them. Note that we use the term IoT data and metrics interchangeably throughout this article.
To visualize IoT metrics, we need to make our IoT devices send metrics over MQTT protocol to a time-series data storage platform, such as the popular open-source Graphite, which then exposes API endpoints that an open-source dashboarding system, such as Grafana, can retrieve metrics and display. See "Quick Explanation" for a concise summary of MQTT, Graphite and Grafana.
There are 2 ways to implement these, and which way you choose depends, in some way, upon the kind of person you are. Which one are you?
Use a hosted service/MetricFire. Setup takes 5 minutes (minimal skill set)
Set up everything yourself! Setup can take over 10 hours (depending on skillset)
Here are the brief steps required for each method:
Method 1: Use a Hosted Service (5 minutes)
Method 2: Set up Everything Yourself (> 10hours)
We will primarily focus on the simpler ‘Use a Hosted Service’ method in this article, and leave the gory details for the more complex ‘Setup Everything Yourself’ method for a future article.
Step 1. Sign up for a Hosted MQTT/Graphite/Grafana service, e.g., MetricFire
Step 2. Get the MQTT broker endpoint and channel this from the dashboard
Step 3. Configure your IoT devices to send to the MQTT broker endpoint/channel
This depends on your IoT device but, in general, you just need to point your IoT device from the MQTT client (publisher) to the MQTT broker hostname/IP address and MQTT channel from the previous step.
Step 4. On the left-hand menu, click on Grafana, and visualize your dashboard!