ESP MUSE LUXE Bluetooth speaker

This is the tutorial for the ESP MUSE LUXE to load the Basic bluetooth speaker sketch. This is the default Sketch that is loaded on the speaker when you received it.

Features of this Squetch:

  • Bluetooth AD2P audio connectivity
  • MP3 read on the SD card
  • Amplification of what is sent to the AUX IN jack cable
  • Battery neopixel charge indicator
  • Mute button, volume UP, Down

NOTE THAT THE USB CABLE THAT COME WITH THE SPEAKER IS A CHARGING CABLE ONLY to upload data you will need a micro usb data cable

You can just load the pre-compiled firmware OR recompile everything

OPTION 1 : Load precompiled firmware
Download the pre-compiled firmware

Now it’s time to download the pre-compiled firmware :

It must be loaded using the ESP32 flash downloading tool :

Unzip it and execute

Choose Developer Mode / ESP32 :

Select the path of the previously downloaded .bin file and set the loading address to “0x0” :

Connect the RASPIAUDIO MUSE PROTO via USB at the bottom select the right com port used by the connected board:

This com port number could change so if you are not sure of the com port go in windows 10 go to Device Manager and in the port section look for the number used by Silicon Lab…

Check that the switchon the back is ON

Click on START, it should now take 3mn to load:

reboot and you will see the “muse” wifi acces point to connect to. See below for more details.

OPTION 2 : Compile the code

Here is the general input /output of the device (TODO presentation to be improved):

The goal of this tutorial is to guide you for the compilation of the arduino code and show you how to customize a few things.

Step 1:
Download the zip here:

You will need to install the Arduino IDE

2. Copy then library
In the unziped archive copy the directory muse_lib in your arduino library folder, on windows this is in Documents\Arduino\libraries , if you are on linux /Arduino/libraries

3. Install the ESP32 board in the Arduino IDE (skip this step if you already installed it)

A. In your Arduino IDE, go to File > Preferences

Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux open preferences

B. Enter into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button:

Note: if you already have the ESP8266 boards URL, you can separate the URLs with a comma as follows:,

C. Open the Boards Manager. Go to Tools > Board > Boards Manager…

D. Search for ESP32 and press install button for the “ ESP32 by Espressif Systems “:
Note that for now the code ONLY COMPILES WITH VERSION 1.0.5 so select the right version. we will update that soon.

E. That’s it. It should be installed after a few seconds.

Complete instructions are here :

4. Target option in Arduino IDE Tools

  • Select the following options in the arduino IDE:


  • Plug the Muse proto board and set the right com port in the menu showed above.

NOTE THAT THE USB CABLE THAT COME WITH THE SPEAKER IS A CHARGING CABLE ONLY to upload data you will need a micro usb data cable

** Buttons **

Tho have the full experience you can add 3 buttons:

GPIO 12 // Pause/Play
GPIO 32 // Vol-
GPIO 19 // Vol+

** Change the sounds playing “Bluetooth” “Player”…
wav files are located in the /data directory of the sketch

Your will notice the 500Hz… file this is used to test the speaker in the factory it is explained (but not usefull unless you want ot launch the self test pressing the 3 buttons simulatniously at startup)

you can record your own files, I use Goldwave to de the editing/recording
Then upload it:

Here you can change the bluetooth device name :image

2 posts were merged into an existing topic: MUSE LUXE speaker with Squeezlight (Logitech Media server) [under construction]

Hi, there. Hope you have a great new year everybody!!
I’ve received my ESPMuse Luxe, it’s a great looking device. Very good job.
Just one question, I’ve made an sketch perfectly working on Muse proto v1.3, but not in the Luxe device.
Is there any different pinout for the SD card reader, the speaker?
#define SD_CS 13
#define SPI_MOSI 15
#define SPI_MISO 2
#define SPI_SCK 14

#define I2S_DOUT 26
#define I2S_BCLK 5
#define I2S_LRC 25

#define PW GPIO_NUM_21

#define GAIN GPIO_NUM_23

Thanks a lot!

Sorry, this is my complete sketch:
I have to get the sd out of the sd reader

#include “Arduino.h”
#include “WiFi.h”
#include “Audio.h”

#include “SD.h”
#include “FS.h”

// Sd detect
#define SDD GPIO_NUM_34

#define SD_CS 13
#define SPI_MOSI 15
#define SPI_MISO 2
#define SPI_SCK 14

#define I2S_DOUT 26
#define I2S_BCLK 5
#define I2S_LRC 25

//Amp power enable
#define PW GPIO_NUM_21

#define GAIN GPIO_NUM_23

Audio audio;
static File root;
static File file;

void setup() {
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
if (!SD.begin(SD_CS))
Serial.println(“Error talking to SD card!”);
while (true); // end program
Serial.println (“OK SD”);

audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);

gpio_set_direction(PW, GPIO_MODE_OUTPUT);
gpio_set_level(PW, 1); //level

gpio_set_direction(GAIN, GPIO_MODE_OUTPUT);
gpio_set_pull_mode(GAIN, GPIO_PULLDOWN_ONLY); //ganancia 15dB

audio.setVolume(10); // 0…21
Serial.println(“Volume set”);

root ="/");

audio.connecttoSD(“silencio.wav”); // Play the file
Serial.println(“File played”);


void loop()

It’s simple, justs starts everything and plays a silence.wav file in the beginning
It works fine on my Proto board, but not on my Muse luxe :wink:

Hi Samuel,

So the Luxe is using an audio codec chipset to manage many things like volume control or input output selection, and commands are sent to the codec in I2C. So unlike the PROTO the LUXE needs to send commands to the codec to start playing.

I advise that you start with the Arduino example for the luxe that could be found here:

All pin definition should be found here too :gift_heart:
so for the SD card :
#define SPI_MOSI 15
#define SPI_MISO 2
#define SPI_SCK 14

We will document the LUXE better in the next days, your are one of the 20 first owner of this product.


I was wondering if someone could help me out here. I have received my ESP MUSE LUXE and was testing it out in “white-belt mode” before making any changes.

It seems that it constantly says “bep” to me everytime I change the volume and the buttons don’t work as the manual describes. The music is also very scratchy when the volume changes. I think because of changing between music and “bep”.

Also initial testing of SD card player has failed. I have a single file on a card. It plays about 1/2 a second of audio and then switches back to bluetooth (with an obnoxious “bluetooth” announcement.)

I hope that as I look to develop my own code for this I will be able to turn off all this unnecessary talking and also flashing of lights. Does anyone know if this is possible?

So far out of the box I can’t say I am impressed, but perhaps my expectations were too high.

Hello MattyR

It is true that you could probably find better a JBL sound Bluetooth speaker for the same price! But the idea behind this product is that it is hackable. It’s not just made with a obscure software that you consume and cannot be changed. But instead it would like to carry the values of the Do it yourself and open source code.
For example taking the code of the simple Bluetooth speaker app you are mentioning, you could record your own beep or just remove them.
There are also some very interesting apps using Squeezelite, an open source project that brings a lot of connectivity option. And many more project.

All that JBL can’t do it :grin:

1 Like

Is there any update on when these are going to be available in the UK again? Website still says Jan '22.

Thanks in advance,


The last parcel we sent to UK was returned by customs for no reason, we sent a new one and it seem that it reached Amazon UK so it should be in stock very soon. thx

1 Like

In stock now :slight_smile: received mine yesterday, delighted with the device (and easy integration into Home Assistant!). Thanks.

1 Like

@Raspiaudio could you please share the schematics for the entire board on the Muse Luxe? It’s not very well documented for a speaker claiming to be hackable.

If you can’t share it all, in particular I am interested in how you are getting battery voltages, ranges and ADC reads in the ESP32. The “default” ESPHome config using filters (multiply: 0.00173913 # 2300 -> 4, for attenuation 11db, based on Olivier's code) doesn’t seem to be useful or recommended any more. As such, I’m trying to figure out what exactly gets read, from where and with what values.


The battery monitor is basic, it is just a divider that goes on ADC gpio33 and divide the battery voltage by 2. This method requires to take several samples and average them as reading fluctuates.

Hope it helps

1 Like

Another few questions, @Raspiaudio:

  • how can I tell when the speaker is plugged in for charging?
  • how can I tell when the battery has finished charging?
  • how can I tell how charged the battery is during charging?

Hi, I’m trying to do something similar at the moment:

If you managed to get your script to work, could you share it?