gabe565 / CastSponsorSkip

⏭️ Skip YouTube ads and sponsorships on all local Google Cast devices
Apache License 2.0
286 stars 6 forks source link

monitor specific device/IP address #36

Closed bgstack15 closed 6 months ago

bgstack15 commented 9 months ago

Please add the ability to specific the exact device IP address. I cannot get network discovery to work from a docker container, with the standard network config:

docker run --rm -e CSS_DISCOVER_INTERVAL=30s -e CSS_NETWORK_INTERFACE=br0 -e CSS_LOG_LEVEL=debug --network=host --name=castsponsorskip ghcr.io/gabe565/castsponsorskip

I have confirmed my network connectivity to port 8009 on my Chromecast device which is on the same VLAN and subnet.

Would you please consider allowing a specific device, and then waiting for discovery that never happens is not needed.

gabe565 commented 9 months ago

That's interesting. I can add a config to target specific device IP addresses, but I wonder why discovery isn't working for you. Does it still happen if you remove the CSS_NETWORK_INTERFACE flag?

bgstack15 commented 9 months ago

It just says "searching for devices..." and never does anything.

$ docker exec castsponsorskip ping 192.168.1.29
PING 192.168.1.29 (192.168.1.29): 56 data bytes
ping: permission denied (are you root?)
$ docker exec castsponsorskip nc -v 192.168.1.29 8009
192.168.1.29 (192.168.1.29:8009) open

Now, when I run docker exec castsponsorskip ip -o a s it shows a multitude of network interfaces because I'm guessing my docker networking is poorly implemented. But I do see my br0 with my correct IP address on the same subnet with the Chromecast. Perhaps I'm missing some avahi daemon or uPNP or something on the network?

gabe565 commented 9 months ago

Having a bunch of network interfaces is normal when hosting containers. You shouldn't need Avahi or anything either since you set network mode to host. Is this on a Linux host?

bgstack15 commented 9 months ago

This docker container is running on CentOS 7.

Write commented 9 months ago

Same issue here. I now use the iSponsorBlockTV project, which use the pairing tv code to pair each client and it works wonderfully.

gabe565 commented 6 months ago

@bgstack15 @Write I completely understand if you don't want to switch back, but I've added config for this as of v0.7.0! A device list can now be passed with the new --devices flag or with the CSS_DEVICES env.

bgstack15 commented 6 months ago

Thank you so much for working on this! I will test hopefully very soon.

bgstack15 commented 6 months ago

I failed to report. This new option is useful and this project now connects to my chromecast device. Thank you so much!