Skip to main content

Command Palette

Search for a command to run...

How I Turned a Dumb Speaker Smart with a Dead Phone and Home Assistant

A dead Honor phone, a Bluetooth speaker, and one afternoon with Home Assistant, from café mode to a fully automated home audio setup

Published
5 min read
How I Turned a Dumb Speaker Smart with a Dead Phone and Home Assistant

I've always been jealous of the makers, the tinkerers, the electronics people. There's just something about building things you can physically touch I've wanted to learn for years but every time I tried, there was just too much. Soldering, IoT protocols, new tools, electrical concepts. So I did what I often do shelf this to the "future" when I have "more time".

The Idea That Wouldn't Go Away

Then one day I looked at the speakers in my house and thought: how hard is it going to be to make these things programmable? Like, play music from 7 to 11 automatically. Café mode. And I wanted to finish it today.

I vaguely knew about something called Home Assistant. So I did what any self-respecting developer would do, I went and asked AI 🤖. After a long back-and-forth, it turned out the setup wasn't that complicated. Here's the full picture of what we figured out:

You have a Squeezebox client that connects to a speaker through Bluetooth, and on the other end connects through Wi-Fi to a Squeezebox server running inside Home Assistant. Home Assistant Music handles the connection to your music provider (Spotify, YouTube Music, etc.)

The original plan involved an ESP32 a microcontroller. But as I understood what was actually needed something that receives an audio stream and pushes it to a speaker I thought why can't I just use my old phone? 🤷‍♂️.

Setting Up Home Assistant

First thing: Home Assistant. If you don't know it, think of it like Google Home or Apple Home except you don't have to worry about these corporations recording every conversation you have. It runs completely in your home, on your network.

You need some kind of computer to run it. Any old computer, a Raspberry Pi, or you can buy the Home Assistant Green — a ready-to-go device you plug in and it just works out of the box. I already have a home server so I set it up as a VM.

Once Home Assistant is up, you create an account and install the Music Assistant app. This is where two important concepts come together:

  • Music Providers adapters that bring your music from platforms like Spotify, YouTube Music, Apple Music, etc.

  • Players destinations where the music plays. Your laptop, a speaker, anything that can receive audio.

I connected YouTube Music (the adapter is in beta but it worked). And then something cool happened.

The Moment It Clicked

My laptop was already showing up as a player. Just because it's on the same network as Home Assistant. I hit play. Music came out of my laptop.

This was not the goal. But it made me understand how things connect. Music Assistant discovers players on the network. My laptop is one. Now I just need to add another one the old phone connected to my speaker.

Adding the Dead Phone as a Player with Squeezebox

Squeezebox is a technology that's been around for a while. What makes it interesting is that it doesn't send audio files to the device it streams audio data to any audio sync. So conceptually, if the phone is connected to the speaker through Bluetooth, any audio streamed to the phone goes straight to the speaker.

Here's how I set it up:

  1. Squeezebox Server: In Home Assistant Music, go to the plugins and add the Squeezebox provider. This sets up the server.

  2. Squeezebox Client on the Phone: I needed a Squeezebox client for Android. The official options are all paid on the Play Store. So I went to F-Droid (an open-source app store) and installed SqueezeLite. Straightforward setup just point it to the server address and hit start.

  3. Connect Phone to Speaker via Bluetooth: Just the standard Bluetooth pairing. Nothing fancy.

After this, I could see a new player in Home Assistant Music, "Android Speaker." I picked a song, chose that player, hit play, and the music came through the speaker.

That was the moment I knew the hard part was done.

The Snowball

This is the part I didn't expect.

Home Assistant has an automation tab and it's surprisingly straightforward. I set it up: music plays from 7 to 11, jazz playlist. Café mode.

But then I noticed my TV had been discovered on the network. Home Assistant just found it. So I added a rule — TV on, music stops.

Then I installed the Home Assistant companion app, which knows whether I'm home (and that data never leaves my server). New rule: left the house, music stops.

Then I wrote a small script that checks if my laptop mic is active. New rule: on a call, music ducks.

Each of these took minutes. And each one came from just poking around what Home Assistant had already found.

And then more things opened up. I discovered devices and entities. I saw NFC tags in the settings and went down a rabbit hole of how people use them. By the end of this one project, I had more ideas of what to build next than I ever got from reading books or watching courses.

Turns out all it took was one small question to pull me in.


If you have questions or want to share what you built, feel free to reach out. Happy hacking 🤓