8 min read

My Hisense washing machine runs without the Hisense cloud

The washer's Wi-Fi module now logs in to a Home Assistant add-on on my network instead of the vendor's server. Programs, temperature, spin, options, start and stop all work locally, with the internet cut off.

In November I replaced a washer more than ten years old with a Hisense WF5I1045BWQ. It has Wi-Fi and an app called ConnectLife, and like most connected appliances it only talks to its maker’s cloud. I wanted it in Home Assistant without that cloud: no account at run time, no internet access for the machine, nothing that stops working the day the vendor changes its servers.

It took about a week. The washer now connects to an add-on running next to Home Assistant, which plays the part of the cloud. The code is public: hisense-local on GitHub.

Browser demo, states simulated, the end of the cycle sped up. Tap the control strip to open it, turn the dial to Eco 40-60, close, Start, then the countdown runs to the end screen. Nothing on the real machine moved.

The page in the GIF is my own dashboard for the washer, in French because that’s what we use at home. More on it further down. First, how the machine got off the internet.

What the washer does on the network

I started by watching it. With the machine on, its Wi-Fi module keeps exactly one TLS connection open to a server on AWS and nothing else. It listens on no useful port. When you switch the washer off at the panel, the Wi-Fi goes down with it, so it can’t be woken over the network.

Two details made the rest possible:

  • The module accepts any certificate. Point its connection at another server with a self-signed certificate and it carries on as if nothing happened.
  • Inside the TLS tunnel it speaks short JSON lines: a login in three steps, a heartbeat, status messages and commands. Nothing exotic.

So the plan was the classic one: have the router send that one connection to a machine I control, and answer it myself.

Recording the real cloud

To answer like the cloud, I first needed to hear the cloud. I wrote a small relay that sits in the middle: the washer talks to it, it talks to the real server, and it writes down every line in both directions. I put it in a Home Assistant add-on so it runs on the same box.

Getting the connection to the add-on was harder than expected on my UniFi gateway. The firewall rules you can set up in the UniFi interface didn’t deliver the redirected traffic. What worked was two low-level rules on the gateway: one that rewrites the washer’s destination to the add-on, and one that masquerades the source so the replies take the same path back. UniFi drops those rules on every firmware update, so the repository has a script that puts them back.

Then I switched the washer on, used the phone app for a few minutes, and read the log.

The login. The washer sends its id and firmware version, the cloud answers with a token, then a key, then the time. The washer checks none of it for freshness. A login recorded once can be played back the next day and the machine logs in happily.

The status. Status messages carry a copy of the frame the machine’s main board sends to the Wi-Fi module over serial. It’s lightly obfuscated, not encrypted, and it holds the program, temperature, spin, options, time left and state, each at a fixed position.

The commands. This is where I expected to get stuck. The phone app doesn’t build commands itself: it asks the cloud to set named values like Selected_program_ID or Actions, and the cloud turns that into a frame for the washer. That frame is encrypted with the key from the login and signed with a secret I don’t have. I can’t make new commands.

But I don’t need to. The same value always produces the same frame within one recorded login, and the washer doesn’t reject a frame it has seen before. I sent two recorded frames back to the machine, drum light off and on, with the cloud unplugged. It answered err=0 both times and the light did what it was told.

That was the proof. Everything after was making it usable.

One frame per setting

If you can only replay, you need a recording of every value you’ll ever want to send. I drove the washer through the vendor’s own API with the drum empty and recorded each step: all 18 programs on the dial, every temperature from cold to 90 °C, spin speeds from no spin to 1400 rpm, delay start, the options, child lock, drum light, and start, pause, resume and stop on a short program.

Not everything behaved. A few options are accepted and acknowledged but change nothing I can see in the status, so I list them as unconfirmed. Some the machine refuses outright on this model. The limits page has the full list.

Reading the status back took some work too. Program ids above 20 are stored as a dial position rather than the id. The time left appears in several places before a cycle starts, and only one of them counts down. The add-on settles which one during the first real wash: it watches the copies and keeps the one that drops by a minute together with the machine reporting that it’s running.

The add-on

hisense-local is a Home Assistant add-on. In normal use it:

  • answers the washer’s login with the recorded replies,
  • decodes the status frames and publishes them over MQTT with Home Assistant discovery,
  • replays the matching recorded frame when you change a setting, and reports ok, refused or no ack.

In Home Assistant that gives one device with selects for program, temperature, spin and delay, switches for the options, buttons for start, pause, resume and stop, and sensors for time left and state. Controls only appear for values that were actually recorded.

A few safety rules came out of a review of the code. Nothing is answered before a login with the right washer id. Logs never contain the token, the key or the washer id. A retained MQTT message is ignored, so something left on the broker can never start the machine. Local mode opens no outbound connection at all.

Later I added a learn mode for other owners. With it on, the add-on passes the login through to the real cloud, so the phone app keeps working, and it records each command you send and names it by the setting it changed. Use the machine normally for a wash or two, turn learn mode off, and the add-on serves what it learned. The image is prebuilt, so installing takes seconds.

The dashboard

Home Assistant’s own cards would have worked, but a washer has a dial and a screen, so I wanted the page to look like the machine.

The page is a single HTML file that Home Assistant serves itself, talking to it over its WebSocket API. The washer is a product photo of this exact model, and everything interactive sits on top of it in photo coordinates:

  • The door shows a progress ring with the time left and the state, and the drum turns while it washes, faster in the last minutes for the spin.
  • Tapping the control strip opens it large. The dial has 18 notches, 20 degrees apart, in the real order, and you can drag it, scroll it or use the arrow keys. It sends the program a moment after you stop turning.
  • The screen copies the real one. The program icons are cut from a phone video I took of the machine’s own display, the sharpest frame for each.
  • Start and Stop ask for confirmation. Pause and resume don’t.
  • On a phone the strip becomes a control sheet with bigger keys. On an iPad the whole page fits on one screen.

The part that took longest was being honest about state. When the washer is asleep the screen goes blank and says so, and Start is disabled, because Home Assistant can’t wake it. When the link drops, the door says “reconnecting” instead of showing old numbers. The iPad’s in-app browser sometimes freezes the WebSocket without closing it, so the page now pings Home Assistant every 25 seconds and reconnects when the answer doesn’t come back.

At home the page also shows the power plug the washer sits on and the machine’s own per-cycle water and energy figures. That last part lives in my own build of the add-on and isn’t in the public one yet. The page itself is home glue: it’s full of my entity names, so I haven’t published it.

What still needs looking after

  • The washer turns itself off. After a few idle minutes it switches off, and only the power button on the machine brings it back. Home Assistant can start a wash only if someone has pressed that button first.
  • No more firmware updates. With the cloud cut off the machine never updates. That’s the point, since an update could change the login and end local control, but it also means no fixes from Hisense.
  • The clock is frozen at the capture. The washer takes its time from the recorded login, so its clock shows the capture date. Relative delay start still works.
  • Only what was recorded. A value that was never captured can’t be sent.
  • One model. Everything was checked on one WF5I1045BWQ. Other Hisense washers may use the same module, but nobody has tried yet. If you have one, the repository has a form to report what happens.
  • The router rules. They live outside Home Assistant, and a gateway update can remove them. Something has to check and put them back.

What’s public and what’s mine

Public, MIT licence: the add-on, the capture and learn tools, the UniFi redirect script, the tests and the docs, all in hisense-local. Mine: the dashboard, the job that checks the router rules, and the per-cycle water and energy readings, which may make it into the add-on later.

The add-on is not affiliated with Hisense. If you try it on your machine, the comments below or the issue tracker are the places to tell me how it went.

Comments

Loading comments…

    Shown publicly under the name you enter. No account and no email needed.