-
Notifications
You must be signed in to change notification settings - Fork 21
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
Update for the Latest LedFX dev branch and auto discovery #1
Conversation
Thanks for the PR! I really like the auto discovery feature, but is there any way to do this without network_mode: host? I don't want to add more permissions than necessary, and I want to keep as much of the container's activity containerized as possible. Is there a specific port we can access in the container instead? Also, how can the user define the auto-discovery URL, and what apps are compatible with it? Regarding moving to the LedFX dev branch, I actually pushed a build with this change, but I got multiple bugs while doing so. I'm moving to LedFx/LedFx's master branch, and I've been told that once the dev branch is stable, it will be moved to the master branch. |
How much i know the only other way is to pass the host dbus socket to the container dbus and need to run container --privileged mviereck/x11docker#271 |
And according to https://www.reddit.com/r/docker/comments/ebfic4/how_to_access_avahi_dns_resolver_zeroconf_from/ and docker documentation other solution is using MacVLAN or ipvlan |
I like the documentation! I'm going to look into getting Macvlan working without specifying a host network adapter or subnet so that the docker-compose file will work on any system. If that doesn't work, we can use How can I test the network discovery? Do you have a client in mind you want to use this feature with? |
I tried using macvlan, but it doesn't work with Wifi cards, it makes the docker compose file significantly more complex, and it will no longer work without configuration. The user will have to specify their subnet and network card (this is especially a nuisance on Windows), and I don't want to make the setup more complicated. Unfortunately, I don't want to merge a PR that drops support for Windows and Mac or drops support for Wifi cards. If you can find a workaround for the |
The latest dev branch have ability to discover wled devices on the network if we don't pass the host network is not discovering devices but if we pass the host network it discover but is unable to resolve the .local host names avahi helps to resolve wled.local host to the ip address any way passing the host network can be optional, and whit note is not working on windows because of the limitations of docker for windows and need to add all the devices manually, but on unix systems is working and auto discover all the wled devices |
@spiro-c hi, i have build a image from your updated dockerfile (on Synology NAS) and i can`t successfully run the container.
How can i create this file or what else i can do? |
@L3H0 can u tray and use this image https://hub.docker.com/r/spirocekano/ledfx here is example docker-compose file i used
|
@spiro-c Yes, image is OK. But i have problem with the audio :/ |
@L3H0 in your mopidy.conf the audio output need to be [audio]
#output = autoaudiosink
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! filesink location=/tmp/snapfifo and in docker-compose.yml for ledfx u need to change version: '3'
services:
ledfxdev:
image: spirocekano/ledfx:dev
container_name: ledfx-dev
hostname: ledfx-dev
network_mode: host
environment:
# - HOST=ip of the snapcast server
- FORMAT=-r 44100 -f S16_LE -c 2
ports:
- 8888:8888
volumes:
- ./ledfx-config:/root/.ledfx
- /tmp/snapfifo:/app/audio |
@spiro-c Thx, about 1 hour ago i have read few www and got the setup to work :) Now i must setup a RPi on mopidy and from them pass audio to the audio receiver. |
@L3H0 Just as a heads up, I tried running @spiro-c's container on a Raspberry Pi 4, but there were a lot of stuttering issues despite there being plenty of RAM and CPU power left. There's some issue with the dev branch and running on a Raspberry Pi, at least on Balena OS. Let me know if you get it working, I'd love to see a Mopidy example too! |
@ShiromMakkad Can you try and run the new containers from the Virtual brunch https://github.com/spiro-c/LedFxDocker-Virtual i run in on raspberry Pi 3b+ whit mopidy and snapcast on same Pi whit 4 Wled devices and i don't have any problems even there is steel some cpu on the pi |
@spiro-c Sorry for taking so long, I'm pretty busy right now, but I just tested your image and it does work on my Pi. The virtual branch must help things a lot. The network discovery feature didn't work, but it didn't cause any errors either. We can add a separate tag for the virtual branch with these improvements, but when moving to the virtual branch, I noticed that my base image doesn't support Python 3.9. I see you made a workaround using the official python image, which I prefer using. I was thinking we could make a What are your thoughts on this? |
@ShiromMakkad i don't have any problem, yes we can have the Virtual tag and have both of them for now any way i will keep my fork for testing but how much i know the goal on LedFx is to push Virtual like master And about two Dockerfiles i use just to speed up build process of the images and ability to use github actions to build the image the venv image i rebuild locally only if there is change in requirements.txt building the wheel is most time consuming and push to docker hub and after that just simple push to github will rebuild main image |
One more side note i did manage to get mopidy to output to sound card and serve fifo for LedFx by using the [audio]
# output to audio card and fifo
output = tee name=t ! queue ! audioresample ! autoaudiosink t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapcast/snapfifo |
If you want to merge the Avahi daemon changes into Regarding the Virtuals branch, the devs said they want to merge it into the dev branch, so when that happens, I'll update |
There is no point of this PR you have the dev branch i will close it |
No description provided.