ESP Wireless Speaker? Music Streaming

Is it possible to create an output component for audio streaming. Connect ESP to a DAC?

I want to have wireless speakers around my house and stream music to them from HA. Is this possible?

How about SPDIF signal? Can an ESP output that or does it require a codec interface?

Appriciate if anyone with more C++ knowledge is interested in looking into this :slight_smile:

1 Like

Hi,
Have a look at Squeezelite-esp32.

Squeezelite-esp32 is an audio software suite made to run on espressif’s ESP32 wifi (b/g/n) and bluetooth chipset. It offers the following capabilities

  • Stream your local music and connect to all major on-line music providers (Spotify, Deezer, Tidal, Qobuz) using Logitech Media Server - a.k.a LMS and enjoy multi-room audio synchronization. LMS can be extended by numerous plugins and can be controlled using a Web browser or dedicated applications (iPhone, Android). It can also send audio to UPnP, Sonos, ChromeCast and AirPlay speakers/devices.
  • Stream from a Bluetooth device (iPhone, Android)
  • Stream from an AirPlay controller (iPhone, iTunes …) and enjoy synchronization multiroom as well (although it’s AirPlay 1 only)
3 Likes

Very interesting project, thanks!

But that’s not really what I was thinking of. My idea is to have an output component in the ESPHome framework (like a pwm generator or others). Use that with ESP board to receive stream from Home Assistant (like a cast) and output signal to a DAC. This would be a super efficient and low cost way of having audio nodes around the house for music and notifications (alarm, doorbell). If thats possible anyways with this hardware :smiley:

Buying a full blown music machine with tons of wifi-features is just too expensive and totally an overkill for just playing a chillout mix in the bathroom etc :smiley:

Thanks for your answer.

1 Like

Hum sorry for intrusion but makes me think as a very cool and simple design for doing satellites for voice command system like Rhasspy too :smiley:

Nobody suggested a full blown music system. An esp32 is cheap and lms is open source.

Didn’t mean to offend anyone, sorry :slight_smile: Just that my point was to stream from Home Assistant, not to control a music device with it’s own music source. Example, using new HA media browser as player. Or can this suggested setup act as a speaker node? No airplay or cast is what I am looking for in my scenario :slight_smile: I am wondering could there be a native HA to ESPHome audio link? Similar to airplay or cast…

Thanks! That would actually be a cool additional feature. A two way setup. Add: A mic preamp, an analog to digital shield and connect esp. Use that to hear you all around the house and take commands. Or sence people presens via audio level differences. Alexa and siri are not always near us and those hubs are just too expencive to have them everywhere…

Did you find a solution?

The solution is in post 2.

1 Like

yes, but 3LECTROSHOCKED was looking for some other solution. I just wonder if he/she could find it.

I follow this project for quite some time, but it is WIP:

it seems very interesting
I have ordered some components to play around, but didn’t have the time so far
normally, you can enable snapcast server in HA and stream to these satellite ESP32 speakers around your house

1 Like

I am looking for the same function in ESPHome and Homeassistant, it will bee nice to bee able to make own small speaker to doorbell, notifycations

Svenn-Erik

1 Like

upvote this that someone created ?

you could…

  1. Use the Media_Player_Template
    https://github.com/Sennevds/media_player.template
  2. Post MQTT commands to the ESP32 that would be subscribing to whatever topic you configure
    ESP32 MQTT Publish Subscribe with Arduino IDE | Random Nerd Tutorials
  3. Use Phil Schatzmann audio streaming
    https://github.com/pschatzmann?tab=stars to play the audio

Turn an ESP8266 WemosD1Mini into an audio notifier for Home Assistant: Play MP3, TTS & RTTL?

1 Like

nice! so you just need the media player template to make it seemless in home assistant

I have been testing on this for a while.

Home assistant → LMS → Squeezelite-esp32 → Bluetooth Speaker (Echo devices)

You have to set transcoding on LMS before transmitting to ESP because it can handle a specific properties while streaming into Bluetooth Speaker.

More importantly, synchronization is not accounting Bluetooth specific delays. So, having synchronized multi room audio with Bluetooth speakers might be a hard reach.