Jump to content

IPDL - 2: Study and Survey of Various IoT Platforms

From cognifront

IPDL - 2: Study and Survey of Various IoT Platforms

Objective

To study and compare different IoT cloud platforms used for connecting, monitoring, controlling, and managing IoT devices.

The following platforms are studied:

  • Blynk
  • ThingSpeak
  • Cognifront IoT Cloud

Introduction

An IoT platform provides software and cloud services that allow IoT devices to communicate with users and applications over a network.

An IoT platform can provide features such as:

  • Device connectivity
  • Sensor data collection
  • Real-time monitoring
  • Remote device control
  • Data visualization
  • Cloud storage
  • APIs for communication between hardware and cloud applications

In this experiment, Blynk, ThingSpeak, and Cognifront IoT Cloud are studied and compared based on their working, setup procedure, device communication, monitoring, and control capabilities.

1. Blynk

Blynk is an IoT software platform used to connect hardware devices to cloud services and create web or mobile interfaces for monitoring and controlling them. Blynk provides device management, dashboards, datastreams, remote control, and visualization capabilities.

Blynk uses datastreams to define the data flowing between an IoT device and the platform. A datastream can represent a sensor value, actuator state, or other device data. Widgets can then be used to display or modify these values.

Working Principle

The basic communication flow is:

IoT Device
    ↓
Wi-Fi / Internet
    ↓
Blynk Cloud
    ↓
Web / Mobile Dashboard
    ↓
User

For example, a temperature sensor can send its reading to a Blynk datastream, where it can be displayed on a dashboard. Similarly, a switch widget can send a command from the dashboard back to an IoT device.

Blynk dashboards provide widgets for both monitoring and control. For example, a Switch widget can send ON/OFF commands, while charts can display data over time.

Basic Setup

A typical Blynk setup involves:

  1. Create a Blynk account.
  1. Create a device template.
  1. Create the required datastreams.
  1. Create or configure a device.
  1. Configure the web or mobile dashboard.
  1. Add widgets such as switches, labels, and charts.
  1. Program the IoT device with the required Blynk credentials.
  1. Connect the device to the Internet.
  1. Monitor or control the device through the Blynk dashboard.

Advantages

  • Web and mobile dashboards.
  • Supports remote monitoring and control.
  • Provides ready-made widgets.
  • Supports multiple IoT devices.
  • Provides real-time device data.
  • Suitable for rapid IoT prototyping.
  • Supports historical data visualization through suitable widgets.

Limitations

  • The device must communicate with the Blynk platform according to the configured Blynk setup.
  • Dashboard and device configuration is required before using the platform.
  • Some advanced platform features depend on the Blynk plan being used.

Typical Applications

  • Smart home automation
  • Remote device control
  • Temperature and humidity monitoring
  • Smart agriculture
  • Energy monitoring
  • Industrial IoT prototypes
  • Sensor dashboards

2. ThingSpeak

ThingSpeak is an IoT analytics platform from MathWorks that allows devices to send data to the cloud for storage, visualization, and analysis. Data is organized into channels, with each channel supporting multiple fields for sensor values.

ThingSpeak is particularly useful when the main requirement is collecting sensor data and visualizing it over time. It also provides tools for analyzing incoming data and integrating it with other applications.

Working Principle

The basic communication flow is:

IoT Sensor
    ↓
Arduino / ESP32 / Raspberry Pi
    ↓
Internet
    ↓
ThingSpeak Channel
    ↓
Cloud Storage
    ↓
Charts / Analysis

For example, a DHT11 connected to an ESP32 can send temperature and humidity values to two fields in a ThingSpeak channel.

ThingSpeak automatically provides visualizations of data sent by connected devices and allows the data to be accessed through web browsers and APIs.

Basic Setup

  1. Create a ThingSpeak account.
  1. Create a new channel.
  1. Enable the required fields.
  1. Give meaningful names to the fields, such as Temperature and Humidity.
  1. Obtain the channel's API credentials.
  1. Program the IoT device to send sensor data to ThingSpeak.
  1. Connect the device to the Internet.
  1. View the data through the ThingSpeak channel.

Advantages

  • Simple cloud-based sensor data collection.
  • Automatic visualization of data.
  • Supports multiple data fields in a channel.
  • Supports REST and MQTT communication.
  • Suitable for data logging and analysis.
  • Can be used with Arduino, ESP8266, ESP32, Raspberry Pi, and other Internet-connected devices.

Limitations

  • Primarily focused on data collection, visualization, and analysis rather than being a complete device-control dashboard.
  • Channel and API configuration is required.
  • Some advanced capabilities depend on the ThingSpeak license and environment.

Typical Applications

  • Temperature monitoring
  • Humidity monitoring
  • Environmental monitoring
  • Energy monitoring
  • Industrial data logging
  • Weather stations
  • Sensor data analysis
  • IoT research and prototyping

3. Cognifront IoT Cloud

Cognifront IoT Cloud is a simple IoT cloud platform designed to provide an intuitive interface for connecting IoT hardware with cloud-based variables.

The platform allows users to create an application, define variables representing components such as LEDs, buzzers, relays, and sensors, and then connect those variables to an IoT device using an API key.

Cloud Website: [Cognifront IoT Cloud](https://www.cognifront.com/apps/iotcloud/)

Dashboard: [Cognifront IoT Cloud Dashboard](https://www.cognifront.com/apps/iotcloud/dashboard.php)

Working Principle

The basic communication flow is:

IoT Device
    ↓
Wi-Fi / Internet
    ↓
Cognifront IoT Cloud
    ↓
Cloud Variable
    ↓
Dashboard
    ↓
User

The Cognifront ESP32 library provides functions for initializing the cloud connection, binding hardware pins to cloud variables, retrieving cloud variable values, and storing values in the cloud. The library uses Wi-Fi and HTTP communication with the cloud service. For digital actuators, the ESP32 can retrieve the state of a cloud variable and apply the corresponding HIGH or LOW state to a bound GPIO pin.

Creating an Application

Creating an application on Cognifront IoT Cloud is straightforward.

  1. Open [Cognifront IoT Cloud](https://www.cognifront.com/apps/iotcloud/).
  1. Log in to the cloud platform.
  1. Open the My Apps section.
  1. Click the Create App button.
  1. Enter a name for the application.
  1. Save the application.

The newly created application appears on the dashboard.


Creating a Cloud Variable

A cloud variable represents a component or value that will be exchanged between the IoT device and the cloud.

Examples include:

  • LED
  • Buzzer
  • Relay
  • LDR
  • Temperature
  • Humidity
  • Motor status

To create a variable:

  1. Open the application from the dashboard.
  1. Click the Edit button.
  1. Click Create Variable.
  1. Enter the variable name.
  1. Select the variable type.
  1. Create the variable.

Two basic variable types are available:

Variable Type Suitable For Example
ON/OFF Switch Digital values LED, Buzzer, Relay
Continuous Value Analog or continuously changing values LDR, Temperature, Sensor Value


Connecting the Hardware

After creating the required variables:

  1. Return to the application dashboard.
  1. Copy the API Key shown for the application.
  1. Open the ESP32 program.
  1. Enter the API key in the program.
  1. Enter the exact cloud variable name in the `cogBindPin()` function.
  1. Upload the program to the ESP32.
  1. Connect the ESP32 to Wi-Fi.

The API key identifies the application when the hardware communicates with the Cognifront IoT Cloud.

The Cognifront ESP32 library provides `cogInitCloud()` for connecting the ESP32 to Wi-Fi and initializing the cloud connection.

The hardware pin is then associated with a cloud variable using `cogBindPin()`.

Important: The variable name written in the code must exactly match the variable name created in the Cognifront IoT Cloud application.

Example: ESP32 LED Control

The following example demonstrates how an ESP32 LED can be connected to a Cognifront IoT Cloud variable.

In this example:

  • ESP32 GPIO 4 controls the LED.
  • The cloud variable is used to control the LED.
  • The application API key is entered in the program.
  • The cloud variable name is specified in `cogBindPin()`.
#include "cogcloudesp.h"

int myled = 4;

String ssid = "YOUR_WIFI";
String pass = "YOUR_WIFI_PASSWORD";

String apikey = "YOUR_API_KEY_HERE";

void setup ()
{
  pinMode(myled, OUTPUT);

  Serial.begin(115200);

  cogInitCloud(ssid, pass, apikey);

  cogBindPin(myled, "YOUR_CLOUD_VARIABLE_NAME_HERE");
}

void loop ()
{
  cogAppLoop();

  delay(2000);
}

The sample program follows the same basic structure as the supplied Cognifront ESP32 example: define the hardware pin, provide Wi-Fi credentials and API key, initialize the cloud connection, bind the physical pin to the cloud variable, and repeatedly call `cogAppLoop()`.

Real-Time Operation

Once the ESP32 is connected and the variable is correctly bound, the cloud dashboard can be used to control or monitor the connected component.

For example:

User changes LED variable
          ↓
Cognifront IoT Cloud
          ↓
ESP32 retrieves variable
          ↓
Bound GPIO changes state
          ↓
LED changes state

For sensor applications, the direction can be reversed:

Sensor
   ↓
ESP32
   ↓
Cognifront IoT Cloud
   ↓
Cloud Variable
   ↓
Dashboard

The supplied library implements cloud variable retrieval through an HTTP request and also provides a function for storing a variable value in the cloud.

Advantages

  • Simple and beginner-friendly setup.
  • Application can be created directly from the cloud dashboard.
  • Variables can represent different IoT components.
  • Supports both ON/OFF and continuous values.
  • Uses an API key to connect hardware with the application.
  • Real-time device monitoring and control.
  • ESP32 library simplifies cloud communication.
  • Library and example programs are available as open-source resources.

Limitations

  • The device requires Internet connectivity to communicate with the cloud.
  • The cloud variable name must match the name used in the program.
  • The hardware must be programmed with the correct application API key.
  • The supplied ESP32 library example is primarily designed around cloud variable binding and HTTP-based communication.

Open-Source Library and Examples

Cognifront provides the IoT cloud library and sample programs for use with supported IoT hardware.

Download page: [Cognifront Downloads](https://www.cognifront.com/download.php)

The supplied ESP32 library includes functions for Wi-Fi initialization, cloud variable binding, cloud variable retrieval, and cloud variable storage.

Comparison of IoT Platforms

The three platforms provide different approaches to IoT development.

Feature Blynk ThingSpeak Cognifront IoT Cloud
Primary Focus IoT monitoring and control Data collection, visualization and analysis Simple IoT monitoring and control
Device Control Yes Available through supported mechanisms Yes
Sensor Monitoring Yes Yes Yes
Web Dashboard Yes Yes Yes
Mobile Application Yes Web/mobile browser access Web dashboard
Data Visualization Widgets and charts Charts and analysis tools Cloud variables / dashboard
Digital Variables Supported through datastreams Supported as channel fields ON/OFF Switch
Analog / Continuous Values Supported Supported Continuous Value
Hardware Communication Internet / platform libraries and APIs REST / MQTT and libraries Wi-Fi / HTTP through Cognifront library
Setup Complexity Moderate Simple Simple
Beginner Friendly Yes Yes Yes
Typical Use Remote monitoring and control Sensor logging and analytics Simple real-time IoT control and monitoring

Blynk is particularly suited to applications requiring customizable dashboards and remote device control. ThingSpeak is especially useful for collecting, visualizing, and analyzing sensor data over time.

Cognifront IoT Cloud focuses on a simple workflow in which an application is created, cloud variables are defined, and hardware pins are bound to those variables through an API key and the provided library.

Selection of IoT Platform

The platform can be selected according to the requirements of the IoT project.

  • Blynk: Suitable when a project requires configurable web/mobile dashboards, widgets, remote control, and device monitoring.
  • ThingSpeak: Suitable when the main requirement is collecting sensor data, displaying trends, and performing cloud-based analysis.
  • Cognifront IoT Cloud: Suitable when a simple and intuitive cloud interface is required for controlling digital devices or monitoring continuous sensor values.

Observation

The study shows that IoT platforms simplify communication between physical IoT devices and users.

Blynk provides a flexible dashboard-oriented approach for monitoring and controlling devices. ThingSpeak focuses strongly on cloud data collection, visualization, and analysis.

Cognifront IoT Cloud provides a simple variable-based approach. A user can create an application, create variables representing hardware components, copy the application API key, and bind the cloud variables to ESP32 GPIO pins using the provided library.

The three platforms therefore demonstrate different approaches to IoT cloud development.

Conclusion

Blynk, ThingSpeak, and Cognifront IoT Cloud were studied as IoT platforms for connecting hardware devices with cloud-based applications.

Blynk is well suited for interactive device dashboards and remote control. ThingSpeak is well suited for collecting, visualizing, and analyzing sensor data. Cognifront IoT Cloud provides a simple variable-based method for connecting ESP32 hardware to a cloud dashboard, making it suitable for beginner-friendly IoT control and monitoring applications.

The selection of an IoT platform depends on the project's requirements, including device control, sensor monitoring, data visualization, analytics, ease of setup, and the required development environment.

Result

Various IoT platforms were successfully studied and compared. Blynk, ThingSpeak, and Cognifront IoT Cloud were examined based on their working principles, setup process, device communication, monitoring, control, and application areas.

The study demonstrates how IoT cloud platforms can simplify the development of connected systems by providing communication, visualization, and remote-control facilities between IoT hardware and users.