MQTT issue WLED

Im trying to get Aircookies WLED connecting with HA using the MQTT add-on. I have MQTT setup, and in the logs i can see my WLED devices showing up. In my wled i have the mqtt broker address as my hassio ip. I then installed mqtt explorer and i was expecting that when i make any changes in wled it should pick up the mqtt messages but im seeing nothing.

At a total loss why its not working, im presuming i have something setup wrong with my mqtt. Any thoughts?

If you could share your config, it would help.
At least the MQTT definition bit and where/how you defined the WLED in HA

Ok actually managed to get that working now, seems there was an issue with mqtt so had to reinstall it.

Something new though, i have added the light manually in my config.yaml file as a mqtt light, but unless im getting the topic names wrong its not sending the messages. Since im using credentials on mqtt do i need to add that in the config? at the moment its like this

light:
  - platform: mqtt
    name: "Mushroom"
    command_topic: "wled/mushroom"
    brightness_command_topic: "wled/mushroom"
    rgb_command_topic: "wled/mushroom/col"
    rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}"
    effect_command_topic : "wled/mushroom/api"

this is mine

platform: mqtt
    name: "Garden Lights"
    state_topic: "gardenlights/all/g"
    command_topic: "gardenlights/all/api"
    rgb_state_topic: "gardenlights/all/c"
    rgb_command_topic: "gardenlights/all/col"
    brightness_command_topic: "gardenlights/all"
    brightness_state_topic: "gardenlights/all/g"
    brightness_value_template: "{{value }} "
    rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}"
    rgb_value_template: "{{ value[1:3] | int(base=16) }},{{ value[3:5] | int(base=16) }},{{ value[5:7]| int(base=16) }}"
    qos: 0
    optimistic: true
    on_command_type: "first"
    payload_on: "T=1"
    payload_off: "T=0"
    effect_list:
      - "[FX=00]  STATIC"
      - "[FX=01]  BLINK"
      - "[FX=02]  BREATH"
      - "[FX=03]  COLOR_WIPE"
      - "[FX=04]  COLOR_WIPE_RANDOM"
      - "[FX=05]  RANDOM_COLOR"
      - "[FX=06]  COLOR_SWEEP"
      - "[FX=07]  DYNAMIC"
      - "[FX=08]  RAINBOW"
      - "[FX=09]  RAINBOW_CYCLE"
      - "[FX=10]  SCAN"
      - "[FX=11]  DUAL_SCAN"
      - "[FX=12]  FADE"
      - "[FX=13]  THEATER_CHASE"
      - "[FX=14]  THEATER_C_RAINBOW"
      - "[FX=15]  RUNNING_LIGHTS"
      - "[FX=16]  SAW"
      - "[FX=17]  TWINKLE"
      - "[FX=18]  DISSOLVE"
      - "[FX=19]  DISSOLVE_RANDOM"
      - "[FX=20]  SPARKLE"
      - "[FX=21]  FLASH_SPARKLE"
      - "[FX=22]  HYPER_SPARKLE"
      - "[FX=23]  STROBE"
      - "[FX=24]  STROBE_RAINBOW"
      - "[FX=25]  MULTI_STROBE"
      - "[FX=26]  BLINK_RAINBOW"
      - "[FX=27]  ANDROID"
      - "[FX=28]  CHASE_COLOR"
      - "[FX=29]  CHASE_RANDOM"
      - "[FX=30]  CHASE_RAINBOW"
      - "[FX=31]  CHASE_FLASH"
      - "[FX=32]  CHASE_FLASH_RANDOM"
      - "[FX=33]  CHASE_RAINBOW_WHITE"
      - "[FX=34]  COLORFUL"
      - "[FX=35]  TRAFFIC_LIGHT"
      - "[FX=36]  COLOR_SWEEP_RANDOM"
      - "[FX=37]  RUNNING_COLOR"
      - "[FX=38]  RUNNING_RED_BLUE"
      - "[FX=39]  RUNNING_RANDOM"
      - "[FX=40]  LARSON_SCANNER"
      - "[FX=41]  COMET"
      - "[FX=42]  FIREWORKS"
      - "[FX=43]  RAIN"
      - "[FX=44]  MERRY_CHRISTMAS"
      - "[FX=45]  FIRE_FLICKER"
      - "[FX=46]  GRADIENT"
      - "[FX=47]  LOADING"
      - "[FX=48]  DUAL_COLOR_WIPE_IN_OUT"
      - "[FX=49]  DUAL_COLOR_WIPE_IN_IN"
      - "[FX=50]  DUAL_COLOR_WIPE_OUT_OUT"
      - "[FX=51]  DUAL_COLOR_WIPE_OUT_IN"
      - "[FX=52]  CIRCUS_COMBUSTUS"
      - "[FX=53]  HALLOWEEN"
      - "[FX=54]  TRICOLOR_CHASE"
      - "[FX=55]  TRICOLOR_WIPE"
      - "[FX=56]  TRICOLOR_FADE"
      - "[FX=57]  LIGHTNING"
      - "[FX=58]  ICU"
      - "[FX=59]  MULTI_COMET"
      - "[FX=60]  DUAL_LARSON_SCANNER"
      - "[FX=61]  RANDOM_CHASE"
      - "[FX=62]  OSCILLATE"
      - "[FX=63]  PRIDE_2015"
      - "[FX=64]  JUGGLE"
      - "[FX=65]  PALETTE"
      - "[FX=66]  FIRE_2012"
      - "[FX=67]  COLORWAVES"
      - "[FX=68]  BPM"
      - "[FX=69]  FILLNOISE8"
      - "[FX=70]  NOISE16_1"
      - "[FX=71]  NOISE16_2"
      - "[FX=72]  NOISE16_3"
      - "[FX=73]  NOISE16_4"
      - "[FX=74]  COLORTWINKLE"
      - "[FX=75]  LAKE"
      - "[FX=76]  METEOR"
      - "[FX=77]  METEOR_SMOOTH"
      - "[FX=78]  RAILWAY"
      - "[FX=79]  RIPPLE"
    effect_command_topic: "gardenlights/all/api"
    effect_state_topic: "gardenlights/all/api"
    effect_value_template: "{{ value }}"
1 Like

Thanks, i tried using your config but i get a bad indentation error. Not sure how to solve that?

There was a missing quote mark at the end.

Sat Sep 14 2019 15:25:38 GMT+0100 (British Summer Time)

"Sat Sep 14 2019 15:25:38 GMT+0100 (British Summer Time)
Component error: rgb_command_topic - Integration rgb_command_topic not found.
Component error: brightness_command_topic - Integration brightness_command_topic not found.
Component error: effect_value_template - Integration effect_value_template not found.
Component error: optimistic - Integration optimistic not found.
Component error: effect_command_topic - Integration effect_command_topic not found.
Component error: state_topic - Integration state_topic not found.
Component error: on_command_type - Integration on_command_type not found.
Component error: brightness_value_template - Integration brightness_value_template not found.
Component error: rgb_state_topic - Integration rgb_state_topic not found.
Component error: rgb_value_template - Integration rgb_value_template not found.
Component error: rgb_command_template - Integration rgb_command_template not found.
Component error: brightness_state_topic - Integration brightness_state_topic not found.
Component error: name - Integration name not found.
Component error: platform - Integration platform not found.
Component error: payload_off - Integration payload_off not found.
Component error: qos - Integration qos not found.
Component error: effect_state_topic - Integration effect_state_topic not found.
Component error: command_topic - Integration command_topic not found.
Component error: effect_list - Integration effect_list not found.
Component error: payload_on - Integration payload_on not found."

I got this now though, do i need to define those somewhere else?

only in lovelace.ui as entity or light(entity):

I don’t use LoveLace but this might be interesting:

@lebherz, how did you get the second gui? Mine looks like the first one using light card, missing the color options and the effects dropdown, which I did put into the lights.yaml as per one of the previous posts.

when you click the 3 vertical dots the second gui appeaers. turn on the light, and the wheel and the effect selection appears.
here is my only entry in HA. (in the configuration.yaml.

light:
  - platform: mqtt
    name: "WohzimmerLED"
    state_topic: "wled/wohnzimmer/g"
    command_topic: "wled/wohnzimmer/api"
    rgb_state_topic: "wled/wohnzimmer/c"
    rgb_command_topic: "wled/wohnzimmer/col"
    brightness_command_topic: "wled/wohnzimmer"
    brightness_state_topic: "wled/wohnzimmer/g"
    brightness_value_template: "{{value }} "
    rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}"
    rgb_value_template: "{{ value[1:3] | int(base=16) }},{{ value[3:5] | int(base=16) }},{{ value[5:7]| int(base=16) }}"
    qos: 2
    retain: true
    optimistic: true
    on_command_type: "first"
    payload_on: "T=1"
    payload_off: "T=0"
    effect_list:
      - "[FX=00]  STATIC"
      - "[FX=01]  BLINK"
      - "[FX=02]  BREATH"
      - "[FX=03]  COLOR_WIPE"
      - "[FX=04]  COLOR_WIPE_RANDOM"
      - "[FX=05]  RANDOM_COLOR"
      - "[FX=06]  COLOR_SWEEP"
      - "[FX=07]  DYNAMIC"
      - "[FX=08]  RAINBOW"
      - "[FX=09]  RAINBOW_CYCLE"
      - "[FX=10]  SCAN"
      - "[FX=11]  DUAL_SCAN"
      - "[FX=12]  FADE"
      - "[FX=13]  THEATER_CHASE"
      - "[FX=14]  THEATER_C_RAINBOW"
      - "[FX=15]  RUNNING_LIGHTS"
      - "[FX=16]  SAW"
      - "[FX=17]  TWINKLE"
      - "[FX=18]  DISSOLVE"
      - "[FX=19]  DISSOLVE_RANDOM"
      - "[FX=20]  SPARKLE"
      - "[FX=21]  FLASH_SPARKLE"
      - "[FX=22]  HYPER_SPARKLE"
      - "[FX=23]  STROBE"
      - "[FX=24]  STROBE_RAINBOW"
      - "[FX=25]  MULTI_STROBE"
      - "[FX=26]  BLINK_RAINBOW"
      - "[FX=27]  ANDROID"
      - "[FX=28]  CHASE_COLOR"
      - "[FX=29]  CHASE_RANDOM"
      - "[FX=30]  CHASE_RAINBOW"
      - "[FX=31]  CHASE_FLASH"
      - "[FX=32]  CHASE_FLASH_RANDOM"
      - "[FX=33]  CHASE_RAINBOW_WHITE"
      - "[FX=34]  COLORFUL"
      - "[FX=35]  TRAFFIC_LIGHT"
      - "[FX=36]  COLOR_SWEEP_RANDOM"
      - "[FX=37]  RUNNING_COLOR"
      - "[FX=38]  RUNNING_RED_BLUE"
      - "[FX=39]  RUNNING_RANDOM"
      - "[FX=40]  LARSON_SCANNER"
      - "[FX=41]  COMET"
      - "[FX=42]  FIREWORKS"
      - "[FX=43]  RAIN"
      - "[FX=44]  MERRY_CHRISTMAS"
      - "[FX=45]  FIRE_FLICKER"
      - "[FX=46]  GRADIENT"
      - "[FX=47]  LOADING"
      - "[FX=48]  DUAL_COLOR_WIPE_IN_OUT"
      - "[FX=49]  DUAL_COLOR_WIPE_IN_IN"
      - "[FX=50]  DUAL_COLOR_WIPE_OUT_OUT"
      - "[FX=51]  DUAL_COLOR_WIPE_OUT_IN"
      - "[FX=52]  CIRCUS_COMBUSTUS"
      - "[FX=53]  HALLOWEEN"
      - "[FX=54]  TRICOLOR_CHASE"
      - "[FX=55]  TRICOLOR_WIPE"
      - "[FX=56]  TRICOLOR_FADE"
      - "[FX=57]  LIGHTNING"
      - "[FX=58]  ICU"
      - "[FX=59]  MULTI_COMET"
      - "[FX=60]  DUAL_LARSON_SCANNER"
      - "[FX=61]  RANDOM_CHASE"
      - "[FX=62]  OSCILLATE"
      - "[FX=63]  PRIDE_2015"
      - "[FX=64]  JUGGLE"
      - "[FX=65]  PALETTE"
      - "[FX=66]  FIRE_2012"
      - "[FX=67]  COLORWAVES"
      - "[FX=68]  BPM"
      - "[FX=69]  FILLNOISE8"
      - "[FX=70]  NOISE16_1"
      - "[FX=71]  NOISE16_2"
      - "[FX=72]  NOISE16_3"
      - "[FX=73]  NOISE16_4"
      - "[FX=74]  COLORTWINKLE"
      - "[FX=75]  LAKE"
      - "[FX=76]  METEOR"
      - "[FX=77]  METEOR_SMOOTH"
      - "[FX=78]  RAILWAY"
      - "[FX=79]  RIPPLE"
      - "[FX=80]  TWINKLEFOX"    
      - "[FX=81]  Twinklecat"    
      - "[FX=82]  Halloween Eyes"    
    effect_command_topic: "wled/wohnzimmer/api"
    effect_state_topic: "wled/wohnzimmer/api"
    effect_value_template: "{{ value }}"  

regards
rene

There’s no manual adding needed as the wled will be auto discovered by hass :thinking:

How do you call WLED entity in automation? I would like to turn on my WS2812 for 1 min and define specific Effect. How to do it?

1 Like