IOT - Smart Switch
Year
Stack
Project
๐ In an era where everything is getting smarter, why should your home switches stay dumb? Enter my ESP32-powered Smart Switch, capable of voice control via Alexa & Google Assistant, cloud API integration, and manual switching. Whether itโs an app, automation, or the good olโ wall switch, this setup ensures full control with zero compromises.
๐จโ๐ป Software: ESP32 runs a custom firmware that listens for commands from voice assistants, cloud APIs, and local switches.
๐ Hardware: Relays handle power switching while optocouplers ensure safe isolation.
โ๏ธ Cloud Control: Using APIs, this switch can be controlled remotely via mobile apps or automated smart home rules.
๐ฃ๏ธ Voice Assistants: A simple command like "Alexa, turn on the lights" triggers the relays, making automation effortless.
Flash ESPHome or custom firmware using Arduino IDE and install necessary libraries for Wi-Fi & MQTT.
#include
#include
Configure the relays as output pins:
#define RELAY_1 23
#define RELAY_2 22
// Define all relay pins accordingly
โ Set up MQTT for cloud communication.
โ Register the switch with Google Assistant & Alexa using Smart Home APIs.
โ Configure Alexa Skills & Google Assistant Actions to recognize voice commands.
Each switch connects to ESP32โs GPIO pins. When flipped, the ESP32 reads input and toggles the respective relay.
void loop() {
if (digitalRead(SWITCH_1) == LOW) {
digitalWrite(RELAY_1, HIGH);
}
}
Reach out and let's make it happen โจ. I'm also available for full-time or Part-time opportunities to push the boundaries of design and deliver exceptional work.