ChristmasTree With WLED And LedFX

Hi guys, I’m planning to use an anddressable led string on my christmas tree and use a D1 Mini with WLED installed to control it. But I also wanted to sync it with music in my living room (where my tree will be). I’ve looked at some tutorials by DrZzs and he uses LedFX to sync with the computer mic. But since my server with home assistants and my PCs are in an other room than the tree, how can I do to place a Mic near the tree and make it sync with the music played by the TV in the living room? It will also be nice if I can use HA to trigger atuomations like “Turn tree music mode on” and “Turn tree music mode off”. I’m completely new to LED softwares to control strings/strips but I can’t find any tutorial about this problem and I don’t know if it is possible to do something like that. (I’ve seens Xlights but as I understood I will have to create an effect for LED for every song I would like to play and it doesn’t fits the situation for the tree in the living room).
Thanks in advance.

Hello !

You can take a look here i think :

… and play with the possibilities of HA afterwards!

Unfortunately the mic should be attached on a Linux/Windows/Mac OS PC running LedFX, and it is not possible to install it on a ESP8266 as i read on the GitHub page.

But I didn’t know about KY-038 and the possibility to create a “sound level” sensor, I needed it for another project, thanks for the link!

You actually don’t need a mic at all to use LedFx. It can use a variety of inputs (line-in, mic-in, pulseaudio, etc).

With that said, if you are looking to just have the tree do different animations based upon music, have a look at LightShowPi. It can control LED strips either directly attached to the Pi or it can output e1.31 to a micro-controller (this is where WLED comes into play).

This way, you can stream music to the Pi (and have speakers attached to it) and the tree lights will respond.

Thanks. Streaming e1.31 to the ESP8266 with LSPI will require some setting up during the installation of the software on the PI or those options will be in the Settings in the Web Interface?

Because I can find only tutorials about how to install it on a PI but no one shows how to stream to a WLED controller.

All done through the config files on the LSPI. It’s pretty easy to do and there are a lot of samples on the LSPI subreddit. Basically, you create a led.cfg file, put your e1.31 settings in there and then run LSPI.

Thanks, I will look up for some samples in the subreddit since this seems the best option for what i want to do.

Hey here’s my solution for music playing from speakers --> RPI running LedFX

First solution - mic… Not good because if you have a party or have a bunch noise the sound is going to be all over the place

Second solution - Squeezebox or network music player, I gave up on this way too complicated

My solution - Two Chromecast Audios, 1 hooked into speakers, 1 hooked into LedFX Pi. Create a Chromecast group so you can stream to both simultaneously.


For controlling with Home Assistant here’s my workflow…

  1. Spotcast to start playback on Chromecast group
  2. Restart LedFX service (kill and restart LedFX) sometimes lights stop connecting, works 100% if you restart
  3. Start the show with a Shell command to the LedFX Pi
    ledfx_scene_rave: /usr/bin/curl -L -X PUT ‘http://192.168.10.84:8888/api/presets’ --data-raw ‘{“id”:“scene_rave”,“action”:“activate”}’
2 Likes

Поделюсь своим вариантом, как можно еще реализовать

hello,
Your approach is very interesting, do you think it could be possible to use the spotify connect component and and get audio input directly from the raspberry pi that is both hosting HA and ledfx addon? I can’t get my system to work and get the audio from pulse component

Hey,

I guess to clarify with my approach I’m running LedFX on a seperate Pi. I assume it’s possible to set up an audio loopback on a raspberry pi (I recall trying). But man working with Pulse is so tedious and maybe impossible if running all from HassOS.

Issue describes approach on Pi…

I successfully set up LedFX for family recently. I installed on Windows and used VB-Cable to input Spotify->LedFX and output the sound back to playback. That’s an option if you want to run outside of the Pi.

Here’s VB Cable
https://vb-audio.com/Cable/

I also tried physically splitting the audio but noticed quality loss.

Spotify API would be the dream :smiley:

Hey,
I am trying to setup LexFx but I have difficulties understanding how to configure everything.

My current setup is:
HA installed on the Synology Virtual Machine
LedFX installed on a Windows computer
Speakers connected to the Windows computer
Xiaomi Wireless Bathroom Speakers
Both Computer and Xiaomi speakers are setup already in HA as separate output speakers. I can play different radio stations independently on both of them in the same time.
Computer_Ledstrip connected to an ESP32 with WLED
Bathroom_Ledstrip connected to another ESP32 with WLED.

For the moment both led strips reacts on audio played on Computer speakers.
I want the Bathroom_Ledstrip to react on audio played on the Barhroom speakers.

How can I set this up?

The most logical way to do it would be to integrate LedFx server in HA with multiple instances and to assign a speaker pair to each instance. But from what I see there is not such version of LedFx server that can be integrated with HA.

Another potential solution would be to install another server of LedFx on a different hardware (maybe another virtual machine or docker) and to loop the Bathroom Speakers output from Ha to LedFx and from LedFx to Bathroom Speakers. But I have no ideea how to do this.
The ideal for me would the to use the hardware I already have.
Many thanks,