How to set up Tasmota to control LED strips individually on a single H801 controller

H801 LED Controller

The H801 LED controller is a versatile, Wi-Fi enabled LED controller based on ESP chips. It can be easily flashed with Tasmota and configured to control multi-channel colored LED strips or multiple single-color LED strips.

This post explains how I configured the Tasmota firmware to control 2 separate LED strips independently. According to this excellent write up at tinkerman each channel is driven by a 60V N-Channel mosfet rated for 35A or 106W maximum power dissipation.


Affiliate Content Start

Affiliate Content End


Note: Be sure to confirm your Length of LED strip does not exceed the single channel maximum current for H801 to avoid burning out the mosfets.

Common Tasmota Settings for LED strips

Reading the Tosmata commands documentation, I found some interesting settings that allowed me to setup the H801 wifi LED controller to control multiple single colour led strips.

fadeenable/disable fading
speedTransition speed when turning off, does not work reliably for turning on. works with power off command. power off uses the specified speed value, however, power on uses a shorter fade interval. I am not sure what vlaue it is using, though it appears to be relative to speed, but shorter.

The firmware maintains a dimmer variable which stores its value even when the device is turned off.
wakeup turn on and fade to current dimmer value
WakeupDuration transition duration in seconds (like speed but for turning on)

Sleep
sleeps controller, which causes choppyness in led fading, set to 0 (off)

Note: that Speed is not referring to wall clock time. If your controller sleeps for 250ms each cycle, then a 1s sleep setting will actually result in a “speed” of 4 seconds.

MY MISSION

This blog started nearly 10 years ago to help me document my technical adventures in home automation and various side projects. Since then, my audience has grown significantly thanks to readers like you.

While blog content can be incredibly valuable to visitors, it’s difficult for bloggers to capture any of that value – and we still have to work for a living too. There are many ways to support my efforts should you choose to do so:

Consider joining my newsletter or shouting a coffee to help with research, drafting, crafting and publishing of new content or the costs of web hosting.

It would mean the world if gave my Android App a go or left a 5-star review on Google Play. You may also participate in feature voting to shape the apps future.

Alternatively, leave the gift of feedback, visit my Etsy Store or share a post you liked with someone who may be interested. All helps spread the word.

BTC network: 32jWFfkMQQ6o4dJMpiWVdZzSwjRsSUMCk6

So the firmware does support smooth fading. Now to find a way to integrate it into Home Assistant.

The Tasmota Commands Documentation is a very interesting (but long) read. I encourage everyone to check it out and take the time to go through it. I ended up finding much easier ways to accomplish things because they had already implemented what I needed.

Tasmota Template for H801 Wifi LED controller

H801 LED Controller – Circuit Top
{"NAME":"H801_Custom","GPIO":[0,0,0,0,0,0,0,0,41,0,0,0,0],"FLAG":0,"BASE":20}

The following options allow you to split the various colour channel outputs into individually controlled LED channels. Rather than having a unified interface for selecting RGBW colours, this allows you to control upto 5 LEDs strips (one for each “Colour” channel on the controller). See image below for Tasmota interface.

H801 Tasmota Interface with individual LED channels split out and controllable

H801 GPIO pin mapping and Tasmota name

See the pin mapping below:

Colour ChannelESP8266 GPIO Pin nameTasmota name
RGPIO 15PWM1
GGPIO 13PWM2
BGPIO 12PWM3
W1GPIO 14PWM4
W2GPIO 04PWM5

Home Assistant Light Configuration

Integrating this type of Tasmota setup into home Assistant was a little tricky. I pasted my YAML config below. Note how the command_topic references the individual channels denoted by cmnd/son_bedroom_led/PowerN where N in the number 1-4. Similarly, state is reported back on stat/son_bedroom_led/RESULT for all channels and the correct channel value must be selected using state_value_template.


Advertisement Begins

Advertisement End



light:
  - platform: mqtt
    name: Bedroom Led
    state_topic: "stat/son_bedroom_led/RESULT"
    command_topic: "cmnd/son_bedroom_led/Power3"
    state_value_template: "{{ value_json.POWER3 }}"
    brightness_state_topic: "stat/son_bedroom_led/RESULT"
    brightness_command_topic: "cmnd/son_bedroom_led/Channel3"
    brightness_value_template: "{{ value_json.Channel3 }}"
    brightness_scale: 100
    optimistic: false
    qos: 1
  - platform: mqtt
    name: Headboard Led
    state_topic: "stat/son_bedroom_led/RESULT"
    command_topic: "cmnd/son_bedroom_led/Power2"
    state_value_template: "{{ value_json.POWER2 }}"
    brightness_state_topic: "stat/son_bedroom_led/RESULT"
    brightness_command_topic: "cmnd/son_bedroom_led/Channel2"
    brightness_value_template: "{{ value_json.Channel2 }}"
    brightness_scale: 100
    optimistic: false
    qos: 1

Conclusion

This post explained how to separate the LED channels on H801 controllers using a Tasmota template. This allows us to control multiple single colour LED strips independently using the same controller. I find this useful when there are multiple LED strips connected to the same power supply and can be controller by the same Wifi controller. Check out my post on home cinema lighting automations for examples.


Featured Content Start

Products for sale on my Etsy Store

Additional card sets are available on my store already. I am planning to create new flashcards in the future to expand into other areas of music theory and piano practice. Check my store for all available learning materials

  • Rhythm training (200 flashcards!) – Etsy Product Link
  • Major scales – Etsy Product Link
  • Minor scales – Etsy Product Link
  • Arpeggio drills – Coming Soon
  • Cadences – Coming Soon
  • Chord progression & improvisation – Coming Soon
  • Jazz & Blues Scales – Coming Soon

Get 10% off your order by using the following link: Use code BLOGVISITOR10

Featured Content End


Related posts

Troubleshooting Asus Xonar U7: Blinking LED and Connectivity Issues

Cheap Wifi MQTT Controlled LED strip using Tasmota and Home Assistant

Integrating Mi/QingPing BLE sensors into Home Assistant without a Gateway

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More