Hacker News new | ask | show | jobs
by cdr 330 days ago
It's actually really, really easy to get the state of a "dumb" washing machine (or any other electric machine) into Home Assistant using a smart plug. You can use something really basic like "power draw for > n seconds followed by no power for > m seconds" to detect when a cycle is finished. You can get way fancier and look at power draw curves to determine what part of a cycle it's in, or which cycle, if you really want to. You can add a door sensor (recommend Samsung) if you want to know if the door's been opened.

Unfortunately it's much harder to do the same for an electric dryer, since there's no inexpensive or good smart plugs for 240V last I checked.

10 comments

For the dryer think even simpler: get a Esp32 with a SW-420 vibration sensor, stick it on top of the machine somewhere, and look for vibrations. Since most dryers don’t have cycles, it’s really easy to detect if they’re running or not. There’s even a potentiometer on the SW-420 so you can adjust the sensitivity without reprogramming the ESP32.
This is (largely) what I have for my "dumb" washer. What makes mine unique is the washer is in my apartment building's cellar, too far for Wifi. So I have a LoRa transmitter that routes the message to a LoRa receiver on my home network.

Unfortunately, as you noted, I haven't figured out how to handle the dryer as the load is too much for all the smart plugs I've found. I wish there was a clamp-style monitor on an extension cord, but it seems that is something which doesn't exist.

Thankfully, the dryer isn't as much of an issue since dry clothes can sit there until I remember to get them.

I wonder if it would be practical to McGyver a solution into place by coiling some wire around / next to the dryer's power cable - to detect flowing current - and connecting the coil to an Arduino / Raspberry Pi
Maybe? I'm not super great with electrical work.

My understanding is that detecting an electrical current through a power cord typically doesn't work when measuring all the wires together, because the current in the live wire is canceled out by the return current in the neutral wire. This is why clamp-style meters are usually put at the electrical panel, where individual wires are accessible. Since I live in an apartment, that isn't an option for me.

Seems like it's not really a great plan, but could maybe be made to work:

https://electronics.stackexchange.com/questions/634852/exter...

It's also possible that your machine lets off some elecromagnetic noise you can detect directly.

The other thing you could try is put some sort of a microphone / vibration on it, then train a small NN on the waveform to distinguish between the washer and dryer.

You can use a vibration sensor for the dryer.
I considered that, but the washer and dryer are stacked (limited space) so the vibrations of the washer would be picked up in a dryer vibration sensor.
Is that really a problem though? If you're washing another load at the same time as the dryer is running, wouldn't you generally want to wait until both are done anyways so you can swap the wash to the dryer after getting the dry load out?

Also at least in my experience the dryer takes longer to run than the washer, so if I've just rotated a previous load and started both at the same time I'm always waiting on the dryer to be able to do the next one.

Not always. I only put sheets and towels in the dryer, everything else gets hung up. So I may do two or even three washing loads in the time of a single dryer load (it can be very slow). So I'm much more interested in when the washer finishes than the dryer.
I tried that, and found dryers actually vibrate so little that most sensors have a hard time reliably detecting it.
You might be able to set something up using a current clamp connected to an esp32, though it might have to go over a point where the wires are separated so possibly inside the machine. Might not be too hard depending on how you feel about opening up your dryer.
I know nothing about US 240V power circuits — what plugs do you use, could you get by with a Euro system?

I use Eve Energy smart plugs, which seems to be supported in Home Assistant through the matter integration. Local first, no bullshit remote account requirements, good quality, around 40€ / USD 45.

https://www.evehome.com/en/eve-energy

I believe that US 240V is 2 hots, neutral, and ground. EU 240V is one hot, one neutral and ground. EU 400V (380V) is 3 hots, neutral and ground.

None of this is cross-compatible.

> I believe that US 240V is 2 hots, neutral, and ground.

Correct. Its called split phase, a 240V transformer is center tapped and that tap is grounded to create the neutral. Either end of the transformer to neutral is 120v and end to end is 240V.

> EU 400V (380V) is 3 hots, neutral and ground.

Three phase 230/400: 400V is line (hot) to line with 230V line to neutral. More for industrial use but I hear some homes can have this service for whatever reason.

> None of this is cross-compatible.

Not really. A 230/400 volt system also supplies 230v single phase. A 230 volt European device will work fine on 240V split phase unless it has a motor which will run faster on 60 Hz which could overload it. Though I have a machine with a three phase 380 volt 50 Hz motor running happily on 230/400 60 Hz from an autotransformer supplied by 120/208 60 Hz. Just runs 20% faster.

> > EU 400V (380V) is 3 hots, neutral and ground.

> Three phase 230/400: 400V is line (hot) to line with 230V line to neutral. More for industrial use but I hear some homes can have this service for whatever reason.

It varies from country to country in Europe. In the UK you'll almost never find 3-phase in a home, in Sweden even apartments usually have 3-phase supply. In my Swedish apartment the only thing connected to more than one phase is the induction hob.

Pity - thank you!
Or just pay 10€ for an ikea plug (INSPELNING). I do not understand people always paying a x10 premium for eve.
How about using sound?

Extra credit for discerning washer vs dryer, recognizing "done" buzzer/bell, etc. Might be useful if your dryer has a "wrinkle guard" feature; buzz and then keep tumbling on low heat.

For the washer, you could probably also discern portion of the cycle (fill, agitate, spin, drain).

I do this for my washing machine, drier, dishwasher and also 3D printer, in the UK. Have some Z-Wave Greenwave PowerNodes, hooked into Home Assistant. Works great. I also have Alexa hooked into Home Assistant so I was able to make it announce through our Echo Dot when a cycle for any of those devices completes.
I use an AI agent running on an old Android phone to monitor the position of the switch with the camera and let me know when it's straight up and down or side to side, since those are the four off positions of my knob. (kidding but maybe not by this weekend)
What’s the actual amperage of your dryer? A Sonoff Pow can take 20A. Add a fuse or breaker.
CT clamp could work, but dunno if there are inexpensive ones.
You can use a vibration sensor on the dryer.