Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT? #7

Open
Slyke opened this issue Dec 2, 2024 · 1 comment
Open

MQTT? #7

Slyke opened this issue Dec 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Slyke
Copy link

Slyke commented Dec 2, 2024

Describe the solution you'd like
MQTT support please

Describe alternatives you've considered
I tested with stock WLED and it seems to work fine.

Additional context
image

@Slyke Slyke added the enhancement New feature or request label Dec 2, 2024
@pipe-2233
Copy link

pipe-2233 commented Dec 14, 2024

To resolve the issue of missing MQTT support in the "Sound Reactive WLED" firmware, a solution is to switch to the official WLED version, which includes MQTT support by default. First, download the official WLED firmware from the GitHub repository at [(https://github.com/Aircoookie/WLED)]. Then, upload the firmware to your ESP8266 or ESP32 device using the Arduino IDE or PlatformIO. Once installed, configure MQTT in the WLED configuration file. To enable it, go to wled00\config\WLED_esp8266_esp32.h and make sure the line #define WLED_MQTT is not commented out. After that, configure your MQTT credentials in the WLED user interface under the "Wi-Fi" -> "MQTT" section by entering your broker, port, and credentials. Once done, you can control WLED via MQTT using commands like: mosquitto_pub -h <broker_ip> -t "wled/set" -m "{\"on\": true, \"bri\": 128, \"col\": [255, 0, 0]}" , to check if the message is being sent correctly, subscribe from another terminal to see if the message arrives at the topic we published for testing: mosquitto_sub -h <broker_ip> -t "wled/set" to turn the lights on with brightness 128 and red color. Alternatively, you can use Node-RED to send these MQTT commands to WLED. If you need to continue using "Sound Reactive," you would have to compile the firmware by manually adding MQTT support to the source code and then uploading it to the device.

As alternatives to WLED, you can consider other firmwares like ESPHome, Tasmota, or FastLED.

ESPHome is very easy to configure and integrates well with platforms like Home Assistant. To control LEDs with ESPHome, here's an example configuration:

light:
  - platform: neopixelbus
    name: "Living Room Lights"
    data_pin: GPIO5
    num_leds: 30
    rgb_order: GRB

Tasmota is also a valid option if you're looking for MQTT support from the start. Here’s an example of how to configure it to control RGB LEDs in Tasmota:

GPIO12 -> RGB LED

FastLED is a more advanced option, offering a lot of flexibility for programming custom effects and patterns on your lights. If you choose to use FastLED, you will need more programming work, but it allows for full control over light effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants