Coway Air Purifier Local Control: Ditch the Cloud
Learn how a Coway Airmega was reverse-engineered for local Home Assistant control, what its cloud dependency exposed, and the trade-offs of removing it.

How I Freed a Coway Air Purifier from Its Cloud
A smart appliance is only as dependable as the services it relies on. That became clear with my Coway Airmega: the purifier itself worked well, but controlling it through the manufacturer's cloud was a different story. The app was slow, account access could fail, and changes to Coway's service repeatedly broke the Home Assistant integration I depended on.
I wanted something simple: press my Apple Home "Good Night" scene, turn off the lights, and set the purifier to the fan speed my wife prefers for white noise. Instead, that routine depended on an app, an unofficial integration, Coway's servers, and a working internet connection. When any link in that chain failed, the button stopped doing what I expected.
So this is what I did: I dug into the purifier's network and Bluetooth setup, then built a way to control it locally through Home Assistant. The takeaway isn't "reverse-engineer every smart device." It's that if you understand where control actually lives - and what happens when a vendor service changes - you can make better choices for your home.
Why replace the Coway cloud
The purifier ended up in a household where clean air and reliable nighttime noise both mattered. During California's recurring wildfire seasons, an air purifier isn't just a connected gadget - it's part of the way the house stays livable. The Coway Airmega did its core job: it moves air through a HEPA filter, monitors air quality, and adjusts the fan when needed.
The problem was the control path. My older, non-Wi-Fi Airmega had physical controls, but it couldn't join my smart home. When it eventually broke, I replaced it with a Wi-Fi model, the Airmega IconS. Coway's app could control the fan remotely, and a community-maintained Home Assistant integration let me expose those controls to Apple Home.
When it worked, the integration basically copied what the phone app did: it checked the Coway cloud for status and sent commands through the service. Home Assistant then translated that into Apple Home controls. Convenient - until the cloud became a required middleman.
The real cost of cloud dependence
Over the course of a few years, the integration broke for reasons I couldn't control. The service blocked or restricted it, the app was renamed and changed, and small changes to the pages the integration relied on made it fail. At one point, my account got blocked after I ran an older integration version. Remote control was down for weeks while I waited for support.
None of those failures stopped the purifier from filtering air. They just made the control layer unreliable. That distinction matters, because cloud dependence can turn a functioning appliance into a frustrating smart-home device without touching its actual physical job.
And there's the long-term risk too. A manufacturer can discontinue a model, change an API, restrict access, add a fee, or shut down a service. You don't have to be pessimistic to see the basic issue: if a product depends on an outside service, it inherits that service's lifecycle.
Define the goal before choosing the method
My goal was specific. I wanted local fan control from Home Assistant, exposed to Apple Home, so the purifier could respond to a bedtime scene. I didn't need to change the filtration hardware or redesign its air-quality sensing. I just needed a dependable control path.
Keeping that scope tight made the work easier to evaluate. A local integration can improve reliability and reduce dependence on an account, but it usually means technical setup and some ongoing maintenance. It's not automatically the right move for someone who only wants physical buttons - or who's perfectly happy with the manufacturer's app.
How I inspected the purifier's network traffic
The first hurdle was figuring out what the purifier did when it joined Wi-Fi. I set up an isolated test network for the device and routed its traffic through a Raspberry Pi running traffic-inspection software. The Pi's Wi-Fi radio gave the purifier a nearby access point. Its wired connection reached my laptop, and from there, my home network.
It wasn't as clean as placing the Pi next to the router, but it solved a practical radio problem. The purifier could connect from its normal location, and I could observe its outbound requests without changing the rest of the household network.
Start with observation, not assumptions
At first, I assumed certificate validation would make interception difficult. If a device pins a specific server certificate - or carefully manages its trust store - putting a proxy in the middle might not work.
I also considered a security incident involving a certificate authority, but I didn't end up needing that theory here, and it would have been a bad foundation for a home setup anyway.
The first useful clue was a plain HTTP request for a public root certificate. That suggested the purifier might download something it would later use for validating connections. So, in a controlled test on my own device, I swapped in a test certificate at that step and watched what happened next. After that, the purifier made additional connections I could inspect.
That result was helpful and also a little uncomfortable. Downloading a certificate over an unencrypted channel can let an intermediary on the same network replace it. It made the device easier to study, but it also pointed to a weakness in how its trust was established. This is not something you should try on devices or networks you don't own or don't have permission to test.
Separate the different communication paths
The purifier's setup and control didn't run through one single web connection. The app handled initial configuration, while the device used MQTT over TLS for ongoing messages. MQTT is a messaging protocol common in connected devices; clients publish and subscribe through a broker.
When I watched traffic while changing settings in the app, it became clearer how the system was put together. The device contacted a configuration service, got the details it needed, and then maintained a separate MQTT connection for control messages. When I changed settings in the app, new traffic showed up on that messaging channel.
This is where you really have to test carefully. Seeing encrypted traffic - or even spotting a request name - doesn't automatically tell you what the system is doing. I compared requests with what I did in the app, repeated the tests, and treated each interpretation like a hypothesis until another observation supported it.
Keep the test environment contained
A good reverse-engineering setup should be isolated and reversible. In my case, the purifier connected to a test access point, and the inspection proxy wasn't exposed to the wider internet as a service. I kept everything limited to my own appliance and avoided collecting unrelated household traffic.
Even when the goal is benign, traffic captures can include account identifiers, device addresses, tokens, and configuration data. Treat them as sensitive. Don't publish raw captures or private keys, and strip credentials and unique identifiers before sharing any technical findings.
What reverse engineering revealed
Once I could inspect the device's connections, I found that the cloud configuration included what the purifier needed to reach the MQTT service. The response also identified certificate and key material used for that connection. In other words: the cloud wasn't just a relay for button presses - it was part of the process that told the purifier where to connect and how to authenticate.
The key realization was that the destination was configurable during setup. If I could supply that configuration myself, I could point the purifier at a server I controlled instead of Coway's service.
Bluetooth provisioning was the missing piece
Coway's app uses Bluetooth during setup to discover and provision the purifier. I wanted to reproduce that setup without relying on the app, so I captured Android Bluetooth debug logs while pairing the device. Then I compared those captured exchanges with the app's behavior to understand the format and encryption used for Wi-Fi configuration.
The setup flow included reading the device's identity, exchanging a temporary key, and sending an encrypted configuration payload. That payload contained the Wi-Fi details and the service addresses the purifier would use afterward. Once I understood the structure, I could build a small provisioning tool to supply my own service addresses.
This Bluetooth work was a better route than continuing with an intercepted cloud setup. It removed the need to keep redirecting the purifier's traffic through a proxy every time I wanted to configure it. It also made the "two phases" idea much clearer: provisioning tells the device where to connect; normal operation uses that configuration to communicate with the chosen server.
AI accelerated the work, but did not verify it
I used an AI coding assistant to help inspect logs, connect app behavior to Bluetooth messages, and draft pieces of the tooling. It cut down on some tedious tasks - for example, mapping a sequence of app actions to changes in captured messages fits an assistant that can compare structured traces.
But generated code and interpretations still have to be verified. I checked the protocol details against the captured data and tested the resulting setup on my own device. AI can speed you up through unfamiliar code, but it can't prove a hypothesis is correct just because the explanation sounds plausible.
The same idea applies to security research more broadly. A model may help write a script or draft a configuration, but you still own the testing rules, the scope of your experiment, and the way you handle secrets. I kept the work limited to the purifier and confirmed what the scripts were doing rather than treating the assistant like an unattended operator.
Key takeaways
- Identify which part of the system actually depends on the cloud: setup, control, status reporting, or all three.
- Observe traffic and device behavior before committing to a theory about the protocol.
- Treat certificates, keys, tokens, and packet captures as sensitive data.
- Use AI to accelerate analysis, then validate its output with repeatable tests.
- Limit reverse engineering to devices and networks you own or are authorized to test.
How local Home Assistant control works
Once I understood the protocol, I built a local service that handles provisioning and the MQTT messages needed for control. The device now receives configuration that points it to my server rather than Coway's cloud. During normal use, the purifier communicates over Wi-Fi with Home Assistant, which exposes its controls to Apple Home.
I used a browser-based Bluetooth setup flow because my Home Assistant server doesn't have Bluetooth and is too far from the purifier. I bring a laptop near the device, provision it, and then let it connect directly over the home network. That setup keeps the "server" where it already runs, while the laptop is just used for the initial Bluetooth step.
What changes in daily use
The payoff is intentionally boring. I tap "Good Night." The lights turn off, and the purifier switches to the fan speed my wife likes for white noise. The routine no longer depends on the Coway app or Coway's cloud being online.
Home Assistant is the bridge between the purifier and Apple Home. That matters because it keeps the automation inside a system I already use, instead of adding yet another app or a separate routine to maintain. The purifier stays the same physical device; only the control messages change hands.
Local doesn't mean maintenance-free. I'm now responsible for the server-side behavior the manufacturer previously handled. If Home Assistant changes, if the integration has a bug, or if I change my network, I may need to troubleshoot. That's a trade I'm comfortable making because the automation is genuinely useful and I know what I'm signing up for.
When this approach makes sense
This kind of local integration works well when cloud outages actually affect your routines, the device matters to you, and you have the bandwidth to maintain an alternative. It's less attractive when the product already works well offline, the cloud features are optional, or the effort won't pay off.
Before you try anything similar, ask yourself:
- What must keep working? Focus on the specific controls or automations you rely on.
- Can the device be recovered? Keep a path back to the manufacturer's setup if your local configuration breaks.
- Where will secrets live? Store keys and tokens securely, and avoid putting them in logs or shared code.
- Who maintains the replacement? A local service still needs updates, backups, and troubleshooting.
- Is the effort proportionate? For many devices, buying something with documented local support is just the more practical choice.
My Coway model is discontinued, so don't read this as a recommendation to buy that specific purifier. The broader point is to evaluate the control path before you commit to a connected product. A well-made appliance can still become annoying if essential features depend on a service that won't always behave.
Conclusion
The Coway Airmega didn't need a new fan or a new filter. It needed a control path that didn't fall apart whenever the manufacturer's app or cloud changed. By looking at its network and Bluetooth setup, I found a way to provision it for local Home Assistant control and connect that control to Apple Home.
The practical lesson is simple: separate the appliance from the service around it. A device can work fine at its core, and still feel fragile because an external dependency sits in the way. Local control can remove that dependency - but it also moves maintenance to you. Choose that trade deliberately, secure your configuration, and keep the setup no more complicated than the routine it's meant to support.