A simple PCB with two audio drivers, a SD card reader and a ESP32 microcontroller to play sounds via MQTT.
- On factory settings or no known WiFi SSID is found, device starts in AP mode
- To stay in AP mode, leave the SSID and password empty
- The LED show the status of the device
Orange
: BootingBlue
: Connecting to WiFiGreen
: Connected to existing WiFiViolet
: Started WiFi APRed
: No connection to WiFiWhite
: Web or MQTT activity
- The device can be controlled via MQTT:
- Subscripte to
<prefix>/status
to get the status of the device - Publish to
<prefix>/cmd
to play a sound{"play": "filename.mp3", "volume": 50, "balance": 0}
(volume and balance are optional){"tts": "Hello World", "lang": "de"}
- Subscripte to
- Default WiFi SSID:
SoundBoard
- Default WiFi Password:
12345678x!
- The case could be found on Printables.
- The PCB was designed with KiCad and could be found in the
pcb
directory.
- Start the frontend development server with
python .\webserver.py
in thehtml
directory. - Open the browser at
http://localhost:8000/
to see the frontend. - Set manual a cookie with
overwrite-host
to the hostname or ip of the device and reload the page.
- Add a priority flag to the MQTT messages. Stop the current playback only if the priority is higher than the current one.
- Sync volume and balance fader across all clients
- Enable/Disable Playback/Stop buttons based on the current state
- Add addidtional MQTT topics with hostname for status und command
- Refactor Code in more separat files
- Maybe: Option to queue playbacks
- Send file list in multiple messages
- If we had valid settings, but in fallback AP mode, try to connect to the last known wifi periodically
- Download audiofiles from the webinterface
- Replace play/delete/download with icons?
- Add tailing slash to the topic prefix
- Save authentication in cookie/webstore
- Add credentials to post requests
- Improve MQTT reconnection and resubscription
- Improve MQTT reconnection after boot when no connection is available
- Make MQTT status topic more "chatty"
- ESP32 Based Internet Radio using MAX98357A I2S Amplifier Board
- I2S Sound Tutorial for ESP32 - DIYI0T
- schreibfaul1/ESP32-audioI2S: Play mp3 files from SD via I2S
- ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials
- ESP32 partition calculator: Easily Calculate ESP32 Memory and Partition Sizes