home assistant · self-hosting · iot · reverse engineering
Freeing a Coway air purifier from the cloud
How Scott Goldman cut his Coway purifier off from the cloud: a root CA fetched over plain HTTP, Bluetooth setup, and a local Home Assistant integration.

Scott J. Goldman published a write-up on November 11 about cutting his Coway Airmega IconS air purifier off from Coway's servers. It climbed the front page of Hacker News the next day with more than 700 points and over 200 comments. The result is coway-local, an MIT-licensed Home Assistant integration that runs its own MQTT broker, so the purifier talks to a machine in his house instead of an AWS endpoint in Seoul.
If you self-host anything at home, it is worth reading twice. What stands out is how little stood in his way once he looked.
A fan that needed a server to change speed
The motivation is ordinary. Goldman lives in the Bay Area, bought purifiers during the wildfire years, and his family uses one as white noise at night. He wanted the "Good Night" button in Apple Home to turn off the lights and push the fan to the right speed.
His Wi-Fi Coway could already be reached from Home Assistant through a community integration that pretends to be the phone app and polls Coway's cloud. He lists the ways that setup broke over the years:
- Coway banned the integration for hammering its servers, then allowed it after an argument with the community.
- Coway rebuilt and rebranded its app from IoCare to IoCare+, so the integration had to be rewritten.
- Small changes to HTML the integration scraped broke it again.
- Coway's servers went offline from time to time.
- His own account was banned for running an old version of the integration, and he could not control the fan remotely for weeks until support reversed it.
His model is already discontinued, and he suspects Coway will eventually charge for the service or shut it down. A guess, but a reasonable one.
The certificate that arrived over plain HTTP
He assumed the fan checks the server's TLS certificate against roots baked into firmware, which would make interception hard. Two things made him try anyway. The first was the eMudhra incident in October, when a certificate authority turned out to have signed intermediates with keys that were effectively one byte long. Browsers blocked them and eMudhra revoked eight intermediates, but clients that never update could still trust them. The second was that an LLM could build the man-in-the-middle lab for him.
The lab was a Raspberry Pi running its own Wi-Fi access point, with nftables redirecting ports 80 and 443 to mitmproxy in transparent mode and the Pi bridged to the home network through his laptop. He notes that Claude declined to write the redirection rules and ChatGPT did.
The first capture showed something odd. The fan was downloading AmazonRootCA1.pem over plain HTTP from an S3 bucket. His hypothesis: the firmware has no root certificates of its own and trusts whatever it downloads. He wrote a small mitmproxy plugin that swapped that file for mitmproxy's own CA, and the fan accepted it and connected. In his words, the eMudhra trick was never needed. The fan "was always MitM-able."
From there it unravels. An HTTPS call returns the MQTT host (an AWS IoT endpoint in ap-northeast-2), port 8883, and URLs for the device's certificate and private key. Whoever controls that response controls which broker the fan uses, and fan commands travel over that MQTT link.
Bluetooth, and where the AI did the tedious part
He still needed the Coway app for setup, so he went after the Bluetooth provisioning. Instead of reading a decompiled Android app by hand, he turned on Android's Bluetooth debug logs, plugged the phone in over USB, and had an AI agent drive it through adb. When the agent found the Wi-Fi payload was encrypted, it pulled the app off the phone, decompiled it and matched code to logs.
The protocol he documents: read device identity from characteristic FFA0, write a random 20-letter key to FFA2, build the AES key from that plus the 12 characters of the MAC address, then send an encrypted protobuf with the Wi-Fi credentials and two URLs, caUrl and certSvrUrl. By hand, he estimates hours or likely days. The AI took about 20 minutes.
Those two URLs are the whole game. Send the payload yourself and you choose where the fan gets its CA and where it enrolls. No interception required.
What runs in his house now
The coway-local README is honest about limits. It requires Home Assistant Core 2026.10.2 or newer and a fixed LAN address for Home Assistant, because that address is written into the fan. Setup runs on a static Web Bluetooth page on GitHub Pages, and only Chrome on a Mac or Android works. The fan then uses three ports: HTTP 8080 for the CA, HTTPS 9443 for enrollment, and MQTT over TLS on 9883, which needs TLS 1.2 with AES128-SHA256. After that, the Coway app no longer controls the fan.
It has been tested on exactly one unit, an AP-1022K on specific firmware. Other models may pass Bluetooth setup and still not work. Treat it as an experiment, not a product.
What the comments got right
One commenter argued that fetching a certificate over HTTP is not the flaw by itself, since certificate chains are often served over HTTP; the flaw is trusting a certificate nobody verified. Another commenter tried the same approach on a Philips purifier that also uses AWS IoT and failed: the eMudhra certificate was rejected, the endpoint used mutual TLS and the ESP chip had Secure Boot. So not every vendor shipped this hole.
Several people asked why anyone buys a cloud purifier when Coway sells models with no connectivity. Someone suggested a smart plug on a dumb unit; another replied that a plug cannot change fan speed. One prediction stuck with me: manufacturers will use the same AI tools to close these gaps before release, and hackable devices from this era may become a collector's market.
Devices that die with the server
This is not a niche worry. Belkin ended Wemo cloud services for many products on January 31, 2026, which killed remote access and voice assistant integrations. Belkin said devices already set up in Apple HomeKit before that date would keep working without the cloud, and that Thread-based Wemo devices would keep working through HomeKit. Owners with a local path had an exit. Everyone else could ask for a refund, and only under warranty.
The eMudhra story points the same way from another angle. Mozilla's Dennis Jackson noted that many clients do not consume revocation information and need software updates to stop trusting bad certificates. A device that never gets firmware updates keeps trusting whatever it shipped with. That helps hobbyists today and hurts owners tomorrow.
We wrote about the same pattern with an embroidery machine sold with a subscription. Hardware you paid for, features living on someone else's server.
My take
If you build connected hardware, ship a documented local API, even a read-only one, and stop treating the cloud as the only control path. Your users will reverse engineer it anyway, and with AI doing the tedious parts it takes far less time than it used to, so you might as well get the goodwill. If you are buying, check before paying whether the device has a local path: Zigbee, Z-Wave, Thread, a HomeKit mode that works offline, or an integration that does not depend on the vendor's servers. And if you run a homelab, copy Goldman's method even without a Coway: put the device on an isolated network, watch what it asks for, and you will learn more about its lifespan than any spec sheet tells you.
Cover photo: GEEK KAZU, CC BY 2.0, via Wikimedia Commons.
Join the builders
New projects, the code behind them and what broke on the way. One e-mail when there is something worth opening.
We send a link to confirm. Leave anytime with one click. Never sold or shared. How we handle it
Keep reading
Open-weight models: how far behind, Prelude 9B, MiniMax M4
Raschka puts open-weight models 2 to 6 months behind. What Prelude 9B and MiniMax M4 are, and when a small team should self-host or use an API.
ggml 1.0: what the version number buys you
ggml, the tensor library under llama.cpp, hit 1.0 with an API stability promise. What changed, and how a small team can run models locally.
Nod by n8n: an open-source agent with its own computer
Nod by n8n is an Apache 2.0 personal agent with its own sandbox and browser. How it works, how to self-host it, and where it still falls short.
Comments
No comments yet. Start the conversation.
Sign in with Google to comment
Signing in keeps out bots and spam. Only your Google name and photo appear next to what you write; your e-mail is never shown.