Need ideas on how to recognize a particular melody from washing machine to log an event

My washing machine plays a particular melody while the wash program cycle completes. I need ideas on how to recognise this in home assistant (with help of additional hardware like espHome, RPi, etc).

I want to recognise this event of wash cycle completion in home assistant so as to get notified about it.

Would´t it be much easier to use a smart plug that measures electricity usage? Once usage drops, cycle is finished?

1 Like

This is the easier way to do it and how I do it for my combo, I just setup the automation to monitor the current usage values for each phase of the cycles with the addition if its been on for x time and the door has been closed for the same time to send a notification that the washing is done when I am not home.

Here is the base version that I have saved to work with, folks will just need to adjust the values to what their one is for the main cycle they use:

alias: Washing Machine Automations
description: ""
triggers:
  - type: current
    device_id: 
    entity_id: 
    domain: sensor
    id: Washing Machine Idle
    above: 0.1
    below: 0.5
    for:
      hours: 0
      minutes: 5
      seconds: 0
    trigger: device
  - type: current
    device_id: 
    entity_id: 
    domain: sensor
    id: Washing Machine Running
    above: 2.5
    below: 7
    for:
      hours: 0
      minutes: 5
      seconds: 0
    trigger: device
  - type: current
    device_id: 
    entity_id: 
    domain: sensor
    id: Washing Machine Off
    above: 0
    below: 0.1
    for:
      hours: 0
      minutes: 10
      seconds: 0
    trigger: device
  - type: opened
    device_id: 
    entity_id: 
    domain: binary_sensor
    trigger: device
    id: Washing Machine Door - Opened
  - type: not_opened
    device_id:
    entity_id: 
    domain: binary_sensor
    trigger: device
    id: Washing Machine Door - Closed
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Washing Machine Idle
        sequence:
          - data:
              title: Washing Machine
              message: Washing is done.
              data:
                notification_icon: mdi:washing-machine
            action: notify.mobile_app_rkphone
      - conditions:
          - condition: trigger
            id:
              - Washing Machine Running
        sequence:
          - data:
              title: Washing Machine
              message: Washing is running.
              data:
                notification_icon: mdi:washing-machine
            action: notify.mobile_app_rkphone
      - conditions:
          - condition: trigger
            id:
              - Washing Machine Off
        sequence:
          - data:
              title: Washing Machine
              message: Washing Needs to be taken out.
              data:
                notification_icon: mdi:washing-machine
            action: notify.mobile_app_rkphone
      - conditions:
          - condition: trigger
            id:
              - Washing Machine Door - Opened
        sequence:
          - type: turn_on
            device_id: 
            entity_id: 
            domain: switch
mode: single

Hi,
Thanks for the reply.
I already did that but that data not very helpful as during some stages like water filing, draining, etc. the power level go down for a good period of time. I had an idea that if I put a timeout, so that the power levels does not risen after that timeout, it would declare that the wash cycle is complete. But this way there will be a long delay to get notified about it.

Furthermore, if I can get melody recognition working then I can get many additional signals from the washing machine like wash program start signal, signal to put softener during rinse cycle, signals on errors, etc.

You can add in a vibration sensor to the mix and say if both the current is below x threshold and there is no vibration from the machine for x time then consider the cycle complete.

The other option is to find a way to mod in a ESP32 setup to grab the data feed from the machine and put it into HA that way when its not a smart one that has the option already.

This will be prohibitively difficult. Audio tone recognition is HARD.

It took Smartmusic YEARS to get this working with a basic microphone to listen to elementary school students practicing recorder (and tbh it’s STILL not 100% great at it source: entire family is music Ed.)

Your only hope at all AFAIK is if you have an LLM that can accept audio files and is trained to listen for tones and return a response and unless you have a decently large model like full gpt4.o it probably won’t do it right. You could train a custom model (something like how microwakeword does it) to listen SPECIFICALLY for that tone but it’s a ride to get that set up to build and train the model.

1 Like

Unhelpful for your present issue, however if you machine plays “Die Forelle” (The Trout), you have a Samsung. :slight_smile: :musical_score:

With some trepidation, I recently bought a new Samsung washer drier, and after unblocking tracking domains briefly only for registration, the SmartThings HA integration works well with all of the rich detail you might need.

The SmartThings integration does go via the Samsung cloud, but AdGuard has most exfiltration blocked (I hope… certainly my Samsung TV doesn’t like not being able to talk to the mother ship).

CES 2025 has shown the first Matter-enabled white goods machines so there is hope for the NEXT machine to be local only.

Is there an LED indicator for each step?
Someone on esphome discord did hook up an esp to those leds to get the current washing state

1 Like

With esphome. Wire the speaker to the analoge input and measure/log what you get with each melody. Use this high/low pattern for your trigger

Shazam app? Maybe something similar exists?