Closed epiller closed 1 year ago
By the way, do you accept donations?
Absolutely amazing work @ShiromMakkad! I've managed to do it so if somebody else wants to do the same thing, check below!
What I wanted to do: I have a few AirPlay enabled speakers so when I'm streaming audio to them, I wanted to have the ability to select LedFx as an additional AirPlay speaker and LedFx would start the effect instantly. This means the docker containers aren't connected to any hardware speakers, it's just an AirPlay receiver streaming audio directly to LedFx container via a pipe.
The only improvement I'd do is use the session start/end scripts inshairport-sync.conf
in order to tell LedFx to start/stop the strip (so it can let go of control when I stop streaming).
Here's my docker-compose.yml
:
services:
ledfx:
image: shirom/ledfx
container_name: ledfx
environment:
- FORMAT=-r 44100 -f S16_LE -c 2
- SQUEEZE=1
ports:
- 8888:8888
volumes:
- /home/USER/docker/ledfx:/app/ledfx-config
- /home/USER/docker/shairport-sync/tmp/shairport-sync-audio:/app/audio/stream
shairport-sync:
container_name: Shairport
image: mikebrady/shairport-sync:latest
network_mode: host
volumes:
- /home/USER/docker/shairport-sync/tmp:/tmp/
- /home/USER/docker/shairport-sync/shairport-sync.conf:/etc/shairport-sync.conf
The shairport-sync.conf
is the sample one with the following things changed:
// name = "%H";
to name = "LedFx";
// output_backend = "alsa";
to output_backend = "pipe";
// ignore_volume_control = "no";
to ignore_volume_control = "yes";
Great to hear you've figured it out!
I don't want to accept donations because this repo has no standing costs. Even the CI/CD is free. Also, I don't make any promises about regular support, so I don't think it makes sense to accept money. I just do this for myself as a hobby.
This repo seems like a total gem, can't wait to try it out. One thing before I start (and I'll report back on how it went): @ShiromMakkad can you confirm it's possible to have another docker container of sorts that is used as an AirPlay receiver, so when I AirPlay something to it, it can forward the stream to your LedFx container and therefore control the LEDs?
AirPlay is mentioned in the documentation but it isn't too clear for me. Sorry!