Some weeks ago I talked about the Magic Home LED Controller as I was adding support for it in my ESPurna firmware. At the time a user pointed me to the H801 Led WiFi Controller by Huacanxing. The user in question (Minh Phuong Ly) even did a pull request with some preliminary support for it. So I decided to give it a go.
The H801 is a 5 channels controller that you can find for about 9-10€ at Ebay or Aliexpress. It’s slighly more expensive than the Magic Home Led Controller (you can find the later for 7€ at Aliexpress) but it also is quite different from the insides…
The outsides
The first thing you notice is that this is quite bigger than the one by Magic Home. The later has also more “common” connectors both for power supply (the typical 2.1×5.5mm jack) and the strip connector since most have the same 4 lines for each channel (red, green and blue) and the common anode for power. The H801 uses screw terminals for every connection, input GND and VCC and the five channels (red, green, blue and two whites) and also the common anode.
So the Magic Home is more ready for plug and play while the H801 is a more adaptative solution.
The insides
The H801 has four philips screws in the back and once you remove them you gain access to the insides of the controller. Things to notice: each channel is driven by a beefy DTU35N06 [pdf, datasheet] by Din-Tek, a 60V N-channel mosfet in a TO-252 package. These are rated 35A or 106W maximum power disipation and they use quite some space on the board, with thick traces running to the terminals. The ESP8266 interfaces the mosfets via an NXPHC245 DTU35N06 [pdf, datasheet] bus transceiver that does the level shifting.
The W1 and W2 lines are routed back to the terminal using wires on the back, I guess the ran out of space in the PCB. Also on the back there is a AOZ1212AI [pdf, datasheet] buck regulator that is problably set to 5V output. And then the usual ASM1117 [pdf, datasheet] to lower it further down to 3V3 for the ESP8266.
All in all it looks more roomy. Even thou I don’t know what mosfets the Magic Home Led Controller uses they are SOT-23 packages. The ones in the H801 look more solid. But the specs for both controllers are the same (according to some sources): 48W per channel. I’m not sure I would use 4A per channel on my 12V strips with the Magic Home controller, but I might try with the H801.
Flashing it
Another good thing the H801 has it that it exposes the required GPIOs for firmware flashing in an easy way, not the small pads in the Magic Home controller. There is a header with 3V3, GND, RX and TX labeled and a jumper to tie GPIO0 to ground when you want to boot into flash mode.

The header with the programming cables (3V3 not needed if you are already powering the board via the screw terminals). Also, notice the jumper in place to enter into flash mode.
ESPurna firmware supports H801 since version 1.8.0. It is defined by default as a 5-channels device (LIGHT_PROVIDER_RGB2W). If you want to use it with a standard RGB LED strip you might want to change the light provider to LIGHT_PROVIDER_RGB in the hardware.h file.
// ----------------------------------------------------------------------------- // HUACANXING H801 // ----------------------------------------------------------------------------- #elif defined(H801_LED_CONTROLLER) #define MANUFACTURER "HUACANXING" #define DEVICE "H801" #define LED1_PIN 5 #define LED1_PIN_INVERSE 1 #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT #define LIGHT_PROVIDER LIGHT_PROVIDER_RGB2W #undef RGBW_INVERSE_LOGIC #undef RGBW_RED_PIN #undef RGBW_GREEN_PIN #undef RGBW_BLUE_PIN #undef RGBW_WHITE_PIN #define RGBW_INVERSE_LOGIC 1 #define RGBW_RED_PIN 15 #define RGBW_GREEN_PIN 13 #define RGBW_BLUE_PIN 12 #define RGBW_WHITE_PIN 14 #define RGBW_WHITE2_PIN 4
To flash it add the jumper to J3 and connect the cables. Be aware that the labels in the header are from the programmer point of view, so wire TX to your programmer TX and RX to RX. If you are already powering the board via the screw terminals you don’t have to wire the 3V3 pin. Then run (assuming you already have PlatformIO installed):
git clone https://github.com/xoseperez/espurna cd espurna/code pio run -e h801-debug -t upload
Once you have ESPurna in the H801 you can control your lights via MQTT, the REST API or third party home automation systems like Domoticz or Home Assistant.
Other references
These boards have been around for a while already and I’m not the first to review them or even reflash them. Check Eryk’s blog for another review and more code. Also Andreas Hölldorfer has an in depth review of the board.
One curious thing about those two post is that in the pictures you can clearly see that the mosfets in those boards are different from what I found in mine. They use 20N06L [pdf, datasheet] by OnSemi very similar to the DTU35N06 but with a maximum power dissipation of 60W (the 20 in 20N06L stands for 20A and the 35 in 35N06 for 35A). Aside from that the boards look exactly the same.
Also, I’d like to recommend you reading a great project by Denys Parnell where he shows how to repurpose the H801 as a motor controller. Very cool and so cheap!
A closer look at the H801 LED WiFi Controller by Tinkerman is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Did you consider fading colour states? I’ve done it with FastLED which might be too big for Espurna.
The FastLED library should work just fine with ESPurna. There are a lot of things you could do. Another option would be to use the WS2812FX library (there is a FastLED variant available too). This library has a set of effects you could easily call from an MQTT topic.
Wow, this WS2812FX lib is really cool, will you add support for it in ESPurna directly? (to choose animations in lightbulbs etc.).
It wouldn’t be hard to do… but first it should support WS2812 lights…
There is a way to use the FastLed math without digital stripes. Look at this example:
https://github.com/FastLED/FastLED/blob/master/examples/AnalogOutput/AnalogOutput.ino
Should be the right way for the H801.
Thanks for the tip! Will certainly give it a look, still trying to decide which way to go.
Hey Xose. Is adding support for effects for single RGB and digital stripes on your roadmap? Would be nice to use this with home assistant and mqtt_json. 🙂
Actually, there is a PR by Soif about that that includes animations using the FastLED library. I’m testing it right now: https://bitbucket.org/xoseperez/espurna/pull-requests/31
Hi when will the bin files for espurna 1.8.x ready for download, I would love to test it on my H801 controller
FastLED has a very sophisticated dithering engine which creates very smooth blending/dimming even with the 256 steps of an arduino.
https://github.com/FastLED/FastLED/wiki/FastLED-Temporal-Dithering
I’ve done that with mqtt->node-red->mysensors-rgb-node:
https://forum.mysensors.org/topic/6592/rgb-led-strip-controller-with-fastled
https://github.com/rollercontainer/nanoP9813FastLEDMySensors/blob/master/main.cpp
Thanks for sharing. I’m adding the FastLED library in my “slices” projects so I bet I’ll have a good time playing with it’s options soon.
Out of my league here, but just wondering a couple of things…
I have a project where I need to power on and power off a couple 12v loads (a sbc and a custom-made circuit). I’m thinking that if the LED value for one channel is set to 0, then the power will be off, and if I set it to 1023, then it will be on. Does this sound reasonable and a valid (although uncommon) use for the H.801?
On the other hand… could an API be added to espurna and exposed through the UART so it can be used to control the device?
Thanks!
You mean suing the H801 as a general purpose switch, I guess it’s doable, after all the channels use PWM output so 1023 would simply mean “ON”.
The UART is only used for debugging purposes (if enabled) except for some devices like the Sonoff Dual that use the UART to communicate messages between the two microcontrollers on board. So, sure, you could add your own API via UART, only remember to not enable DEBUG in ESPurna.
Hi Xose, I’m an espurna fan and I finally got a H801, so I immediately espurned it.
Here are my first impressions.
* Red and green are inverted here (yes, I carefully checked all the wirings).
* I’m using a RGBW stripe (5 wires). Probably this is a desired behaviour: I’m able to set the colour leds OR the white leds, but not both at the same time. It’s the same by changing LIGHT_PROVIDER_RGBxx from RGB2W to RGBW.
* The H801 doesn’t have a physical button and the UI “Upgrade” button doesn’t reset all settings to factory defaults. Is it possible to factory reset the device OTA, without opening the case and connecting it via FTDI?
* A WEB UI “factory reset” button would be handy anyway for things and sonoffs physically not reachable or without a physical button.
* The UI “Reset” button is a bit confusing to me as in most devices it is called “Reboot”.
Thanks,
Piero
Hi
Current version 1.9.1 manages dimmers in a completely different way, you might want to give it a try. Now the provider is named “LIGHT_PROVIDER_DIMMER” and you define the number of dimming channels, optionally specifying that the first 3 are for RGB.
About the factory upgrade over OTA you can create a tricket on butbucket asking for it, it’s the best way to track bugs/enhancements. Same if you feel the “reset” button should be named “reboot”. It really helps me to have requests centralized there.
Hi Xose,
I have a module like this and uploaded your firmware sometime ago.
This week i saw that you have updated the firmware, but i think i have bricked my device.
I have selected via the web browser to upload the h801.bin file and it restarted. My bad, i have misinterpreted the instructions.
The device is not connecting to the network nor i’m able to communicate with the ESP via tx-rx pins using the interface.
Do you have any idea on how i can unbrick it?
Thanks in advance.
Best Regards
It’s actually really hard to brick those devices. You should be able to reflash it via serial. Double check your connections and ensure you have GPIO0 grounded when powering the board to enter flash mode.
Thanks Xose,
It was in fact a jumper problem, bad soldering on the gnd pin. I was able to reflash it after fixing this issue.
Best Regards.
Pingback: Home Automation: zapowiedź serii – Tyborek.pl
Thanks for a great article, Xose.
I seem to be having some issues with my H801 that I havent seen on the other stuff i am playing with (NodeMCUs and Sonoffs).
I am able to upload just fine, and my code seems to (at least somewhat) run as well.
However, serial communication back to the PC just plain doesn’t work. I cant get any strings back, even though i do see the bootloader.
I noticed the following commented out in the code:
// note
// TX GPIO2 @Serial1 (Serial ONE)
// RX GPIO3 @Serial
Is that because the Serial TX/RX pins differ from a Generic ESP8266 module?
I also consistently get the following exception when running my code:
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
..But even so, my code (both a bigger project with web server, and a simple blink LED sketch) does seem to run?!
Any thoughts would be greatly appreciated!
Thanks,
/Thomas
Yes, the H801 is wired weirdly 🙂 You should use Serial for RX and Serial1 for TX, but aside from that it’s pretty much like any other board…
Ahaaa – Of course. I was snowblind and failed to notice “Serial1.” in the code.. 🙂
One more question if you don’t mind..
I’m experiencing that it takes around 3secs before Setup() kicks in. That sucks, but I assume it’s the bootloader taking its time..
However, during most of those 3 seconds, my LEDs are fully powered. I would like them to be off until I can gently fade them up through code.. Any thoughts on how that would be achievable?
Thanks,
/Thomas
If it’s the bootloader taking so much time you don’t have access to that since no user code is being executed. It could be that the LEDs were powered before the reset.
GREAT! how can I make it work with domoticz ?? thank you!!
Still no support for light with Domoticz, only switches. Soon.
Hi Xose,
In the line , “git checkout https://github.com/xoseperez/espurna ” to sudo git clone https://github.com/xoseperez/espurna Then Cd the DIR as you did; then sudo apt-get install udev ; then python -c “$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/develop/scripts/get-platformio.py)” Then the last line. Thanks for your work on this great piece of software mate. from Downunder have a great day.
I have updated the clone line. I’m assuming you already have PlatformIO installed.
Xose,
Have you got a reference for MQTT Root Topic? Not sure what to put in there? Read underneath do I just put the word Root as main topic and when in Node-red call the other stuff like root/relay/0/set? Very confusing mate. Please contact me so I can set up a H801. Have a nice day too.
You can use whatever you want. If you use the H801 in your living room you can just use “living/lights” for instance…
I use the h801 with ST and 3 of them are flaky and do not get the signal half of the time.
They look like they are getting a good signal in my router but i have another one that is almost flawless.
So has anyone ever tried to modify the H801’s board to use one of those wemos d1 mini add on 2.4 ghz antennas?
there is no connector for it but i wonder if one could be added to bypass the trace antenna and where a good place to solder it to the board would be or if you could just cut the connector end off of the wire from the antenna and solder it on
I think that I have the same problem as ThomasN. My LEDs are on 100% cyan, when the H801 is powered for the first time. So only two of the three lines are “on” until my code executes and turns them off. Has anyone tried to swap the G and B pins with other pins (W1/W2) or resolder something and see what happens?
Pingback: $10 H801 WiFi RGB LED Controller Supports Sonoff-Tasmota Open Source Firmware
Pingback: CNXSoft- новости Android-приставок и встраиваемых систем » Светодиодный Wi-Fi-контроллер H801WiFi для RGB-лент, стоимостью 10$, поддерживает прошивку Sonoff-Tasmota с открытым исходным кодом