My old Samsung washing machine used to play this merry tune upon cycle completion (turns out to be Schubert and has quite a following on e.g. YouTube).

I've always been a bit sad the replacement Bosch only beeps angrily. No tune, no jingle, just an obstinate beeeep beeeep.

With a bit of #Homeassistant, #python and a lot of getting-around-to-it, once again my house sings to the notes of Samsung!

Let's do a quick dive in.

1/6

[cont..] Detecting the cycle is finished is done through a #LocalBytes power monitoring plug (via MQTT over WiFi to #homeassistant). An automation watches for power consumption to fall and then stay beneath a few Watts for 30 seconds.

It adds a delay to detecting completion, but means brief power dips between cycle phases don't trigger a false alert.

The alert in turn calls a Notify action.

2/6

[cont..] There are countless ways to get #HomeAssistant to play an audio file - for example 'mqttaudio' on Github works, and #ESPHome will do it, but I wanted more control.

A venerable #raspberrypi with a speaker felt like the right solution to me.

I coded up a quick little app in Python that presents a REST API and plays audio files from a queue, so multiple alerts won't crash into eachother.

I also put in the option to generate a TTS voice announcement with #Piper (Piper is COOL!)

3/6

[cont..] It turns out that the Pi 5 doesn't have a built-in sound card! What?! In fairness the Pi 4's built-in sound was a bit poor, but it was functional. Pah.

I picked up a cheap USB soundcard, which annoyingly only appears as a USB device when a headphone is plugged in to it. Don't ask how long it took me to figure this out.

The headphone out is then connected to a small 5V PAM8406 audio amp board, which in turn connects to an 8 ohm speaker I stuck up by my office desk.

4/6

[cont..] Finding a recording of the Samsung song on the internet wasn't hard.

I also wrote my own ending jingles for the tumbler and the dishwasher, so they don't feel left out.

Related, the Samsung jingle is really quite perfect in tone, tune and clarity - and surprisingly hard to replicate.

Finally, I added an inhibit function (a simple Input Boolean helper) to avoid audible announcements at night, or if the family objects to having them when I'm not around to enjoy them.

5/6

[cont..] And PRESTO!

Now #HomeAssistant makes the little speaker in the office serenade me every time the domestic machines complete their tireless work.

Given this is a house of four, and two of those are teens, my little #Pi Sounder system is already getting a great workout.

6/6