Use Alexa to Control Old Speakers with ESP32

Transform your old speakers into smart ones using Alexa and ESP32 with this step-by-step guide.

Posted by Nina Alvarez on May 13, 2025 · 6 mins read

Use Alexa to Control Old Speakers with ESP32

Are you sitting on a pile of old speakers that still have great sound but lack smart capabilities? If you’re like me, you might have a love-hate relationship with obsolete technology. Thankfully, with a pinch of creativity and a sprinkle of DIY spirit, you can bring those speakers back to life with smart functionality. Imagine shouting commands to Alexa from your couch, and your vintage speakers springing to action! In this blog post, I’ll guide you step-by-step on how to use Alexa to control old speakers with an ESP32. Let’s dive in!

Step-by-Step Setup Guide

What You’ll Need

Before we jump into the setup, here’s a quick checklist of what you’ll need:

  • Old Speakers (with a 3.5mm input)
  • ESP32 Development Board
  • Node-RED installed on your home server or Raspberry Pi
  • Amazon Alexa Device
  • Wires and Connectors
  • Power Supply (for ESP32)
  • A laptop or a computer
  • Wi-Fi Network

Step 1: Set Up Your ESP32

  1. Connect the ESP32 to Your Computer: Use a USB cable to connect your ESP32 board to your computer.

  2. Install Arduino IDE: If you don’t have it installed yet, download and install the Arduino IDE from Arduino’s official website.

  3. Add ESP32 Board: Go to File > Preferences in the Arduino IDE, and add the following URL in the “Additional Board Manager URLs”:

    https://dl.espressif.com/dl/package_esp32_index.json

  4. Install ESP32: Go to Tools > Board > Board Manager, search for “ESP32”, and install it.

  5. Write the Sketch: Copy the sketch below into the Arduino IDE. This will set up your ESP32 to receive commands via Wi-Fi.

    #include const char* ssid = "Your_SSID"; const char* password = "Your_PASSWORD";

void setup() { Serial.begin(115200); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.println(“Connecting to WiFi…”); } Serial.println(“Connected to WiFi”); }

void loop() { // Add code to control speakers via IoT commands }</code>

  1. Upload the Code: Select the correct board and port under the Tools menu, then upload the code to your ESP32.

Step 2: Configure Node-RED

  1. Install Node-RED: If you haven’t set up Node-RED yet, install it by following instructions on Node-RED’s website.

  2. Create a New Flow: Open your Node-RED dashboard and create a new flow.

  3. Add Alexa Node: Drag and drop the alexa node from the Node-RED palette. This will handle the interactions with your Amazon Alexa.

  4. Create a Custom Skill: You’ll need to set up an Alexa skill to control your ESP32. Follow the instructions on node red alexa local to create a skill that can communicate with your Node-RED instance.

  5. Connect Nodes: Connect your Alexa node to a function node that will send commands to the ESP32.

  6. Add HTTP Request Node: This node will send HTTP requests to your ESP32 over Wi-Fi.

    The flow should look something like this:

    • Alexa Node -> Function Node -> HTTP Request Node.
  7. Deploy the Flow: Once everything is connected, deploy the flow in Node-RED.

Step 3: Connect Your Speakers

  1. Wire Up Your Speakers: Connect the audio output of the ESP32 to your old speakers using a 3.5mm audio jack.

  2. Test Your Setup: Power on your ESP32. You can now test if it communicates successfully with Node-RED.

Helpful Tip Block

Quick Tips for Your Smart Home Project:

  • Ensure your ESP32 and Alexa device are connected to the same Wi-Fi network for seamless integration.
  • Use Node-RED’s node-red flow examples for additional inspiration and different configurations that might work better for your setup.
  • Keep debugging simple; use Serial.println statements within your Arduino code to help trace any issues.

Common Issues & Troubleshooting

  1. ESP32 Not Connecting to Wi-Fi: Double-check your SSID and password in the code. Make sure your ESP32 is within a good range of your router.

  2. Alexa Not Recognizing Commands: Ensure that you’ve configured the Alexa skill correctly. Revisit the settings you made in Node-RED, ensuring everything is connected appropriately.

  3. Audio Output Issues: Make sure your speakers are powered on and connections are secure. Test the speakers separately to ensure they are working.

  4. Node-RED Flow Not Working: Use the debug node in Node-RED to monitor incoming and outgoing messages. It can be incredibly beneficial for spotting issues within your flow.

Final Thoughts

Transforming your old speakers into smart ones using Alexa and ESP32 is not only a satisfying project but also a great way to give new life to technology that may have otherwise been discarded. With a few simple steps—setting up your hardware, configuring Node-RED, and tying everything together with Alexa—you can enjoy your favorite music and podcasts with the convenience of voice control.

Don’t be afraid to experiment more with your setup: integrate lights, use sensors, or even expand your system with more advanced features. The world of home automation is full of potential, and with tools like Node-RED and devices like the ESP32, you have the power to control it all.

Happy tinkering! 🎶