xat / castnow

commandline chromecast player
MIT License
3.81k stars 241 forks source link

Device Not found #268

Open Kazuki989 opened 2 years ago

Kazuki989 commented 2 years ago

i am unable to connect to Chromecast it always says device not found i can connect to it my manually typing ip

happyman commented 1 year ago

check local firewall, mdns should be allowed. for example: firewall-cmd --permanent --add-service=mdns

mhertz commented 2 months ago

Spent several hours on this, so thought possibly might be helpful for others googling it...

In my case, using a minimal setup without DE, iwd standalone for network, and no firewall besides router, then devices specified never found and as OP then only IP worked. I gathered mdns wasen't working, but found was, and so In short, the device name wasn't the one to use, atleast here, and instead through experimentation I found correct name through using avahi, so started it's daemon temporary(sudo systemctl start avahi-daemon), and ran 'avahi-browse --all --resolve --terminate', and for each chromecast IP in list, you need use the specified hostname, a 36 char long string with numbers, letters and hyphens, ending in '.local' and in brackets - remove the brackets and the '.local' ending. Done.

Edit: BTW for completeness then little different from OP presumably as I can connect to first found Chromecast fine, without specify ip or device, and above just needed to seperate between my two Chromecast's though '--device' param, one old first Gen and another newest HD one, both setup with Google home android app and given seperate device names there, which as said not adhered to. The default (first found) Chromecast, is the first in Google home app device list and hostname found also starts with 0 and the second with 1.