skip to content
>tuneout
← cd ~/projects
project · home assistant

DIY smart display

A Raspberry Pi countertop display running on my own Home Assistant, with local wake word detection.

I wanted a countertop smart display — something like a Nest Hub, but running entirely on my own infrastructure, talking to my own Home Assistant instance, and with no cloud dependencies for voice processing. Here's what I built, every problem I hit along the way, and a configure script at the end so I can deploy more of them in the future.


The Hardware

PartWhy
Raspberry Pi 4 Model B (2GB)Plenty of power for a display + voice satellite
128GB MicroSD (A2, U3)Fast enough to avoid SD card bottlenecks
KEYESTUDIO ReSpeaker 2-Mic Pi HATWM8960 codec, dual mics, speaker output, user button — all in one HAT
3W 8Ω speaker (JST-PH2.0)Connects directly to the HAT's speaker output
7" IPS DSI Touchscreen (800×480, MIPI)Driver-free DSI interface, capacitive touch

Total cost came in well under $100 for the Pi-side hardware, not counting the display.


Choosing the OS

I went with Raspberry Pi OS 64-bit (the current Trixie-based release, December 2025). The key reasons:

  • The ReSpeaker HAT's driver (seeed-voicecard) is significantly easier to get working on Raspberry Pi OS than on Ubuntu.
  • The 64-bit build is important — Wyoming Satellite and its dependencies are much happier in a 64-bit environment.
  • The desktop edition (not Lite, not Full) is the right middle ground: you need a compositor for the kiosk display, but you don't want the bloat of the Full image on a 2GB board.

Before flashing, I used Raspberry Pi Imager's settings (Ctrl+Shift+X) to pre-configure the hostname, WiFi credentials, SSH, username, and password. This meant the device came up fully accessible with no keyboard attached.


Step 1: The ReSpeaker HAT Driver

After the first boot and a full system update, I cloned the seeed-voicecard driver. The official Seeed repo hasn't kept up with newer kernels, so I used the community-maintained HinTak fork:

shell
git clone https://github.com/HinTak/seeed-voicecard
cd seeed-voicecard
sudo ./install.sh

After a reboot, I ran arecord -l to verify the HAT was detected:

shell
card 3: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0

Good sign. But then trying to actually record anything:

shell
arecord: set_params:1456: Unable to install hw params

The DKMS Problem

Running dkms status revealed the issue:

shell
seeed-voicecard/0.3: added

added means the source was registered, but the module was never compiled. It should say installed. And checking dmesg:

shell
wm8960 1-001a: No MCLK configured
wm8960 1-001a: ASoC: error at snd_soc_dai_hw_params on wm8960-hifi: -22

The seeed-voicecard machine driver, which is responsible for configuring the master clock on the WM8960 codec, had never loaded because it had never been built. Trying to build it manually revealed why:

shell
error: 'struct snd_soc_pcm_runtime' has no member named 'id'

This is a kernel 6.x API break. The snd_soc_pcm_runtime struct dropped its id member sometime before kernel 6.12, and the seeed-voicecard source hadn't been updated. The fix is a one-line patch — replace every rtd->id with rtd->dai_link->id:

shell
sudo sed -i 's/rtd->id/rtd->dai_link->id/g' \
    /usr/src/seeed-voicecard-0.3/seeed-voicecard.c

sudo dkms build -m seeed-voicecard -v 0.3 --force
sudo dkms install -m seeed-voicecard -v 0.3 --force
sudo reboot

After the reboot, dkms status showed installed, the No MCLK errors were gone, and the hardware was actually usable.


Step 2: Getting Audio Recording to Work

With the driver working, I hit the next set of issues trying to actually record audio.

The WM8960 Doesn't Do Mono

The WM8960 codec only supports stereo capture — you can't request a single channel. Trying to record with -c 1 fails at the hardware level regardless of what ALSA plugin you use.

16kHz Through plughw Also Fails

Wyoming Satellite needs 16kHz mono audio for wake word detection. My first instinct was to use plughw: to let ALSA handle the channel and rate conversion. It doesn't — at least not for this codec and this driver combination. Both the channel downmix and the rate conversion fail silently at set_params.

The Fix: Record Native, Convert in Software

The solution was to bypass ALSA's plugin conversion entirely and do it in software with sox. The WM8960 supports 48kHz natively (and conveniently, 48000 ÷ 3 = 16000, so sox can do clean integer decimation). I wrote a wrapper script:

shell
#!/bin/bash
# mic.sh — records at native 48kHz stereo, outputs 16kHz mono
arecord -D hw:CARD=seeed2micvoicec,DEV=0 -r 48000 -c 2 -f S16_LE -t raw | \
    sox -t raw -r 48000 -L -e signed -b 16 -c 2 - \
        -t raw -r 16000 -L -e signed -b 16 -c 1 -

One more wrinkle: Wyoming Satellite doesn't run --mic-command through a shell, so pipes don't work if you put the command inline in the systemd service. The wrapper script sidesteps this entirely.


Step 3: The Wyoming Voice Pipeline

With audio working, setting up the voice pipeline was straightforward. I'm using:

  • Wyoming openWakeWord — runs locally on the Pi, handles "Hey Jarvis" detection using a pre-trained model
  • Wyoming Satellite — the bridge between the Pi's hardware (mic + speaker) and Home Assistant's voice pipeline
shell
# openWakeWord
git clone https://github.com/rhasspy/wyoming-openwakeword
cd wyoming-openwakeword && script/setup

# Wyoming Satellite
git clone https://github.com/rhasspy/wyoming-satellite
cd wyoming-satellite && script/setup

Both run as systemd services. The satellite service ties everything together:

ini
ExecStart=/home/pi/wyoming-satellite/script/run \
    --name "Smart Display Alpha" \
    --uri tcp://0.0.0.0:10700 \
    --mic-command "/home/pi/mic.sh" \
    --snd-command "aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 22050 -c 1 -f S16_LE -t raw" \
    --wake-uri tcp://127.0.0.1:10400 \
    --wake-word-name hey_jarvis \
    --ha-server http://homeassistant.local:8123 \
    --ha-token YOUR_TOKEN_HERE

The --ha-server and --ha-token values (a long-lived access token from your HA profile) are needed to pass HA's connectivity check when you add the Wyoming integration. Without them the integration setup throws an error about being unable to fetch audio, even if the voice pipeline itself works.

Once both services are running, adding the integration in Home Assistant is Settings → Devices & Services → Add Integration → Wyoming Protocol, then pointing it at the Pi's hostname on port 10700.

The healthy log output looks like this:

shell
INFO:root:Ready
INFO:root:Connected to services
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
INFO:root:Connected to server
INFO:root:Waiting for wake word
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
INFO:root:Waiting for wake word

Step 4: Kiosk Mode

Raspberry Pi OS Trixie uses labwc as its Wayland compositor. This changes how kiosk autostart works compared to older guides — the XDG autostart mechanism (~/.config/autostart/*.desktop files) isn't reliably processed by labwc. Instead, labwc has its own shell-script autostart at ~/.config/labwc/autostart.

Two things I ran into that aren't obvious:

  1. The file must be marked executable. labwc silently skips it if the execute bit isn't set. chmod +x ~/.config/labwc/autostart is not optional.
  2. The Chromium binary is chromium, not chromium-browser on current Raspberry Pi OS. This changed at some point and most guides still reference the old name.

The autostart file I landed on:

shell
#!/bin/bash
pkill lxpanel || true
pkill wfbar || true

unclutter --timeout 1 &

(
  # Wait for HA to be reachable before opening Chromium.
  # Without this, a slow network boot leaves you staring at an error page.
  until curl -s --head "http://homeassistant.local:8123" > /dev/null 2>&1; do
    sleep 3
  done

  chromium \
    --kiosk \
    --ozone-platform=wayland \
    --touch-events=enabled \
    --noerrdialogs \
    --disable-infobars \
    --no-first-run \
    --disable-session-crashed-bubble \
    --disable-pinch \
    --hide-scrollbars \
    --password-store=basic \
    --overscroll-history-navigation=0 \
    --check-for-update-interval=31536000 \
    "http://homeassistant.local:8123/your-dashboard?kiosk"
) &

A few flags worth calling out:

  • --ozone-platform=wayland — without this, Chromium runs under XWayland and touch gestures (swipe to scroll) don't work properly. Native Wayland fixes it.
  • --hide-scrollbars — exactly what it sounds like; essential for a clean kiosk look.
  • --password-store=basic — prevents the GNOME keyring unlock popup on startup.
  • The curl retry loop — genuinely necessary. Boot is faster than the network on a Pi and without this you'll see Chromium's "site can't be reached" page every time.

Step 5: Volume Control

The standard Raspberry Pi OS volume slider controls the default audio device, not the WM8960 on the HAT. You need to use amixer directly:

shell
amixer -c seeed2micvoicec sset 'Speaker' 94%

For on-device adjustment without SSH, I wrote a small Python service that listens for presses on the ReSpeaker HAT's user button (GPIO17):

  • Short press → volume up (cycles through presets: 40, 55, 70, 82, 94, 100%)
  • Long press (>1 second) → volume down

The current level is saved to ~/.smart-display-volume and restored on service startup, so the volume persists across reboots without needing alsactl or root privileges.

For tactile feedback, each press plays a short beep through the speaker at a pitch that corresponds to the new volume level — low tone for quiet, high tone for loud. This is generated on the fly with sox:

python
sox_proc = subprocess.Popen([
    "sox", "-n",
    "-t", "raw", "-r", "22050", "-e", "signed", "-b", "16", "-c", "1", "-",
    "synth", "0.12", "sine", str(freq),
    "fade", "l", "0.01", "0.12", "0.02",
], stdout=subprocess.PIPE)

subprocess.run([
    "aplay", "-q", "-D", "plughw:CARD=seeed2micvoicec,DEV=0",
    "-r", "22050", "-f", "S16_LE", "-c", "1",
], stdin=sox_proc.stdout)

It runs in a daemon thread so it never blocks the button handler.


Step 6: Stopping TTS Playback

When Home Assistant is mid-response and you want it to stop, there's no built-in mechanism to interrupt Wyoming Satellite's TTS playback. The solution is simple: kill the aplay process. Wyoming Satellite catches the broken pipe, resets cleanly, and returns to wake-word listening.

I run a small HTTP server on port 12345 that does exactly that:

python
class StopHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == "/stop":
            subprocess.run(["pkill", "-f", "aplay"])
            self._respond(200, "stopped")

On the Home Assistant side, add to configuration.yaml:

yaml
rest_command:
  stop_smart_display:
    url: "http://smart-display-alpha.local:12345/stop"
    method: GET

Then add a button card to your dashboard:

yaml
type: button
name: Stop
icon: mdi:stop-circle-outline
tap_action:
  action: perform-action
  perform_action: rest_command.stop_smart_display

You can test it without touching HA at all:

shell
curl http://smart-display-alpha.local:12345/stop

The Configure Script

Since I plan to deploy more of these, I wrote a configure.sh script that automates the entire build from a fresh Raspberry Pi OS install. It handles:

  • System update
  • Dependency installation
  • Seeed-voicecard driver installation, kernel 6.12 patch, and DKMS build
  • Microphone wrapper script creation
  • Wyoming openWakeWord and Wyoming Satellite setup and service registration
  • Speaker volume initialization
  • Volume button service setup
  • TTS stop server setup
  • Kiosk mode configuration (labwc autostart with all the right Chromium flags)

It's interactive — prompts for device name, HA URL, HA token, wake word, and kiosk URL at the start, then runs unattended. To use it on a new device:

shell
scp configure.sh stop-server.py volume-button.py [email protected]:~/
ssh [email protected]
chmod +x configure.sh && ./configure.sh

Lessons Learned

A few things that tripped me up that aren't documented clearly anywhere:

dkms status: added is not success. Added means registered, not compiled. Always verify you see installed after building a DKMS module, and check make.log if the build fails.

The WM8960 doesn't do mono or rate conversion through plughw. Record at the codec's native 48kHz stereo and handle conversion in software with sox. It's more reliable and the 48→16kHz integer decimation produces clean output.

labwc autostart must be executable. This is not mentioned in the labwc documentation. The file is silently skipped if the execute bit isn't set.

Wyoming Satellite doesn't run --mic-command through a shell. Pipes in the command string don't work. Use a wrapper script.

chromium-browser no longer exists on current Raspberry Pi OS. The binary is chromium. Nothing tells you this; Chromium just silently fails to launch from labwc autostart.

--ozone-platform=wayland is essential for touch. Without it, Chromium runs under XWayland and swipe-to-scroll doesn't work on a touchscreen. One flag completely fixes it.


What's Next

A few things still on the list:

  • Timer integration — HA's voice pipeline already handles "set a 5 minute timer" and creates timer entities. The missing pieces are a Lovelace timer card on the dashboard, an automation to announce when the timer fires, and a button to silence it.
  • LED ring feedback — The ReSpeaker HAT has two RGB LEDs. Wyoming Satellite has an event system that fires on wake word detection, listening, processing, and idle states. Lighting up the LEDs to reflect pipeline state would make the device significantly more polished.
  • Multi-device management — Right now the configure script handles deployment, but ongoing updates (new wake word models, Chromium flag changes, etc.) still require SSH-ing into each device individually. Some kind of fleet management would be useful at three or four devices.

The full configure script and Python services are available at tuneout.dev.

now playing ·

0:00 0:00