Control LED Via Phone App ā Arduino ESP32 Home Automation Using Matter Protocol
In this easy Visuino tutorial, youāll learn how to use the Matter protocol to control an LED on your Arduino Nano ESP32 directly from your smartphone ā creating a simple and powerful smart home automation setup.
With Visuinoās visual programming, you can quickly connect your Arduino Nano ESP32 to a Matter network and control your LED with just a tap on your phone.
This tutorial will show you how to:
Connect an Arduino Nano ESP32 to a Matter network for smart home automationControl an LED from your smartphone using the RainMaker appUse Visuino to set up IoT devices easily without codingUnderstand pairing codes, on/off control, and status feedbackBuild real, practical smart home projects in minutesš” Works with Google and other Matter-supported smart home systems!
Download the Visuino project file at the bottom and
š„ Watch the full video to see it in action!
Ā
Step 1: What You Will Need
Ā
Ā
Arduino Nano ESP32 (or any other ESP32 board)ESP RainMaker App DownloadVisuino program: Download VisuinoĀ
Ā
Step 2: Start Visuino, and Select the Arduino Nano ESP32 Board Type
Ā
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino Nano ESP32" as shown on Picture 2
Ā
Step 3: In Visuino Set WiFi
Ā
Ā
Ā
Select Arduino Nano ESP32 board and in the properties window expand "Modules>WiFi>Connect To Access PointsClick on the Connect To Access Points 3 DotsIn the AccessPoints window drag "WiFi Access Point" to the left sideIn the properties window set SSID (name of your WiFi hotspot or router)In the properties window set Password (password of your WiFi hotspot or router)Close AccessPoints windowĀ
Step 4: In Visuino Set Matter
Ā
Ā
Now lets set the Matter
Select Arduino Nano ESP32 board and in the properties window expand
"Modules>Matter Click on the "End Points" 3 Dots button In the "End Points" window drag "On/Off Plugin" to the left side Close the "End Points" window
Ā
Step 5: In Visuino Add & Connect Components
Ā

Ā

Ā
Step 6: Generate, Compile, and Upload the Project
Ā
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.Ā
Step 7: Getting the Code
Ā
After Uploading the project to the board, switch to the serial tab select the correct port and click Connect button you should see the Matter pairing code displayed.
Ā
Ā
Step 8: ESP RainMaker App
Ā


Ā
Ā
Ā
Ā
Ā
Ā
Ā
Install the App and Add Your Device
Ā
On your smartphone, go to the Google Play Store or Apple App Store and search for āESP RainMaker.ā
Download and install the app, then open it and create an account (or log in if you already have one).
With your Arduino Nano ESP32 flashed with the Visuino Matter project and connected via the serial monitor, youāll see a pairing code displayed.
Ā
Make sure your phone is connected to the same Wi-Fi network as your Arduino board.
Open the RainMaker app, go to the home screen, and tap āAdd Deviceā (or the + icon) to start adding your device.
Select āI donāt have a QR code.ā
Then choose Provisioning Transport ā Matter.
Select your group, and then choose āSet up without QR code.ā
Enter the Matter pairing code from the serial window,
tap āIām ready,ā and wait for the app to connect to the Arduino board.
When itās successfully connected, youāll see your new device appear in the app ā
ready to control the LED!
š” Tip: Make sure your phone is on the same Wi-Fi network as the ESP32. If the app canāt find your device, try reconnecting Wi-Fi or restarting the RainMaker app.
You can also in Visuino set "Erase All Flash Before Sketch Upload" to Enabled when you upload the project.
Ā
More about ESP RainMaker App
Ā
Step 9: Play
Ā
After uploading the project to the Arduino Nano ESP32 board and setting the ESP RainMaker App you should be able to control the LED on the Arduino Nano ESP32 board from the App.
Congratulations! You have completed your LED project with Visuino.
Also attached is the Visuino project, that I created for this Tutorial. You can download and open it in Visuino: https://www.visuino.com

































