Michiel's Blog

Monitoring my Samsung smart washing machine without a cloud

Two weeks ago I gave a talk at Python Leiden on how I monitor my Samsung Smart washer without using Samsung SmartThings.

As Samsung announced using their SmartThings API will start costing USD 5 per month starting October, and today is the last day of September, I thought it would be appropriate to write a blog post based on my talk now.

I have a Samsung washing machine

My washing machine

I bought it in May 2021 for 450 euros. It plays Die Forelle whenever the wash is finished. But it’s in my garage, so I can’t hear it when I’m in my living room or home office. Also, it is “smart”. It calculates how long the cycle is going to take, depending on the load and I think also depending on how dirty the water is. This means that if you start a cycle, it tells you that it’s done in 90 minutes, and if you’d come back 90 minutes later it might still need 30 minutes, or it might be that it’s already done for 15.

It can send you notifications via the SmartThings app. This app requires a whole bunch of permissions, and takes up a whopping 857MB on my iPhone. It gets the data from the SmartThings cloud. So my washer talks to SmartThings, tells when it thinks the wash is done, and my phone talks to the same cloud if I open the app to see how the laundry is going and to send me notifications when it’s done. I don’t really like this much.

Samsung has just sent an update to some of their smart fridges bricking them for a couple of days. I don’t like that much either.

But you could use Home Assistant!

Yeah I know, Home Assistant. Every tinkerer’s favorite platform for home automation. Which you can install on a Raspberry Pi or on their own bespoke hardware. Indeed, it has a SmartThings integration. Unfortunately, this still works via Samsung’s cloud. So my washer still needs to talk to SmartThings, and my Home Assistant server would need to get its data from the Samsung Cloud. Moreover, Samsung decided to start asking money for the cloud access: 5 USD per month. As you see, it’s quite a popular integration too, with over 10% of Home Assistant users having this installed.

SmartThings warning Home Assistant

So if we calculate quickly, if I’d have paid 5 USD a month since I had this washer, it would have cost me €450 for the washer plus $320 for cloud access! That seems a little out of balance.

So what is my goal, anyway?

I would like to see when the wash is going to be ready. I’d want to have a small display that I can place in my living room that can show what is on the display of the washing machine, how many minutes are left. This way I can quickly estimate if I run an errand now or I’d wait until the wash is ready, first. I’d not want to use their app for this, nor their cloud.

My approach

I checked if there is any possibility for local access. I remembered when I read about the announcement of the Matter protocol, which would allow interoperability, and Samsung being one of the backers of this protocol, and me being happy about the fact that I bought a Samsung washer. Silly me.

It turns out Samsung indeed delivered Matter support. What they made is a feature where if you’d have a Matter lightbulb (or washer), you can control that from their SmartThings platform. But it does not work the other way around! My smart washer does not expose itself as a Matter device on the network. It does not expose any services on the network. Trust me, I used Wireshark!

This as opposed to my Brother printer, for instance, which has an open website and even an endpoint that exposes data as a .csv, which will happily show off how low the toner is, how many prints it made in its lifetime or even how many paper jams it had (a not insignificant amount).

Samsung could very easily have built something like that. But they don’t. Because they want me in their SmartThings ecosystem, sending my personal data, and possibly fetching my money, too.

So I decided to take an alternate approach: put a camera in front of the machine, take a picture, read it with computer vision, parse it and make it available over an HTTP endpoint on my local network. This turned out not to be so easy. Originally I was planning to use a Raspberry Pi that I still had lying around (who doesn’t have one?) with an old Logitech 720P webcam. But the webcam has a fixed focus distance, and a rather low resolution. It did not turn out well.

Low res

Then I decided to shell out for the Raspberry Pi Camera Module 3 which is the version that has autofocus. It is around 35 euros. And while it works well, only after I installed it I realized I could probably just as well have used an old Android phone with shattered screen. Because those also have decent cameras plus autofocus.

Higher res

And then I breadboarded together a Raspberry Pi Pico plus a 1602 LCD plus a buzzer, a few LEDs, and a push button. The Pico is a small programmable microcontroller that is great for things like this. It is low cost, runs MicroPython if you want, so what’s not to like? This display connects to wifi, gets the state of the washer and shows it on the screen. If there is no wash, it just acts as a clock. Pretty practical and I like it.

Pico with display

I needed the buzzer just so it could play Die Forelle when the laundry is ready ;-)

My thoughts

It would have been so much better if Samsung would have exposed this data on my wifi network!

Please note that this integration only allows me to read out the state of the washer, I can’t remote pause or add bubbles or whatever other features that are available via their app and that I would not ever use.

One of my coworkers explained he has a similar washing machine and he hooked it up to Home Assistant by simply connecting it to a smart plug that exposes the current draw. When there is no more current draw, he knows the washer is ready. This works, but my problem is that it does not help me with the question when the wash is going to be ready.

Because I now have the data, I could make a nice graph that shows the washing machine during its cycle adjusting the ETA a couple of times. Here’s an example of where it ended earlier than originally planned. But it can also end much later!

Washer countdown graph

I’d still like to print a 3D case for the display. And I thought that it might be nice if I’d actually expose a Matter service on my Pi, so one could integrate it in Home Assistant after all. However, I currently do not run Home Assistant myself and also as far as I could see there is no great Python library that I could use for this.

All in all, it was a fun project!

Discussion on Hacker News

Visitor since we started counting