H801 Wi-Fi RGBW LED Controller with MQTT (ESP8266)

H801 RGBWW Controller

I picked a couple of these up from Aliexpress earlier in the year, I had been planning to DIY something similar but when I spotted these Aiboo H801 RGBWW units for only £8.35 each there didn’t seem much point.  They support the three RGB channels as well as two white channels, up to 96W per channel and can run on 5 to 24V. ESP8266 controlled with 8Mbit of flash.

Red is on GPIO15
Green is on GPIO13
Blue is on GPIO12
White 1 (W1) is on GPIO14
White 2 (W2) is on GPIO4

There are two on board LEDs, a red one on GPIO5 and a green on GPIO 1.

Connections are via nice plug in screw terminals but something to watch out for, on one of the units I got the sticker labelling the inputs and outputs had been put on the wrong way round.

As usual I wasn’t interested in the default firmware or software as I needed something with MQTT support so I could control it from Node-RED. Opening up the case (just 4 screws) I was pleased to see an unpopulated header for the required connections, even better it was labelled. I soldered a 4 pin header on that and a two pin one on the one marked J3 (GPIO0 and ground for flash programming mode), shorted J3 with a jumper, powered on and tried to flash some code… no go… turns out the RX and TX are labelled backwards according to common convention and you actually need to connect RX to RX and TX to TX on your USB TTL adapter!

Programming, RX & TX are labelled in reverse. J3 needs to be shorted to go in to flash programming mode.

Early on I used this firmware for them but have since switched to TASMOTA which I am now standardising on as much as possible, it’s primarily for the Sonoff range but does have support for the H801 built in as well. It’s a doddle to flash with PlatformIO and then you just connect to the web interface and set the module type to H801.

To control the outputs via MQTT using TASMOTA you would send a payload with a PWM value between 0 and 1023 to an MQTT topic of the format “cmnd/H801/pwmx” where H801 is the name you have given your unit and pwmx corresponds to the below:

pwm1 for W1
pwm2 for W2
pwm3 for Blue
pwm4 for Green
pwm5 for Red

To use standard RGB values just multiply each colour value by 4 and send to the topics for the red, green and blue PWM outputs.

Using Node-RED it is easy to create a flow to make a colour picker. The colour picked node is set to output RGB and the function node is just multiplying each RGB value by 4 and sending to the individual topics for each colour.

Node-RED Flow


Node-RED Colour Picker


Here is the flow to copy and paste into Node-RED:

[{"id":"6d80818b.d00e7","type":"ui_colour_picker","z":"b667b1f1.bf821","name":"","label":"","group":"8f79c3e1.e4c48","format":"rgb","outformat":"object","showSwatch":false,"showPicker":true,"showValue":false,"showAlpha":false,"order":0,"width":"4","height":"2","passthru":true,"topic":"","x":390,"y":2880,"wires":[["2e1c8397.2a398c"]]},{"id":"2e1c8397.2a398c","type":"function","z":"b667b1f1.bf821","name":"","func":"msg1 = {payload: msg.payload.r * 4};\nmsg2 = {payload: msg.payload.g * 4};\nmsg3 = {payload: msg.payload.b * 4};\n\nreturn [msg1,msg2,msg3];","outputs":"3","noerr":0,"x":550,"y":2880,"wires":[["bfefa63b.a461a8"],["613649d7.7c6888"],["536e112c.16c1c"]]},{"id":"bfefa63b.a461a8","type":"mqtt out","z":"b667b1f1.bf821","name":"","topic":"cmnd/ESP_RGB_2/pwm5","qos":"","retain":"","broker":"32a2fac0.cd5d06","x":770,"y":2840,"wires":[]},{"id":"613649d7.7c6888","type":"mqtt out","z":"b667b1f1.bf821","name":"","topic":"cmnd/ESP_RGB_2/pwm4","qos":"","retain":"","broker":"32a2fac0.cd5d06","x":770,"y":2880,"wires":[]},{"id":"536e112c.16c1c","type":"mqtt out","z":"b667b1f1.bf821","name":"","topic":"cmnd/ESP_RGB_2/pwm3","qos":"","retain":"","broker":"32a2fac0.cd5d06","x":770,"y":2920,"wires":[]},{"id":"8f79c3e1.e4c48","type":"ui_group","z":"","name":"H801","tab":"978d3f00.2ffa4","order":1,"disp":true,"width":"6"},{"id":"32a2fac0.cd5d06","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"978d3f00.2ffa4","type":"ui_tab","z":"","name":"Test","icon":"dashboard","order":4}]

11 thoughts on “H801 Wi-Fi RGBW LED Controller with MQTT (ESP8266)

  1. Excellent! This helped me a lot when I was trying to implement the Tasmota on the H801. The documentation on this particular unit has been not really covered in the wiki. Thank you.

  2. @Infus : Tasmota definately does support transitions and effects with the H801, as does Espurna firmware.
    Has any one tried connecting a “normal” COB led to one of these devices ?

  3. Hi,
    Maybe you can help me out?
    I uploaded the tasmota .bin file with the ESP-tool command and seems to be successfull.
    Now I try to find the Wireless access point as all other Sonoff devices but cant find it.
    Is there another way to connect?
    help would be appreciated!
    Grtz. Geert

  4. I owe you a 1 liter beer for those reversed tx/rx damn thing.

    With tasmota 5.12.0k I had to use Pwm1 for red, Pwm2 for green and Pwm3 for blue (and they are case sensitive, also).
    Everything else worked perfectly.

  5. Agreed with the comment above tasmota 5.14 is sticking with the new assignments of R=pwm1, G=pwm2,B=pwm3. Believe the white channels are now added on pwm4/5 but been unable to test.

  6. Hi Nathan,

    Thanks for the write up on this. Just wondering if you know if this does voltage conversion ?? i.e. i feed it 24v and it will convert the output to a steady 12v for the LED strip ? or is it straight voltage in voltage out ??

  7. @craig , i don’t think it does conversion.
    The H801 accepts voltages from DC5v to DC24v , so you would feed it whatever is the correct V for your LED.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.