Levoit air purifiers - killing the vesync app and going local

I’m actually super excited for this one xD
This began as a project to integrate my Bosch split air conditioning units with Google home, got completely sidetracked, and ended up working on my air purifier instead.

God damn it!

Anyway! As usual, this is purely documenting my work and experience, your own may vary, if you hurt yourself or break your device I am absolutely not liable for any of it. So please don’t do it!

With that out of the way…
GitHub link to the original work by acvigue: GitHub - acvigue/esphome-levoit-air-purifier: ESPHome custom component for Levoit branded smart WiFi air purifiers · GitHub
Documentation and disassembly and pinout by acvigue:

This will be a terrible guide on how to change the oficial firmware of the levoit 400s purifier to ESPhome, let’s go:

Don’t judge, I had no idea I could also go from the top to get to the board…
If you use a plastic spudger, you can get the top part of the purifier out easily, where the main board with the esp32 is. The plastic rim is stuck in place with plastic clips, which is terrible because I broke them all, but on the other hand now it’s quite easy to remove the stuff my one year old sticks inside of the purifier. So yay?

So really, you don’t need to do all I did there.
Wiring:
Now this is the scary part!

If you double check the blog post, one of the pictures is his amazing soldering work (no judgement, I soldered an esp32 to my desk leg by mistake.):

Now this is where I had some difficulties, because the pin out he used is actually inverted for the 400s. So instead of having TX and RX closest to the esp board, they are actually opposite of that. Once I inverted the pins, and wired IO to GND I was off to the races.

Next, firmware:
For the 300s you can use the sample yaml in the GitHub directly it seems. In my case, for the 400s a small edit in the yaml was needed, please look for the following snippet and add the line missing, as shown in the example below:

levoit:
  id: levoit1
  model: core400s

Oh, and because it’s an esp32 I tried my luck and added the web server component. Seems to handle it fine…. Mileage may vary…?

HINT: PLEASE backup your original firmware. I was messing with the pins and when I looked it was already erasing it -.- my bad..

Alright. Time for flashing! FYI I did not solder anything, just used DuPont wires, and lots of cursing.



All of the channels are populated and I got data incoming :slight_smile:

Now, here’s the fun bit. It’s an esp32….running esphome. Which means lots of space of activities… and modding :smiley: I might add an bme680 inside since I have one lying around anyway.

And there you go. A big thanks to @dorcari for his assistance in the yaml! This didn’t work as well before his intervention xD

Thanks for this info @Pedro_Liberal

As I’m currently also looking into getting air purifiers, but won’t allow any devices which only work through cloud connections in my openHAB setup, this definitely looks like an alternative, even though opening the device and swapping the ESP32 firmware might not be the most user/warranty friendly solution.

I just stumbled across this solution with the stock firmware, which purely relies on redirecting to a local MQTT broker instead of the VeSync cloud, through custom DNS entries.

It only mentions the 200S, but as it uses the Levoit v2 protocol, the same as the binding, this should be applicable to all other binding compatible devices as well.

A friend will be getting the 300S soon, so I’ll do some tests runs to see if these air purfierd might make it into my setup as well :wink:

Awwww yeah that’s cool! Can I bother you to report back once you do? Between the vesync binding, flashing esphome or your suggestion, levoit air purifiers have no lack of integration solutions :smiley:

Here is my take on the Levoit Air Purifiers:
https://github.com/tuct/esphome-projects/tree/main?tab=readme-ov-file#project—free-levoit-air-purifiers

Working ESPHome firmware with filter lifetime tracking and full Home Assistant fan support for

Levoit Core 300s, Levoit Core400s, Levoit LV-PUr131s, and Levoit Mini (Smartifed, custom PCB)

new version here:
https://github.com/tuct/esphome-projects/tree/main/projects/free-levoit
=> Core300s/400s and Vital100s tested,
should work with Core200s and Vital200s(Pro) as well

Id you weant to keep original FW/ESP:

https://github.com/tuct/esphome-projects/blob/main/components/levoit/README.md#hardware-setup

=> i fried one of my ESP32 (core300s) and my Vital 100s now has 2 ESP32, only one running, this way, i can always get new FW and switch back to check the protocol if needed