Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home IoT & Smart Home

ESP32 Alexa Fauxmo: Local Voice Control Without Cloud

ESP32 Alexa Fauxmo: Local Voice Control Without Cloud

March 11, 2026 /Posted byJayesh Jain / 0

If you want ESP32 Alexa Fauxmo local voice control no cloud, you are in the right place. Fauxmo is an open-source library that makes your ESP32 pretend to be a WeMo smart plug, letting Amazon Echo devices control it directly over your local Wi-Fi network — no internet, no AWS, no monthly fees. This tutorial walks through everything from wiring to working voice commands.

Table of Contents

  1. What Is Fauxmo and How Does It Work?
  2. Why Local Voice Control Matters in India
  3. Hardware You Need
  4. Installing Fauxmo on ESP32
  5. Full Arduino Sketch: Controlling a Relay
  6. Device Discovery and Alexa Setup
  7. Advanced: Multiple Devices and Dimming
  8. Frequently Asked Questions

What Is Fauxmo and How Does It Work?

Fauxmo (short for “Fake WeMo”) is a firmware library originally written for ESP8266 and later ported to ESP32. It implements the UPnP (Universal Plug and Play) protocol that Amazon Echo speakers use to discover and control Belkin WeMo smart plugs. Because your ESP32 speaks exactly the same protocol, Alexa treats it as a real WeMo device — no cloud account, no API key, no Alexa Skills Kit needed.

When you say “Alexa, turn on the fan”, the Echo broadcasts a UPnP discovery packet on your local network. Your ESP32 responds with its IP address and a virtual device name. Alexa then sends a direct HTTP request to the ESP32, which toggles a GPIO pin. The entire transaction happens within your router — packets never leave your home.

This is fundamentally different from cloud-based Alexa integrations where your command travels: your voice → Echo → AWS → your IFTTT/Tuya account → back to AWS → your device. With Fauxmo, the path is: your voice → Echo → ESP32. Latency drops from 1-3 seconds to under 200 ms.

Why Local Voice Control Matters in India

Indian internet connections, while improving rapidly, still experience periodic outages — especially during monsoon season when OFC cables get damaged. Cloud-dependent smart home devices become completely non-functional during these outages. With Fauxmo on ESP32, your voice-controlled lights and appliances keep working even when Jio or Airtel is down.

Privacy is another major concern. Every cloud-based voice command is logged by Amazon and potentially by third-party skill developers. With local control, your command never leaves your network. This matters for home offices and anyone who values data privacy.

Finally, many cloud smart home platforms impose API rate limits or shut down their services entirely (remember Samsung SmartThings V1, or Wink’s sudden subscription wall). Local Fauxmo setups have no such dependency — they will keep working as long as your ESP32 is powered.

Ai Thinker NodeMCU-32S-ESP32 Development Board

Ai Thinker NodeMCU-32S-ESP32 Development Board – IPEX Version

A reliable ESP32 development board with dual-core Xtensa processor, 4 MB flash, and breadboard-friendly pinout — ideal for Fauxmo home automation projects.

View on Zbotic

Hardware You Need

The beauty of Fauxmo is that the hardware requirements are minimal. Here is what you need for a typical smart relay project:

  • ESP32 development board — any variant works (NodeMCU-32S, WROOM-32, etc.)
  • 5V relay module — single or multi-channel depending on your appliances
  • Power supply — 5V USB adapter or 18650 battery shield for portable setups
  • Connecting wires — jumper wires for breadboard prototyping
  • Amazon Echo device — any generation (Echo Dot, Echo, Echo Plus, Echo Show)

The ESP32 GPIO pins operate at 3.3V logic, and most relay modules are designed for 5V signals. You have two options: use a relay module that has an opto-coupler with active-low trigger (most blue relay boards work this way at 3.3V), or use a 3.3V relay module. Most standard blue relay modules work fine with ESP32 GPIO at 3.3V in practice.

For a cleaner installation, the 30-pin ESP32 Expansion Board provides screw terminals and organized pin access, making it much easier to wire multiple relays without a breadboard.

30Pin ESP32 Expansion Board

30Pin ESP32 Expansion Board with Type-C USB and Micro USB Dual Interface

Adds screw-terminal breakouts and dual USB interfaces to your ESP32, making multi-relay Alexa automation wiring clean and professional.

View on Zbotic

Installing Fauxmo on ESP32

The most popular Fauxmo library for ESP32 is ESP32 Fauxmo by Xose Pérez (aka @xoseperez), available on GitHub and through the Arduino Library Manager. Here is how to install it:

Method 1 — Arduino Library Manager:

  1. Open Arduino IDE
  2. Go to Sketch → Include Library → Manage Libraries
  3. Search for fauxmoesp
  4. Install “FauxmoESP” by Xose Pérez (version 3.4 or higher)

Method 2 — Manual ZIP install:

  1. Download from https://github.com/simap/fauxmoesp
  2. Sketch → Include Library → Add .ZIP Library

You also need the AsyncTCP library (ESP32 version) since FauxmoESP depends on it:

  • Library Manager → search “AsyncTCP” → install by dvarrel or me-no-dev

Board settings in Arduino IDE:

  • Board: ESP32 Dev Module
  • CPU Frequency: 240 MHz
  • Flash Size: 4 MB
  • Partition Scheme: Default 4MB with spiffs

Full Arduino Sketch: Controlling a Relay

Below is a complete, production-ready sketch that registers two virtual Alexa devices — one for a fan and one for a light — and controls the corresponding relay pins on your ESP32.

#include <Arduino.h>
#include <WiFi.h>
#include <fauxmoESP.h>

// Wi-Fi credentials
#define WIFI_SSID "YourSSID"
#define WIFI_PASS "YourPassword"

// Relay GPIO pins (active LOW for most relay modules)
#define RELAY_FAN   GPIO_NUM_26
#define RELAY_LIGHT GPIO_NUM_27

fauxmoESP fauxmo;

void setupWiFi() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASS);
  Serial.print("Connecting to Wi-Fi");
  while (WiFi.status() != WL_CONNECTED) {
    delay(200);
    Serial.print(".");
  }
  Serial.println();
  Serial.print("IP: ");
  Serial.println(WiFi.localIP());
}

void setup() {
  Serial.begin(115200);

  // Initialize relay pins (HIGH = relay OFF for active-LOW modules)
  pinMode(RELAY_FAN,   OUTPUT);
  pinMode(RELAY_LIGHT, OUTPUT);
  digitalWrite(RELAY_FAN,   HIGH);
  digitalWrite(RELAY_LIGHT, HIGH);

  setupWiFi();

  // Fauxmo setup
  fauxmo.createServer(true);  // required for Gen3 Echo devices
  fauxmo.setPort(80);          // default WeMo port
  fauxmo.enable(true);

  // Register virtual devices — these are the names you say to Alexa
  fauxmo.addDevice("ceiling fan");
  fauxmo.addDevice("bedroom light");

  fauxmo.onSetState([](unsigned char device_id, const char * device_name, bool state, unsigned char value) {
    Serial.printf("Device #%d (%s) -> %sn",
      device_id, device_name, state ? "ON" : "OFF");

    if (strcmp(device_name, "ceiling fan") == 0) {
      digitalWrite(RELAY_FAN, state ? LOW : HIGH);
    } else if (strcmp(device_name, "bedroom light") == 0) {
      digitalWrite(RELAY_LIGHT, state ? LOW : HIGH);
    }
  });
}

void loop() {
  fauxmo.handle();
  // Other non-blocking code here
}

Key points about this code:

  • createServer(true) — required for Echo 3rd generation and newer. Older tutorials use false and only work with Echo 1st/2nd gen.
  • setPort(80) — WeMo protocol requires port 80. If another service is using port 80, you must change it there.
  • Device names are case-insensitive. “Ceiling Fan”, “ceiling fan”, and “CEILING FAN” all work.
  • The value parameter in the callback carries a 0-255 brightness value when dimming — useful for PWM-controlled lights.
  • Do NOT call delay() in your loop — it blocks Fauxmo’s internal web server from responding to Alexa’s HTTP requests.

Device Discovery and Alexa Setup

After flashing your ESP32 and ensuring it connects to Wi-Fi (check Serial Monitor at 115200 baud for the IP address), follow these steps to make Alexa discover your devices:

  1. Open the Amazon Alexa app on your phone
  2. Tap the Devices tab at the bottom
  3. Tap the + icon at top right → Add Device
  4. Select Other → Link Device
  5. Alexa will scan your network for UPnP devices
  6. Your ESP32 virtual devices should appear within 30-60 seconds

Alternatively, just say “Alexa, discover devices” — this is usually faster.

Troubleshooting tips:

  • Both your Echo and ESP32 must be on the same subnet (same Wi-Fi network, not guest network)
  • If discovery fails, ensure no firewall rule is blocking UDP port 1900 (UPnP SSDP) between devices
  • Some routers with “AP Isolation” (like many Jio routers in their default config) block device-to-device communication — disable AP isolation or enable multicast
  • After changing device names in your sketch, you must delete the old device in the Alexa app before re-discovering
  • If port 80 conflicts with OTA update server or web dashboard, use the older Gen1/Gen2 mode with port 1901
2 x 18650 Lithium Battery Shield

2 x 18650 Lithium Battery Shield for ESP32

Power your Fauxmo ESP32 node from two 18650 cells, giving hours of runtime during power cuts — keeps your local voice control alive when mains power fails.

View on Zbotic

Advanced: Multiple Devices and Dimming

Fauxmo supports up to 10 virtual devices per ESP32 (the library sets this as a compile-time constant you can increase). For a typical Indian home automation setup — fans, lights, geyser, TV socket, AC socket — 10 devices is sufficient.

Dimming with PWM: The value parameter (0-255) in the onSetState callback lets you implement true dimming. For LED dimmers, map the 0-255 range to your PWM duty cycle:

fauxmo.onSetState([](unsigned char device_id, const char* device_name, bool state, unsigned char value) {
  if (strcmp(device_name, "living room light") == 0) {
    int pwmValue = state ? map(value, 0, 255, 0, 255) : 0;
    ledcWrite(0, pwmValue); // Channel 0, connected to LED
  }
});

Persistent state with NVS: By default, if your ESP32 reboots, all relays go to their setup() initial state. Use the Preferences library to save relay states to non-volatile storage so they restore after a power cut:

#include <Preferences.h>
Preferences prefs;
// In callback:
prefs.begin("relay", false);
prefs.putBool("fan", state);
prefs.end();
// In setup(), after WiFi:
prefs.begin("relay", true);
bool fanState = prefs.getBool("fan", false);
digitalWrite(RELAY_FAN, fanState ? LOW : HIGH);
prefs.end();

OTA updates: Combine Fauxmo with ArduinoOTA for remote firmware updates without opening the electrical enclosure. Just ensure OTA doesn’t block Fauxmo’s handle() call — both work with non-blocking event loops.

Adding a temperature sensor: Many Fauxmo projects also log room temperature via DHT11 or DHT20 and send it to a local MQTT broker (Home Assistant, Node-RED). The ESP32’s dual cores help here — run Fauxmo on Core 1 (default) and sensor reading on Core 0 via a FreeRTOS task.

DHT11 Temperature and Humidity Sensor

DHT11 Digital Relative Humidity and Temperature Sensor Module

Add temperature and humidity monitoring to your Fauxmo smart home node — ask Alexa to turn on the AC when the DHT11 reports above 30°C.

View on Zbotic

Frequently Asked Questions

Does Fauxmo work with Alexa routines?

Yes. Once your ESP32 Fauxmo devices are discovered by Alexa, they appear in your Alexa app like any other smart device. You can include them in routines (“Good morning” → turn on bedroom light), groups (“all lights”), and schedules. The local control path is used for direct voice commands, while routines may use a hybrid path depending on your Echo firmware version.

Can I use Fauxmo with ESP8266 instead of ESP32?

Yes, the original FauxmoESP library was written for ESP8266. However, ESP32 is strongly recommended because: it has more RAM (520 KB vs 80 KB), supports dual cores (run Fauxmo and your application code in parallel), and has more GPIO pins for controlling multiple relays. ESP8266 can run out of RAM with more than 3-4 Fauxmo devices.

Will Fauxmo work with Google Home or Apple HomeKit?

No. Fauxmo specifically emulates the Belkin WeMo protocol that Amazon Alexa uses. For Google Home, use a different approach (custom MDNS service). For Apple HomeKit, look at the “HomeSpan” library for ESP32, which implements the HAP (HomeKit Accessory Protocol) entirely locally — similar philosophy to Fauxmo but for Apple’s ecosystem.

What happens if my ESP32 gets a new IP address?

Alexa discovers devices by their UUID (a unique identifier embedded in the Fauxmo response), not by IP address. If your ESP32’s IP changes, Alexa re-discovers the new IP automatically the next time you issue a discovery command. To prevent IP changes, assign a static IP in your router’s DHCP reservation table using the ESP32’s MAC address.

Can Fauxmo control my existing Tuya or Shelly devices?

Fauxmo runs on ESP32/ESP8266 and requires your own firmware. Tuya and Shelly devices have their own firmware (some Shelly devices actually support local control natively). Fauxmo is specifically for custom ESP32 builds where you want Alexa compatibility without any cloud dependency.

Build Your Local Alexa Smart Home

Get all the ESP32 boards, sensors, and accessories you need for your Fauxmo home automation project from Zbotic — fast shipping across India.

Shop ESP32 & IoT Components

Tags: Alexa, ESP32, ESP32 IoT, Fauxmo, home automation, local voice control, smart home, WeMo
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
ESP32 Camera Streaming: MJPEG ...
blog esp32 camera streaming mjpeg video to browser tutorial 595560
blog esp32 c3 vs esp32 which budget board should you buy 595567
ESP32-C3 vs ESP32: Which Budge...

Related posts

Svg%3E
Read more

IoT Home Insurance Sensor Kit: Leak, Smoke, and Motion

April 1, 2026 0
Table of Contents IoT and Home Insurance Water Leak Detection Smoke and Fire Detection Motion and Intrusion Sensing Building the... Continue reading
Svg%3E
Read more

IoT Pet Tracker: GPS Collar with Geofencing Alerts

April 1, 2026 0
Table of Contents Introduction and Overview Hardware Components Required GPS Module Integration with ESP32 Cloud Platform Setup Real-Time Tracking Dashboard... Continue reading
Svg%3E
Read more

IoT Aquaponics Controller: Fish and Plant Automation

April 1, 2026 0
Table of Contents The Water Monitoring Challenge in India Sensor Technologies for Water Building the Sensor Node Data Transmission and... Continue reading
Svg%3E
Read more

IoT Composting Monitor: Temperature and Moisture Tracking

April 1, 2026 0
Table of Contents Why Temperature Monitoring Matters Sensor Selection Guide Hardware Assembly and Wiring Firmware Development Cloud Data Logging Alert... Continue reading
Svg%3E
Read more

IoT Beehive Monitor: Weight, Temperature, and Humidity

April 1, 2026 0
Table of Contents Why Monitor Beehives Weight Measurement System Temperature and Humidity Sensing Building the Monitor Data Analysis for Bee... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now