Automating a dumb washing machine
Our washing machine is now over 10 years old, and has worked flawlessly all the while. It wasn't cheap when we bought it because we deliberately chose something as energy-efficient as possible, but it’s more than earning its keep by now. Time has moved on, and there are more exciting models on the market; but replacing it just for the sake of something marginally more efficient or even just shinier doesn't make economic or environmental sense.
Because it's 10 years old, it's also pretty dumb by the standards of today's "smart" machines. If it has any kind of digital interfaces, I haven't found them - apparently it will play diagnostics codes as a tinkly tune if you were to call up tech support and hold your phone up to the front panel, but I've never used that feature because the machine’s never let us down so far.
It does play a teeth-grindingly annoying jingle straight out of the Sirius Cybernetics Corporation songbook when the cycle finishes, but that’s as good as it gets as far as notifications are concerned.
It wasn't until I took this picture I noticed the 10 year guarantee sticker on the front, which I guess means it's due to explode any day now...
Lack of interfaces was never an issue until we moved house, and the washing machine found itself banished to the further reaches of the cellar. You can't hear it from upstairs and several rooms away, and it's easy to forget that there's been a cycle running until the load has sat an increasingly (inCREASINGly - see what I did there? No? Oh well, never mind...) long time in the drum.
Clearly, this massive inconvenience and major impact on quality of life needs Fixing.
Option one would be to run out and buy a new, smart, connected machine, so that we can be pinged automagically on our phones when the cycle ends. There's at least two very good reasons for not doing this - firstly the cost and unjustifiable waste involved in binning a perfectly good machine because it’s not quite good enough.
Secondly, I've yet to find any household-grade „connected“ appliance that doesn't require some kind of badly-written, poorly-secured and abusively data-grabbing app in order to function. I don't want my appliances talking to the internet, because I don't trust manufacturers to write software that's not insecure or abusive, or both. Nor do I need Yet Another App to aggressively upsell me a subscription every time a load finishes.
Option two was to hack a homebrew solution together, thereby avoiding both obsolescence and shitty software.
Guess which one I chose?
What follows is what was hacked together.
How I want it to work
Actually using the washing machine hasn't changed - load it up, select the cycle, and set it going.
From there, I'm interested in precisely two things: whether it's still running, in which case I can forget about it again; or whether it's finished, in which case I might then venture downstairs to deal with the unloading. I might equally not venture downstairs then and there, so the "finished" notification has to be persistent so that I'm reminded of it repeatedly (in a non-intrusive kind of way) until I get to the unloading part.
(I did venture part-way down the rabbit hole of somehow getting the „time left on this cycle“ number off the machine and into Home Assistant, but that got way too complicated way too quickly. Plus the value of this information is pretty marginal, because a washing machine isn’t something you need to react to Right Now as you would, say, an oven.)
I definitely don't want something that will nag me with buzzes or beeps, and I also don't want a notification that can easily be swiped away and subsequently forgotten, like a phone pop-up. Something unobstrusive that can be cleared when it’s done, but doesn’t nag or annoy in the meantime.
Take together, those requirements land on some kind of persistent display which is visually-distinctive enough to notice in passing, but not so obtrusive that it's annoying (no blinkenlights or sirens, please).
How it actually works
The whole system has three components: a display, a current monitor, and Home Assistant.
The display
There's a small display on the wall at the top of the stairs down to the cellar. It either shows shows the status of the washing machine (running or finished), or it's blank.
It‘s small and relatively unobtrusive (as white 3D-printed plastic boxes go), and it’s roughly at eye height so it’s easily glanceable.
The wood panelling wouldn't be my personal choice as a wall cladding, but it's not high on the list of things to be replaced
Inside the box is a combination ESP8266 and 128x32 OLED display, powered by a USB connection hardwired to the back of the board.
The ESP8266 runs a Micropython web server that starts up when the board boots, listens on port 80, and responds to three endpoints: /start
, /end
, and /reset
When the web server gets an HTTP GET request, it updates the display according to the endpoint that's just been called - running, finished or blank.
The board has a built-in wifi stack with a static IP address so I can use a local DNS name to resolve the server.
The current monitor
The washing machine gets its power from a standard surface-mount Shuko socket on a dedicated 230VAC circuit. It's wired in series with a Shelly PM Mini, which gives an instantaneous reading of the power draw of whatever's connected to it downstream.
When on standby, the power draw of the machine is lower than the Shelly can measure, so effectively zero. When the cycle starts, by contrast, the power draw jumps to between 30-50W (spinning the drum and running the water pumps) and 2.500W (while heating the water if it’s running a hot cycle). At the end of the cycle, the power draw eventually drops back down to zero again, once the machine has unlocked the door and gone to sleep.
Obviously there's a lid on this in normal operation
A less-invasive option would have been to connect the machine via a current-monitoring socket (something like the Shelly plug), but as this is a permanent setup it wasn't much more effort to wire in something physically. The tiny put-in-the-wall devices are also quite a bit cheaper.
Home Assistant
The Shelly PM is registered with Home Assistant, so all the of onboard sensors are replicated on the Home Assistant side and get updated once a second. When the value of the power draw sensors exceeds 10W, I can assume the washing machine is running; when it drops back below 10W for 5 minutes, I assume that the cycle has ended. The extra 5 minutes is a bit of a buffer, as the machine does a few bonus spins at the very end of a cycle, so the power draw bounces around a bit.
The endpoints of the display's web server are set up as REST devices in Home Assistant:
rest_command:
reset_laundry_indicator:
url: "http://laundryindicator.home.arpa/reset"
method: GET
verify_ssl: false
timeout: 30
set_laundry_indicator_wm_start:
url: "http://laundryindicator.home.arpa/start/"
method: GET
verify_ssl: false
timeout: 30
set_laundry_indicator_wm_stop:
url: "http://laundryindicator.home.arpa/end/"
method: GET
verify_ssl: false
timeout: 30
A set of automations monitor the power sensors to trigger the REST devices for each step in the cycle:
- id: '1736603137844'
alias: Notify when washing machine starts
description: 'Calls start endpoint of laundry indicator when power > 10W'
triggers:
- trigger: numeric_state
entity_id:
- sensor.washing_machine_power
above: 10
conditions: []
actions:
- action: rest_command.set_laundry_indicator_wm_start
metadata: {}
data: {}
mode: single
- id: low_power_consumption_alert
alias: Notify when washing machine finished
description: Notify when device power consumption stays below 2W for 10 minutes
triggers:
- entity_id:
- sensor.washing_machine_power
below: 10
for:
hours: 0
minutes: 5
seconds: 0
trigger: numeric_state
conditions: []
actions:
- action: rest_command.set_laundry_indicator_wm_stop
metadata: {}
data: {}
mode: single
To reset the display, there's a button on a Home Assistant dashboard that triggers the REST device pointing at the 'reset' endpoint of the web server.
That’s the only manual part of the process - I briefly considered trying to hook a door sensor into this stage so that the notification would be cleared once the machine has been opened; but I haven’t found a sensor that will actually stick to the rounded profile of the door so far.
Another option would be to put a button in the device - or even replace it with a touch screen - but this was built from what I had lying around at the time, so it will do for now.
Putting it all together
As a solution to a problem, it works.
A finished cycle - spot the rolling shutter artifact
The notifications are visible enough, but not obtrusive; and they persist in a way that's not annoying. The whole process is also mostly fire-and-forget, and it doesn't depend on doing anything extra over and above loading the machine in the first place.
If I was doing this over again, I'd have gone for a separate ESP board and display, because that would allow for a smaller enclosure on the wall; and I didn't realise that the blue and yellow areas of the display are fixed (not that this makes a huge difference).
I’m repeating myself from a previous post, but the ESP and similar devices are modern-day miracles. If you’d told me even five years ago that something as small would be as capable, I probably wouldn’t have believed you - and that’s from someone who earns his living in tech.
Total time expended, about a day - and the hardest part of the process was getting the case design right so the mounting holes lined up with the screw holes in the board. All in all, a lot cheaper than a "smart" washing machine.