Building a Real-Time Temperature Monitoring System in Under 10 Minutes with Alibaba Cloud AIoT

Detailed Explanation of AIoT Technology

Issue 3

The development speed of the Internet of Things is accelerating. How to shorten the development process of IoT applications and reduce development costs is one of the main concerns of IoT companies. Alibaba Cloud AIoT, as a leader and innovator in the IoT industry, aims to help IoT companies complete the last mile of device cloud integration. After continuous accumulation, it has launched the IoT application development tool – IoT Studio.

IoT Studio is a productivity tool provided by Alibaba Cloud AIoT for IoT scenarios. It is part of the Alibaba Cloud AIoT IoT platform, covering core application scenarios in various IoT industries, helping developers efficiently and economically complete IoT data analysis, device, service, and application development, accelerating the construction of IoT SaaS.

Relying on IoT Studio, how to build an IoT development application in under 10 minutes. Alibaba Cloud AIoT provides a practical case of building a real-time dynamic environment temperature and humidity monitoring system for a server room using Raspberry Pi (Raspberry Pi 4), DHT11 temperature and humidity sensor, and the IoT application development (IoT Studio) platform to answer your questions.

Building a Real-Time Temperature Monitoring System in Under 10 Minutes with Alibaba Cloud AIoT

Design Concept

By using the Alibaba Cloud IoT platform, create and connect the corresponding products and devices to achieve real-time data reporting to the Alibaba Cloud IoT platform. At the same time, utilize the IoT Studio web visualization development feature to build a visual management interface to view real-time information of the server room and retrieve historical curve information at any time.

Building a Real-Time Temperature Monitoring System in Under 10 Minutes with Alibaba Cloud AIoT

Finally, relying on the IoT Studio business logic service development feature, develop an alarm notification service for overheating and low temperature, achieving 24-hour automatic detection and alarm. For example, if the air conditioning in the server room fails or the temperature rises, a warning can be issued in time.

Building a Real-Time Temperature Monitoring System in Under 10 Minutes with Alibaba Cloud AIoT

Step-by-Step Details

Quick Experience of IoT Studio’s Web Visualization Development
After the device is connected to the cloud, all data display and debugging are based on the interaction of communication protocols, achieving the cloud visualization of the Raspberry Pi (Raspberry Pi 4) connection to the IoT platform and its system parameter data, directly viewing the running information of the Raspberry Pi board on the platform and controlling the indicator light. The steps are as follows:
1. Create Products and Devices:
Through the Alibaba Cloud AIoT IoT platform, create products and devices. A product is a collection of devices with the same functional definition. A product refers to the same model, while a device is a specific device under that model. The first step in using IoT is to create products in the IoT platform console and register the identity of the device to obtain login credentials for the IoT platform, allowing the real physical device to correspond to the virtual device in the cloud.
2. Define the Product Model:

Defining the product model means defining the product’s functionality, connecting the Raspberry Pi 4 to the Alibaba Cloud IoT platform so that it can detect the status of the Raspberry Pi 4 computer and remotely control the Power LED (power indicator light). Once the functional definition is completed, the system will automatically generate the product’s model.

3. Connect the Raspberry Pi to the IoT Platform:

After installing the Raspberry Pi system, connect the Raspberry Pi device to the IoT platform to achieve attribute data reporting. The device will communicate normally with the Alibaba Cloud IoT platform, reporting its data every 10 seconds and automatically responding to cloud control commands.

4. Create an IoT Studio Project:

A project is a collection of multiple applications, services, and IoT platform resources (products, devices, data assets, data tasks, etc.) in IoT application development (IoT Studio). Different applications or services within the same project share resources. Applications, services, and resources between different projects are isolated and do not affect each other.

5. Develop a Visualization Application to Monitor Raspberry Pi Status:

The web visualization development tool in IoT application development (IoT Studio) allows you to develop a web-based control interface without writing code. By developing a web application, you can achieve the functionality of detecting the status of edge computing devices and controlling the power indicator light switch.

Monitor Temperature and Humidity in the Server Room
Connect the temperature and humidity sensor device to the Raspberry Pi motherboard to complete the data transmission function of the sensor and place the hardware in the server room environment to collect data, achieving real-time monitoring of the temperature and humidity conditions in the server room. The steps are as follows:

1. Define the Model for the Temperature and Humidity Sensor:

Connect the DHT11 sensor device to the Raspberry Pi computer device so that it can upload environmental temperature and humidity data to the Alibaba Cloud IoT platform. Before connecting the temperature and humidity sensor to the Raspberry Pi computer device, you also need to define the model for the connected DHT11 sensor so that it can automatically inherit the sensor’s model content under the Raspberry Pi computer device.

2. Upload Temperature and Humidity Data:

After defining the model, connect the sensor to the Raspberry Pi’s motherboard and install the required programs. By adding a temperature and humidity sensor to the Raspberry Pi motherboard, the Raspberry Pi 4 computer can collect environmental data in the server room.

3. Analyze Temperature and Humidity Time Series Data:

Data analysis services are an important component of IoT application development (IoT Studio). Through the data analysis component, you can easily check the statistical values of various event dimensions in the data, such as average, maximum, minimum, etc. It supports selecting different data dimensions through charts to explore the relationships between various data. To establish a data analysis service, you can select “Analysis Perspective” in the top navigation bar of the data analysis console to create a new time series perspective.

4. Develop Data Service APIs:

Through the data analysis service platform, select the data source for the data table on the SQL data analysis workstation and generate APIs to obtain daily average temperature and humidity data. The generated data development tasks for IoT data analysis use standard SQL statements for data analysis, while the API service can encapsulate the data development tasks into APIs for easy developer calls. The API service can respond directly to device-side requests or be used for server-side data integration.

5. Display Server Room Temperature and Humidity Data:

After adding the temperature and humidity sensor device and uploading its data to the cloud, to display the real-time temperature and humidity data and trends in the server room, you need to add a dashboard and real-time curve chart for temperature and humidity in the web visualization interface and bind the corresponding data objects. You can display real-time data from 5 minutes to 1 hour or historical data for a selected time.

6. Develop Temperature Alarm Service:

In the business logic workstation, develop a timed trigger service for automatic detection of the current server room temperature, achieving automatic alarm message push through DingTalk robot to help promptly grasp the operation status of server room equipment.
IoT Studio provides a series of convenient IoT development tools, including web visualization development, business logic development, and IoT data analysis, solving the problems of long development chains, complex technology stacks, high collaboration costs, and difficult solution migration in the IoT development field, bringing a more efficient and convenient application development experience to IoT companies.
Want to learn more about Alibaba Cloud AIoT?

Scan the QR code to join the DingTalk group, interact with product managers, discuss with technical developers, get first-hand product information, and enjoy limited free trials, product discounts, and other benefits.

Building a Real-Time Temperature Monitoring System in Under 10 Minutes with Alibaba Cloud AIoT

Get more detailed development processes
You can click on the end of the article to read the original text

Leave a Comment