Problem configuring esphome mqtt for fastled_clockless

Hi guys,

I’m trying to configure the yaml for my D1-Mini with a WS2812B strip connected.
First I configured the yaml to use homeassistant API and MQTT.

Using the API works out of the box… but I’m having trouble configuring MQTT - or at least to control the device via MQTT.

But my goal is to get MQTT working to make the device HA independent!

my yaml seems to be working so far but I can’t get the command channel working.

this is my code:

  name: mellowbucket
  board: d1_mini
    version: 2.7.4

    number: D0
    inverted: True

  - platform: wifi_info
      name: "Mellowbucket IP"
      name: "Mellowbucket SSID"
      name: "Mellowbucket BSSID"

  - platform: fastled_clockless
    chipset: WS2812B
    pin: D4
    num_leds: 36
    rgb_order: GRB
    name: "MellowBucket"
  # Optional variables:
    retain: false
    discovery: true
      topic: mellowbucket/online
      payload_available: online
      payload_not_available: offline
    state_topic: mellowbucket/state
    command_topic: mellowbucket/command
    restore_mode: RESTORE_DEFAULT_ON

      - addressable_rainbow:
          name: Rainbow
          speed: 10
          width: 36

      - addressable_color_wipe:
      - addressable_scan:
          name: Scan
          move_interval: 150ms
          scan_width: 4
      - addressable_twinkle:
          name: Twinkle
          twinkle_probability: 12%
          progress_interval: 15ms
      - addressable_random_twinkle:
          name: Random Twinkle
          twinkle_probability: 5%
          progress_interval: 80ms
      - addressable_fireworks:
          name: Fireworks
          update_interval: 32ms
          spark_probability: 20%
          use_random_color: true
          fade_out_rate: 120
      - addressable_flicker:
          name: Flicker
          update_interval: 16ms
          intensity: 55%
  ssid: "MYSSID"
  password: "xxxxxxxxxxxxxxxxxxx"
    ssid: "MellowBucketHotspot"
    password: "xxxxxxxxxx"

  username: xxxxx
  password: xxxxx


# Enable logging

  password: "xxxxx"

I can see the state_topic via MQTT…



I tried some syntax to figure out by myself, what command to send to the command_topic but without luck so far.

Does anyone know how to send commands which are accepted by the command_topic??

No matter what syntax I use it seems there’s no reaction at all on the command channel…
Maybe my yaml configuration has some errors even if it gets compiled without errors and API control is working…

(but for now I removed homeassistant API from the yaml…)

I also tried if I get some response on MQTT while controlling the device via API but there are no MQTT messages at all using API control.

I’m stuck here - would be nice if anyone could help me finding the right way to use MQTT for controlling my addressable fastled stripe.


The first thing I would do is run MQTT Explorer to see exactly what is being published.

I use WLED to control my LEDs, though not from Home Assistant, though there is a WLED integration available.

Thanks stevemann,

I use MQTTfx which is similar I think…

Like I wrote, I can see the device reporting on the state topic.

What I miss is the right syntax for sending commands to the command topic.

how would this look like? something like this?

mellowbucket/command {"effect":"Rainbow"}

I found no explanation or documentation for this…

I tried so many different syntax to send a command but nothing seems to work, even if I can see my command reaching the command topic. but the stripe isn’t reacting no matter which syntax I use!

Maybe MQTT Explorer is a better choice, I will see…

If you intend to make the device not dependent on Home Assistant I would strongly advise switching to Tasmota. Otherwise you’d still need EspHome to make any changes or updates.