Build a Wireless Air Conditioner Control and Monitoring System with M5Stack

Managing multiple air conditioners becomes difficult when centralized control and real-time environmental monitoring are needed. By combining infrared control, environmental sensors, Wi-Fi, MQTT, and a web interface, it is possible to build a flexible system that can monitor and control air conditioners from anywhere on the local network or through a remote MQTT service.

 

This project uses the M5Stack AtomS3R and Unit ENV-III to create a wireless air conditioner control and monitoring system. Each AtomS3R acts as an independent control node, collecting temperature and humidity data, receiving commands over MQTT, and transmitting infrared signals to an air conditioner. A web client provides a centralized interface for monitoring room conditions and adjusting AC settings.

 

 

Project Overview

The AtomS3R features a built-in infrared transmitter that can control compatible air conditioners, including common functions such as:

·        Power on and off

·        Target temperature adjustment

·        Fan speed selection

Connected to the AtomS3R through the Grove I2C interface, the Unit ENV-III measures the temperature and humidity near the air conditioner outlet. These readings allow users to observe local environmental conditions and see how they change after an AC command is sent.

 

Each AtomS3R collects the current AC settings, including power state, target temperature, and fan speed, together with the latest environmental measurements. It then publishes this information over Wi-Fi to an MQTT server.

 

A web interface subscribes to the relevant MQTT topics and displays the latest status of every AC node. Users can also change the power state, target temperature, and fan speed from the browser. The web application publishes these commands to the corresponding MQTT topics, and the appropriate AtomS3R receives the message and transmits the matching infrared command to the air conditioner.

 

By assigning a unique identifier and MQTT topic namespace to each node, the same architecture can be expanded to control multiple air conditioners from a single web interface.

 

Hardware

 

Unit ENV-III

The Unit ENV-III is a compact environmental sensor that integrates the SHT30 and QMP6988 sensors. It can measure temperature, relative humidity, and atmospheric pressure, and communicates with the controller over I2C through a Grove connector.

In this project, the Unit ENV-III provides real-time temperature and humidity measurements near the AC outlet.

 

 

AtomS3R

The AtomS3R is a compact controller based on the ESP32-S3. It includes Wi-Fi and Bluetooth connectivity, a built-in antenna, an infrared transmitter, a color display, and a programmable button located beneath the screen.

Its integrated IR transmitter makes it well suited for controlling devices such as air conditioners and televisions without requiring an additional infrared module. The AtomS3R can be powered from a standard 5 V USB power supply.

In this project, each AtomS3R serves as an AC control node. It reads environmental data from a Unit ENV-III, communicates with the MQTT server over Wi-Fi, and sends infrared commands to the air conditioner.

 

System Architecture

The system consists of multiple sensing and control nodes, one MQTT server, and one web client.

 

 

Unit ENV-III Sensors

Multiple Unit ENV-III sensors can be deployed, typically with one sensor connected to each AtomS3R node.

Their main functions are:

·        Measure the temperature near the AC outlet

·        Measure relative humidity

·        Provide environmental data to the connected AtomS3R over I2C

 

AtomS3R Control Nodes

Multiple AtomS3R devices can be deployed to control air conditioners in different rooms or zones.

Each node performs the following tasks:

·        Reads temperature and humidity data from its connected Unit ENV-III

·        Connects to the MQTT server over Wi-Fi

·        Publishes environmental data and current AC status

·        Subscribes to AC control topics

·        Receives power, temperature, and fan speed commands

·        Converts received commands into the corresponding infrared signals

·        Transmits IR signals to the target air conditioner

 

MQTT Server

A single MQTT server acts as the communication layer between the AtomS3R nodes and the web client.

Its responsibilities include:

·        Receiving telemetry and AC status messages from AtomS3R nodes

·        Forwarding control commands from the web client

·        Keeping device communication independent from the web interface

·        Supporting multiple AC nodes through separate MQTT topic namespaces

 

Web Client

The web client provides a centralized control and monitoring interface.

Users can:

·        Turn an air conditioner on or off

·        Set the target temperature

·        Select the fan speed

·        View the latest measured temperature

·        View the latest measured humidity

·        Check the current status of each AC node

 

System Diagram


 

Conclusion

 

This project demonstrates how the AtomS3R can serve as a compact wireless control node for existing infrared air conditioners. With its integrated IR transmitter, Wi-Fi connectivity, display, and ESP32-S3 processor, only a Unit ENV-III sensor and a USB power supply are required to create each monitoring and control node.

 

MQTT provides a lightweight and scalable communication layer, while the web client offers a convenient way to manage multiple air conditioners from one interface. Additional AtomS3R nodes can be added for new rooms or zones without changing the overall system architecture.

 

Beyond manual remote control, this platform can also be extended with scheduled operation, temperature-based automation, historical data visualization, alerts, and integration with broader building management or smart home systems.