Table of Contents

Smart Remote using ESP32

Author: Cristina Iordache

Master Program: ACES

Source code on GitLab: https://gitlab.com/iordache.cristinaa98/iot-project

Description

The goal for this project is to create a smart remote controller for non-smart air conditioners. The system will be interfaced with Google Home and it will receive commands from Google and change the state of air conditioner depending on what is received. Also the mode of the air conditioner can also be changed depending on the data received by a temperature and humidity sensor.

I chose this project because I have a non-smart air conditioner and I want to control its state remotely.

Functional Specification

The project has the following functionalities:

  1. when a command is issued through any google device (like “Hey Google, turn on the air conditioning”), the system will execute the command on the AC device.
  2. the system will also intercept commands from the regular IR remote control and update the status in the Cloud.
  3. the mode of the AC device will be set automatically depending on the target temperature and the current temperature and humidity in the room.

System architecture description

The data flow can be seen in the picture below:

Hardware description

For the hardware were used the following components:

Software description

For software development, I used Arduino IDE.

Libraries used

Execution Flow

The execution flow is presented in the diagram below.

SinricPro utilization

Sinric Pro is a web platform that enables developers to integrate IoT development boards with devices like Google Home. The API can be used to retrieve device logs, find devices, and update devices. For this project, SinricPro was used in order to receive commands from Google devices and send them to the ESP32 Microcontroller.

First, an account on this platform must be made. After the account is created, log in and create an device on the platform, from Devices tab in the left page.

Here you must complete the Device Name, Description and to choose the device that is going to be controlled. There are many options, including an AC.

After completing all the tabs, the device will be created and visible in the platform and a key will be generated. A key that will be used from the program to update the data in the cloud. Also after the account was create an APP_KEY and APP_SECRET are created in order to connect to the platform from the program.

#define APP_KEY "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" 
#define APP_SECRET "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" 
#define DEVICE_ID "63bafbf161ff9a367127b578" ''

Google Home app

In order to connect a Google device with SinricPro platform, download the Google Home application. After that, select the ”+” button from the left corner and choose Set up a device.

Next choose Works with Google and there search for the platform SinricPro, in this case.

After this the connection is established.

ISSUES

Demo

Video File

Conclusions

The development of this project was interesting. Because my air conditioner is not smart, now I can control it using Google Home app and for the hot summer days this will be useful.

There are a lot of useful libraries developed that can be used in projects like these. The library that deals with the signal received and sent to the AC is up to date and has a wide coverage when it comes to air conditioner manufacturers. This project works for only one type of air conditioner but can be easily changed depending of the air conditioner type.

Resources

The resources and the tutorials that were followed for this project are: